From 62bcd52da584c1a0acbd9cfdbee79b031280ac52 Mon Sep 17 00:00:00 2001 From: Hylke van der Schaaf Date: Mon, 17 Jun 2024 10:21:58 +0200 Subject: [PATCH] [HELM] Added option to specify image pull secret name --- helm/frost-server/README.md | 9 +++++++-- helm/frost-server/templates/bus-deployment.yaml | 4 ++++ helm/frost-server/templates/db-backup-deployment.yaml | 4 ++++ helm/frost-server/templates/db-deployment.yaml | 4 ++++ helm/frost-server/templates/http-deployment.yaml | 4 ++++ helm/frost-server/templates/mqtt-deployment.yaml | 4 ++++ helm/frost-server/values.yaml | 5 +++++ 7 files changed, 32 insertions(+), 2 deletions(-) diff --git a/helm/frost-server/README.md b/helm/frost-server/README.md index a78f75a14..61f7de3ed 100644 --- a/helm/frost-server/README.md +++ b/helm/frost-server/README.md @@ -187,6 +187,7 @@ The following table lists the configurable parameters of the FROST-Server chart | `frost.http.image.repository` | Image for the http module. | `fraunhoferiosb/frost-server-http` | | `frost.http.image.tag` | Imagetag for the http module. | `{VERSION}` | | `frost.http.image.pullPolicy` | Image pull policy for the http module. | `IfNotPresent` | +| `frost.http.image.imagePullSecret` | Name of the pull secred to use when pulling the Image from the configured repository. | `nil` | | `frost.http.resources.requests.cpu` | CPU requested by the http module. | `1Gi` | | `frost.http.resources.requests.memory` | Memory requested by the http module. | `500m` | | `frost.http.resources.limits.cpu` | CPU limit for the http module. | `NIL` | @@ -205,8 +206,8 @@ The following table lists the configurable parameters of the FROST-Server chart | `frost.db.persistence.hostPath` | If `frost.db.persistence.enabled` is set to false. Than this variable can be used to mount this hostPath to the database container. | `nil` | | `frost.db.database` | The FROST-Server database name to use. | `sensorthings` | | `frost.db.existingSecret` | If set, this secret is used for the database credentials. | `nil` | -| `frost.db.secretUsernameKey` | The key in the database secret for the username. Change if your secret differs. | `db.username` | -| `frost.db.secretPasswordKey` | The key in the database secret for the password. Change if your secret differs. | `db.password` | +| `frost.db.secretUsernameKey` | The key in the database secret for the username. Change if your secret differs. | `db.username` | +| `frost.db.secretPasswordKey` | The key in the database secret for the password. Change if your secret differs. | `db.password` | | `frost.db.username` | The _base64_ username to use when connecting to the FROST-Server database. | `c2Vuc29ydGhpbmdz` (`sensorthings`) | | `frost.db.password` | The _base64_ password to use when connecting to the FROST-Server database. | `bm93eW91Y2FuY2hhbmdlaXQ=` (`nowyoucanchangeit`) | | `frost.db.idGenerationMode` | Determines how entity ids are generated by any FROST-Server module. See [here](https://github.com/FraunhoferIOSB/FROST-Server/blob/master/docs/settings.adoc#persistence-settings) for more information. | `ServerGeneratedOnly` | @@ -217,6 +218,7 @@ The following table lists the configurable parameters of the FROST-Server chart | `frost.db.image.repository` | Image for the database. | `postgis/postgis` | | `frost.db.image.tag` | Imagetag for the database. | `14-3.2-alpine` | | `frost.db.image.pullPolicy` | Image pull policy for the bus. | `IfNotPresent` | +| `frost.db.image.imagePullSecret` | Name of the pull secred to use when pulling the Image from the configured repository. | `nil` | | `frost.db.securityContext.runAsUser` | The user id of the database process. | `nil` | | `frost.db.securityContext.runAsGroup` | The group id of the database process. | `nil` | | `frost.db.securityContext.fsGroup` | The fsGroup of the database process. | `nil` | @@ -263,6 +265,7 @@ The following table lists the configurable parameters of the FROST-Server chart | `frost.mqtt.image.repository` | Image for the mqtt module. | `fraunhoferiosb/frost-server-mqtt` | | `frost.mqtt.image.tag` | Imagetag for the mqtt module. | `{VERSION}` | | `frost.mqtt.image.pullPolicy` | Image pull policy for the mqtt module. | `IfNotPresent` | +| `frost.mqtt.image.imagePullSecret` | Name of the pull secred to use when pulling the Image from the configured repository. | `nil` | | `frost.mqtt.extraEnv` | Extra environment variables for the mqtt module. See below for syntax. | `nil` | | `frost.mqtt.ingress.enabled` | If Ingress needs to be enabled for the FROST-Server MQTT module. See [bellow](#ingress) for more information. | `true` | | `frost.mqtt.ingress.path` | Value for the `path` of the service in the ingress spec. Some clients assume this to be `/mqtt`. | `/mqtt` | @@ -277,6 +280,7 @@ The following table lists the configurable parameters of the FROST-Server chart | `frost.bus.image.repository` | Image for the bus. | `eclipse-mosquitto` | | `frost.bus.image.tag` | Imagetag for the bus. | `1.4.12` | | `frost.bus.image.pullPolicy` | Image pull policy for the bus. | `IfNotPresent` | +| `frost.bus.image.imagePullSecret` | Name of the pull secred to use when pulling the Image from the configured repository. | `nil` | | `frost.extension.customLinks.enable` | Enable the custom entity links extension. | `false` | | `frost.extension.customLinks.recurseDepth` | Set how deep in properies the extension searches for custom links. | `0` (top level only) | | `frost.extension.filterDelete.enable` | Enable the Filtered Delete extension. | `false` | @@ -285,6 +289,7 @@ The following table lists the configurable parameters of the FROST-Server chart | `frost.backup.image.repository` | Image for the database. | `kartoza/pg-backup` | | `frost.backup.image.tag` | Imagetag for the database. | `14-3.2` | | `frost.backup.image.pullPolicy` | Image pull policy for the bus. | `IfNotPresent` | +| `frost.backup.image.imagePullSecret` | Name of the pull secred to use when pulling the Image from the configured repository. | `nil` | | `frost.backup.removeBefore` | Remove all old backups older than specified amount of days. | `14` | | `frost.backup.persistence.existingClaim` | If set, then use an existing [PersistenceVolumeClaim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#lifecycle-of-a-volume-and-claim) for the backup volume. | `nil` (use the builtin PersistenceVol | | `frost.backup.persistence.storageClassName` | The [StorageClassName](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class) to use by the backup persistence. | `nil` (use the default StorageClass currently in use) | diff --git a/helm/frost-server/templates/bus-deployment.yaml b/helm/frost-server/templates/bus-deployment.yaml index 9427ad5d8..d8615089e 100644 --- a/helm/frost-server/templates/bus-deployment.yaml +++ b/helm/frost-server/templates/bus-deployment.yaml @@ -27,6 +27,10 @@ spec: app: {{ include "frost-server.name" . }} component: {{ $tier }} spec: + {{- if .Values.frost.bus.image.imagePullSecret }} + imagePullSecrets: + - name: {{ .Values.frost.bus.image.imagePullSecret }} + {{- end}} containers: - name: {{ $fullName }} image: "{{ .Values.frost.bus.image.registry }}/{{ .Values.frost.bus.image.repository }}:{{ .Values.frost.bus.image.tag }}" diff --git a/helm/frost-server/templates/db-backup-deployment.yaml b/helm/frost-server/templates/db-backup-deployment.yaml index a5db4f03a..0af1b28be 100644 --- a/helm/frost-server/templates/db-backup-deployment.yaml +++ b/helm/frost-server/templates/db-backup-deployment.yaml @@ -30,6 +30,10 @@ spec: spec: securityContext: {{- toYaml .Values.frost.backup.securityContext | nindent 10 }} + {{- if .Values.frost.backup.image.imagePullSecret }} + imagePullSecrets: + - name: {{ .Values.frost.backup.image.imagePullSecret }} + {{- end}} containers: - name: {{ $fullName }} image: "{{ .Values.frost.backup.image.registry }}/{{ .Values.frost.backup.image.repository }}:{{ .Values.frost.backup.image.tag }}" diff --git a/helm/frost-server/templates/db-deployment.yaml b/helm/frost-server/templates/db-deployment.yaml index d9b370422..ab644d4dc 100644 --- a/helm/frost-server/templates/db-deployment.yaml +++ b/helm/frost-server/templates/db-deployment.yaml @@ -44,6 +44,10 @@ spec: {{- end }} securityContext: {{- toYaml .Values.frost.db.securityContext | nindent 10 }} + {{- if .Values.frost.db.image.imagePullSecret }} + imagePullSecrets: + - name: {{ .Values.frost.db.image.imagePullSecret }} + {{- end}} containers: - name: {{ $fullName }} image: "{{ .Values.frost.db.image.registry }}/{{ .Values.frost.db.image.repository }}:{{ .Values.frost.db.image.tag }}" diff --git a/helm/frost-server/templates/http-deployment.yaml b/helm/frost-server/templates/http-deployment.yaml index 6db248f3b..286f557c2 100644 --- a/helm/frost-server/templates/http-deployment.yaml +++ b/helm/frost-server/templates/http-deployment.yaml @@ -27,6 +27,10 @@ spec: app: {{ include "frost-server.name" . }} component: {{ $tier }} spec: + {{- if .Values.frost.http.image.imagePullSecret }} + imagePullSecrets: + - name: {{ .Values.frost.http.image.imagePullSecret }} + {{- end}} containers: - name: {{ $fullName }} image: "{{ .Values.frost.http.image.registry }}/{{ .Values.frost.http.image.repository }}:{{ .Values.frost.http.image.tag }}" diff --git a/helm/frost-server/templates/mqtt-deployment.yaml b/helm/frost-server/templates/mqtt-deployment.yaml index c56ca1276..6216541b9 100644 --- a/helm/frost-server/templates/mqtt-deployment.yaml +++ b/helm/frost-server/templates/mqtt-deployment.yaml @@ -28,6 +28,10 @@ spec: app: {{ include "frost-server.name" . }} component: {{ $tier }} spec: + {{- if .Values.frost.mqtt.image.imagePullSecret }} + imagePullSecrets: + - name: {{ .Values.frost.mqtt.image.imagePullSecret }} + {{- end}} containers: - name: {{ $fullName }} image: "{{ .Values.frost.mqtt.image.registry }}/{{ .Values.frost.mqtt.image.repository }}:{{ .Values.frost.mqtt.image.tag }}" diff --git a/helm/frost-server/values.yaml b/helm/frost-server/values.yaml index 30e7d2f6c..7ee225e10 100644 --- a/helm/frost-server/values.yaml +++ b/helm/frost-server/values.yaml @@ -110,6 +110,7 @@ frost: repository: fraunhoferiosb/frost-server-http tag: latest pullPolicy: IfNotPresent + imagePullSecret: # FROST-Server HTTP deployment settings replicas: 1 ports: @@ -188,6 +189,7 @@ frost: repository: fraunhoferiosb/frost-server-mqtt tag: latest pullPolicy: IfNotPresent + imagePullSecret: # FROST-Server MQTT deployment settings enabled: true annotations: {} @@ -264,6 +266,7 @@ frost: repository: postgis/postgis tag: 14-3.2-alpine pullPolicy: IfNotPresent + imagePullSecret: # FROST-Server Database deployment settings ports: postgresql: @@ -307,6 +310,7 @@ frost: repository: kartoza/pg-backup tag: 14-3.2 pullPolicy: IfNotPresent + imagePullSecret: removeBefore: 14 @@ -332,6 +336,7 @@ frost: repository: eclipse-mosquitto tag: 1.4.12 pullPolicy: IfNotPresent + imagePullSecret: # FROST-Server Messages Bus deployment settings ports: bus: