diff --git a/charts/eclipse-mosquitto/Chart.yaml b/charts/eclipse-mosquitto/Chart.yaml deleted file mode 100644 index 2f2aa80..0000000 --- a/charts/eclipse-mosquitto/Chart.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v2 -appVersion: 2.0.18 -description: Eclipse Mosquitto MQTT -name: mosquitto -version: 0.0.1 -type: application -keywords: -- mqtt -- mosquitto -home: https://github.com/JacekZubielik/jz-helm-charts/tree/master/charts/eclipse-mosquitto -icon: https://raw.githubusercontent.com/eclipse/mosquitto/master/logo/mosquitto-logo-min.svg -sources: -- https://github.com/eclipse/mosquitto -maintainers: -- name: jacekzubielik diff --git a/charts/eclipse-mosquitto/templates/_helpers.tpl b/charts/eclipse-mosquitto/templates/_helpers.tpl deleted file mode 100644 index f548475..0000000 --- a/charts/eclipse-mosquitto/templates/_helpers.tpl +++ /dev/null @@ -1,45 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "eclipse-mosquitto.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "eclipse-mosquitto.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "eclipse-mosquitto.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "eclipse-mosquitto.labels" -}} -app.kubernetes.io/name: {{ include "eclipse-mosquitto.name" . }} -helm.sh/chart: {{ include "eclipse-mosquitto.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} diff --git a/charts/eclipse-mosquitto/templates/configmap-certs.yaml b/charts/eclipse-mosquitto/templates/configmap-certs.yaml deleted file mode 100644 index 230da9f..0000000 --- a/charts/eclipse-mosquitto/templates/configmap-certs.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "eclipse-mosquitto.fullname" . }}-certs - labels: -{{ include "eclipse-mosquitto.labels" . | indent 4 }} -data: - ca.crt: |- - {{- .Values.certs.ca.crt | nindent 4 }} - server.crt: |- - {{- .Values.certs.server.crt | nindent 4 }} - server.key: |- - {{- .Values.certs.server.key | nindent 4 }} diff --git a/charts/eclipse-mosquitto/templates/configmap.yaml b/charts/eclipse-mosquitto/templates/configmap.yaml deleted file mode 100644 index db73932..0000000 --- a/charts/eclipse-mosquitto/templates/configmap.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "eclipse-mosquitto.fullname" . }}-config - labels: -{{ include "eclipse-mosquitto.labels" . | indent 4 }} -data: - mosquitto.conf: |- - {{- .Values.config | nindent 4 }} diff --git a/charts/eclipse-mosquitto/templates/deployment.yaml b/charts/eclipse-mosquitto/templates/deployment.yaml deleted file mode 100644 index c87dc84..0000000 --- a/charts/eclipse-mosquitto/templates/deployment.yaml +++ /dev/null @@ -1,111 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "eclipse-mosquitto.fullname" . }} - labels: -{{ include "eclipse-mosquitto.labels" . | indent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app.kubernetes.io/name: {{ include "eclipse-mosquitto.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - template: - metadata: - labels: - app.kubernetes.io/name: {{ include "eclipse-mosquitto.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: {{ .Values.container.ports.mqtt.name }} - containerPort: {{ .Values.container.ports.mqtt.port }} - protocol: TCP - - name: {{ .Values.container.ports.mqtts.name }} - containerPort: {{ .Values.container.ports.mqtts.port }} - protocol: TCP - livenessProbe: - tcpSocket: - port: {{ .Values.container.ports.mqtt.port }} - initialDelaySeconds: 5 - periodSeconds: 15 - readinessProbe: - tcpSocket: - port: {{ .Values.container.ports.mqtt.port }} - initialDelaySeconds: 5 - periodSeconds: 10 - volumeMounts: - - name: mosquitto-conf - mountPath: /mosquitto/config/mosquitto.conf - subPath: mosquitto.conf - readOnly: true - - name: mosquitto-ca-cert - mountPath: /mosquitto/config/certs/ca.crt - subPath: ca.crt - readOnly: true - - name: mosquitto-server-cert - mountPath: /mosquitto/config/certs/server.crt - subPath: server.crt - readOnly: true - - name: mosquitto-server-key - mountPath: /mosquitto/config/certs/server.key - subPath: server.key - readOnly: true - - name: mosquitto-data - mountPath: /mosquitto/data - subPath: mosquitto/data - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumes: - - name: mosquitto-conf - configMap: - name: {{ include "eclipse-mosquitto.fullname" . }}-config - - name: mosquitto-ca-cert - configMap: - name: {{ include "eclipse-mosquitto.fullname" . }}-certs - items: - - key: ca.crt - path: ca.crt - - name: mosquitto-server-cert - configMap: - name: {{ include "eclipse-mosquitto.fullname" . }}-certs - items: - - key: server.crt - path: server.crt - - name: mosquitto-server-key - configMap: - name: {{ include "eclipse-mosquitto.fullname" . }}-certs - items: - - key: server.key - path: server.key - - name: mosquitto-data - {{- if .Values.persistence.enabled }} - persistentVolumeClaim: - claimName: {{ include "eclipse-mosquitto.fullname" . }}-pvc - {{- else }} - emptyDir: {} - {{- end -}} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/eclipse-mosquitto/templates/ingress.yaml b/charts/eclipse-mosquitto/templates/ingress.yaml deleted file mode 100644 index 9e8a62a..0000000 --- a/charts/eclipse-mosquitto/templates/ingress.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "eclipse-mosquitto.fullname" . -}} -{{- $portName := .Values.service.ports.mqtts.name -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ $fullName }}-mqtt - labels: -{{ include "eclipse-mosquitto.labels" . | indent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: -{{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} -{{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ . }} - backend: - serviceName: {{ $fullName }} - servicePort: {{ $portName }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/eclipse-mosquitto/templates/pvc.yaml b/charts/eclipse-mosquitto/templates/pvc.yaml deleted file mode 100644 index b65eae1..0000000 --- a/charts/eclipse-mosquitto/templates/pvc.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ include "eclipse-mosquitto.fullname" . }}-pvc - namespace: {{ .Release.Namespace }} -{{- with .Values.persistence.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} - labels: -{{ include "eclipse-mosquitto.labels" . | indent 4 }} -spec: - accessModes: - - {{ .Values.persistence.accessMode | quote }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} -{{- if .Values.persistence.storageClass }} -{{- if (eq "-" .Values.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.storageClass }}" -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/eclipse-mosquitto/templates/service.yaml b/charts/eclipse-mosquitto/templates/service.yaml deleted file mode 100644 index 87968ca..0000000 --- a/charts/eclipse-mosquitto/templates/service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "eclipse-mosquitto.fullname" . }} - labels: -{{ include "eclipse-mosquitto.labels" . | indent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.ports.mqtt.port }} - targetPort: {{ .Values.container.ports.mqtt.name }} - protocol: TCP - name: {{ .Values.service.ports.mqtt.name }} - - port: {{ .Values.service.ports.mqtts.port }} - targetPort: {{ .Values.container.ports.mqtts.name }} - protocol: TCP - name: {{ .Values.service.ports.mqtts.name }} - selector: - app.kubernetes.io/name: {{ include "eclipse-mosquitto.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/charts/eclipse-mosquitto/templates/tests/test-connection.yaml b/charts/eclipse-mosquitto/templates/tests/test-connection.yaml deleted file mode 100644 index 38769ff..0000000 --- a/charts/eclipse-mosquitto/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "eclipse-mosquitto.fullname" . }}-test-connection" - labels: -{{ include "eclipse-mosquitto.labels" . | indent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "eclipse-mosquitto.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/charts/eclipse-mosquitto/values.yaml b/charts/eclipse-mosquitto/values.yaml deleted file mode 100644 index fd93c36..0000000 --- a/charts/eclipse-mosquitto/values.yaml +++ /dev/null @@ -1,112 +0,0 @@ -# Default values for eclipse-mosquitto. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: eclipse-mosquitto - tag: 1.6.7 - pullPolicy: IfNotPresent - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -container: - ports: - mqtt: - name: mqtt - port: 1884 - mqtts: - name: mqtts - port: 1883 - -service: - type: ClusterIP - ports: - mqtt: - name: mqtt - port: 1884 - mqtts: - name: mqtts - port: 1883 - -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: [] - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -config: |- - persistence true - persistence_location /mosquitto/data/ - log_dest stdout - listener 1884 - listener 1883 - protocol mqtt - cafile /mosquitto/config/certs/ca.crt - certfile /mosquitto/config/certs/server.crt - keyfile /mosquitto/config/certs/server.key - require_certificate true - use_subject_as_username true - -certs: - ca: - crt: |- - -----BEGIN CERTIFICATE----- - CA_CERT - -----END CERTIFICATE----- - server: - crt: |- - -----BEGIN CERTIFICATE----- - SERVER_CERT - -----END CERTIFICATE----- - key: |- - -----BEGIN PRIVATE KEY----- - SERVER_KEY - -----END PRIVATE KEY----- - - -## Persist data to a persistent volume -persistence: - enabled: true - ## database data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - accessMode: ReadWriteOnce - size: 8Gi - annotations: {} - storageClass: standard - -## Security context -securityContext: - enabled: false - runAsUser: 999 - fsGroup: 999 diff --git a/charts/mosquitto/Chart.yaml b/charts/mosquitto/Chart.yaml index 51af307..780daf4 100644 --- a/charts/mosquitto/Chart.yaml +++ b/charts/mosquitto/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 2.0.18 description: Eclipse Mosquitto MQTT name: mosquitto -version: 0.0.13 +version: 0.0.14 type: application keywords: - mqtt diff --git a/charts/mosquitto/templates/_helpers.tpl b/charts/mosquitto/templates/_helpers.tpl index 8534018..8223e91 100644 --- a/charts/mosquitto/templates/_helpers.tpl +++ b/charts/mosquitto/templates/_helpers.tpl @@ -48,4 +48,4 @@ app.kubernetes.io/instance: {{ .Release.Name }} {{- else }} {{- default "default" .Values.serviceAccount.name }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/mosquitto/templates/deployment.yaml b/charts/mosquitto/templates/deployment.yaml index 1ebc6cd..66f3403 100644 --- a/charts/mosquitto/templates/deployment.yaml +++ b/charts/mosquitto/templates/deployment.yaml @@ -40,28 +40,28 @@ spec: runAsGroup: {{ .Values.securityContext.runAsGrop }} fsGroup: {{ .Values.securityContext.fsGroup }} {{- end }} - initContainers: - - name: init-config - image: busybox - command: ["/bin/cp", "-v", "/tmp/password_file", "/mosquitto/password_file"] - securityContext: - runAsNonRoot: false - privileged: true - volumeMounts: - - name: mosquitto-passwd - mountPath: /tmp/password_file - subPath: password_file - - name: mosquitto-data - mountPath: /mosquitto - - name: setup-permissions - image: busybox - command: ["/bin/chown", "-R", "1883:1883", "/mosquitto"] - securityContext: - runAsUser: 0 - privileged: true - volumeMounts: - - name: mosquitto-data - mountPath: /mosquitto + # initContainers: + # - name: init-config + # image: busybox + # command: ["/bin/cp", "-v", "/tmp/password_file", "/mosquitto/password_file"] + # securityContext: + # runAsNonRoot: false + # privileged: true + # volumeMounts: + # - name: mosquitto-passwd + # mountPath: /tmp/password_file + # subPath: password_file + # - name: mosquitto-data + # mountPath: /mosquitto + # - name: setup-permissions + # image: busybox + # command: ["/bin/chown", "-R", "1883:1883", "/mosquitto"] + # securityContext: + # runAsUser: 0 + # privileged: true + # volumeMounts: + # - name: mosquitto-data + # mountPath: /mosquitto containers: - name: {{ .Chart.Name }} securityContext: @@ -125,13 +125,13 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumes: - - name: mosquitto-passwd - secret: - secretName: mosquitto-secrets - items: - - key: password_file - path: password_file - mode: 0640 + # - name: mosquitto-passwd + # secret: + # secretName: mosquitto-secrets + # items: + # - key: password_file + # path: password_file + # mode: 0640 - name: mosquitto-conf configMap: name: {{ include "app.fullname" . }} diff --git a/charts/mosquitto/templates/serviceaccount.yaml b/charts/mosquitto/templates/serviceaccount.yaml index 762da3d..13a3866 100644 --- a/charts/mosquitto/templates/serviceaccount.yaml +++ b/charts/mosquitto/templates/serviceaccount.yaml @@ -13,4 +13,4 @@ metadata: {{ toYaml .Values.serviceAccount.labels | indent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/mosquitto/templates/servicemonitor.yaml b/charts/mosquitto/templates/servicemonitor.yaml index 2e452de..e22e4b7 100644 --- a/charts/mosquitto/templates/servicemonitor.yaml +++ b/charts/mosquitto/templates/servicemonitor.yaml @@ -59,4 +59,4 @@ spec: {{- end }} {{- end }} jobLabel: {{ template "app.fullname" . }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/mosquitto/values.yaml b/charts/mosquitto/values.yaml index a527469..1fd707e 100644 --- a/charts/mosquitto/values.yaml +++ b/charts/mosquitto/values.yaml @@ -120,5 +120,5 @@ persistence: enabled: true storageClass: local-path accessMode: ReadWriteOnce - size: 2Gi + size: 1Gi annotations: {}