feat(argocd-image-updater): Make cm and secret names configurable (#2998)
* feat: made argocd image updater cm and secret name templated Signed-off-by: AvivGuiser <avivguiser@gmail.com> * fix indention Signed-off-by: AvivGuiser <avivguiser@gmail.com> * update Chart.yaml Signed-off-by: AvivGuiser <avivguiser@gmail.com> * chore: Apply changes from code review Signed-off-by: Marco Maurer <mkilchhofer@users.noreply.github.com> * chore: Reflect changes from review inside changelog Signed-off-by: Marco Maurer (-Kilchhofer) <mkilchhofer@users.noreply.github.com> --------- Signed-off-by: AvivGuiser <avivguiser@gmail.com> Signed-off-by: Marco Maurer <mkilchhofer@users.noreply.github.com> Signed-off-by: Marco Maurer (-Kilchhofer) <mkilchhofer@users.noreply.github.com> Co-authored-by: Marco Maurer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
parent
bf9830c670
commit
79ec8fdb94
8 changed files with 44 additions and 26 deletions
|
@ -2,7 +2,7 @@ apiVersion: v2
|
||||||
name: argocd-image-updater
|
name: argocd-image-updater
|
||||||
description: A Helm chart for Argo CD Image Updater, a tool to automatically update the container images of Kubernetes workloads which are managed by Argo CD
|
description: A Helm chart for Argo CD Image Updater, a tool to automatically update the container images of Kubernetes workloads which are managed by Argo CD
|
||||||
type: application
|
type: application
|
||||||
version: 0.11.4
|
version: 0.12.0
|
||||||
appVersion: v0.15.2
|
appVersion: v0.15.2
|
||||||
home: https://github.com/argoproj-labs/argocd-image-updater
|
home: https://github.com/argoproj-labs/argocd-image-updater
|
||||||
icon: https://argocd-image-updater.readthedocs.io/en/stable/assets/logo.png
|
icon: https://argocd-image-updater.readthedocs.io/en/stable/assets/logo.png
|
||||||
|
@ -19,4 +19,4 @@ annotations:
|
||||||
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
|
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
|
||||||
artifacthub.io/changes: |
|
artifacthub.io/changes: |
|
||||||
- kind: changed
|
- kind: changed
|
||||||
description: Bump argocd-image-updater to v0.15.2
|
description: ConfigMap and Secret names are now configurable
|
||||||
|
|
|
@ -70,6 +70,7 @@ The `config.registries` value can be used exactly as it looks in the documentati
|
||||||
|-----|------|---------|-------------|
|
|-----|------|---------|-------------|
|
||||||
| affinity | object | `{}` | Kubernetes affinity settings for the deployment |
|
| affinity | object | `{}` | Kubernetes affinity settings for the deployment |
|
||||||
| authScripts.enabled | bool | `false` | Whether to mount the defined scripts that can be used to authenticate with a registry, the scripts will be mounted at `/scripts` |
|
| authScripts.enabled | bool | `false` | Whether to mount the defined scripts that can be used to authenticate with a registry, the scripts will be mounted at `/scripts` |
|
||||||
|
| authScripts.name | string | `"argocd-image-updater-authscripts"` | Name of the authentication scripts ConfigMap |
|
||||||
| authScripts.scripts | object | `{}` | Map of key-value pairs where the key consists of the name of the script and the value the contents |
|
| authScripts.scripts | object | `{}` | Map of key-value pairs where the key consists of the name of the script and the value the contents |
|
||||||
| config.applicationsAPIKind | string | `""` | API kind that is used to manage Argo CD applications (`kubernetes` or `argocd`) |
|
| config.applicationsAPIKind | string | `""` | API kind that is used to manage Argo CD applications (`kubernetes` or `argocd`) |
|
||||||
| config.argocd.grpcWeb | bool | `true` | Use the gRPC-web protocol to connect to the Argo CD API |
|
| config.argocd.grpcWeb | bool | `true` | Use the gRPC-web protocol to connect to the Argo CD API |
|
||||||
|
@ -77,6 +78,7 @@ The `config.registries` value can be used exactly as it looks in the documentati
|
||||||
| config.argocd.plaintext | bool | `false` | If specified, use an unencrypted HTTP connection to the Argo CD API instead of TLS. |
|
| config.argocd.plaintext | bool | `false` | If specified, use an unencrypted HTTP connection to the Argo CD API instead of TLS. |
|
||||||
| config.argocd.serverAddress | string | `""` | Connect to the Argo CD API server at server address |
|
| config.argocd.serverAddress | string | `""` | Connect to the Argo CD API server at server address |
|
||||||
| config.argocd.token | string | `""` | If specified, the secret with Argo CD API key will be created. |
|
| config.argocd.token | string | `""` | If specified, the secret with Argo CD API key will be created. |
|
||||||
|
| config.argocd.tokenSecretName | string | `"argocd-image-updater-secret"` | Name of the Secret containing the token |
|
||||||
| config.disableKubeEvents | bool | `false` | Disable kubernetes events |
|
| config.disableKubeEvents | bool | `false` | Disable kubernetes events |
|
||||||
| config.gitCommitMail | string | `""` | E-Mail address to use for Git commits |
|
| config.gitCommitMail | string | `""` | E-Mail address to use for Git commits |
|
||||||
| config.gitCommitSignOff | bool | `false` | Enables sign off on commits |
|
| config.gitCommitSignOff | bool | `false` | Enables sign off on commits |
|
||||||
|
@ -85,8 +87,10 @@ The `config.registries` value can be used exactly as it looks in the documentati
|
||||||
| config.gitCommitTemplate | string | `""` | Changing the Git commit message |
|
| config.gitCommitTemplate | string | `""` | Changing the Git commit message |
|
||||||
| config.gitCommitUser | string | `""` | Username to use for Git commits |
|
| config.gitCommitUser | string | `""` | Username to use for Git commits |
|
||||||
| config.logLevel | string | `"info"` | Argo CD Image Update log level |
|
| config.logLevel | string | `"info"` | Argo CD Image Update log level |
|
||||||
|
| config.name | string | `"argocd-image-updater-config"` | Name of the ConfigMap |
|
||||||
| config.registries | list | `[]` | Argo CD Image Updater registries list configuration. More information [here](https://argocd-image-updater.readthedocs.io/en/stable/configuration/registries/) |
|
| config.registries | list | `[]` | Argo CD Image Updater registries list configuration. More information [here](https://argocd-image-updater.readthedocs.io/en/stable/configuration/registries/) |
|
||||||
| config.sshConfig | object | `{}` | Argo CD Image Updater ssh client parameter configuration. |
|
| config.sshConfig.config | string | `""` | Argo CD Image Updater ssh client parameter configuration. |
|
||||||
|
| config.sshConfig.name | string | `"argocd-image-updater-ssh-config"` | Name of the sshConfig ConfigMap |
|
||||||
| createClusterRoles | bool | `true` | Create cluster roles for cluster-wide installation. |
|
| createClusterRoles | bool | `true` | Create cluster roles for cluster-wide installation. |
|
||||||
| extraArgs | list | `[]` | Extra arguments for argocd-image-updater not defined in `config.argocd`. If a flag contains both key and value, they need to be split to a new entry |
|
| extraArgs | list | `[]` | Extra arguments for argocd-image-updater not defined in `config.argocd`. If a flag contains both key and value, they need to be split to a new entry |
|
||||||
| extraEnv | list | `[]` | Extra environment variables for argocd-image-updater |
|
| extraEnv | list | `[]` | Extra environment variables for argocd-image-updater |
|
||||||
|
|
|
@ -4,7 +4,7 @@ kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
{{- include "argocd-image-updater.labels" . | nindent 4 }}
|
{{- include "argocd-image-updater.labels" . | nindent 4 }}
|
||||||
name: argocd-image-updater-authscripts
|
name: {{ .Values.authScripts.name }}
|
||||||
namespace: {{ include "argocd-image-updater.namespace" . | quote }}
|
namespace: {{ include "argocd-image-updater.namespace" . | quote }}
|
||||||
data:
|
data:
|
||||||
{{- toYaml .Values.authScripts.scripts | nindent 2}}
|
{{- toYaml .Values.authScripts.scripts | nindent 2}}
|
||||||
|
|
|
@ -1,11 +1,17 @@
|
||||||
|
{{- $sshConfig := omit .Values.config.sshConfig "name" }}
|
||||||
|
{{- range $key, $val := $sshConfig }}
|
||||||
|
{{- if not $val }}
|
||||||
|
{{ $_ := unset $sshConfig $key }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
{{- include "argocd-image-updater.labels" . | nindent 4 }}
|
{{- include "argocd-image-updater.labels" . | nindent 4 }}
|
||||||
name: argocd-image-updater-ssh-config
|
name: {{ .Values.config.sshConfig.name }}
|
||||||
namespace: {{ include "argocd-image-updater.namespace" . | quote }}
|
namespace: {{ include "argocd-image-updater.namespace" . | quote }}
|
||||||
{{- with .Values.config.sshConfig }}
|
{{- with $sshConfig }}
|
||||||
data:
|
data:
|
||||||
{{- toYaml . | nindent 2 }}
|
{{- toYaml . | nindent 2 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -4,7 +4,7 @@ kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
{{- include "argocd-image-updater.labels" . | nindent 4 }}
|
{{- include "argocd-image-updater.labels" . | nindent 4 }}
|
||||||
name: argocd-image-updater-config
|
name: {{ .Values.config.name }}
|
||||||
namespace: {{ include "argocd-image-updater.namespace" . | quote }}
|
namespace: {{ include "argocd-image-updater.namespace" . | quote }}
|
||||||
data:
|
data:
|
||||||
{{- with .Values.config.applicationsAPIKind }}
|
{{- with .Values.config.applicationsAPIKind }}
|
||||||
|
|
|
@ -44,79 +44,79 @@ spec:
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
key: applications_api
|
key: applications_api
|
||||||
name: argocd-image-updater-config
|
name: {{ .Values.config.name }}
|
||||||
optional: true
|
optional: true
|
||||||
- name: ARGOCD_GRPC_WEB
|
- name: ARGOCD_GRPC_WEB
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
key: argocd.grpc_web
|
key: argocd.grpc_web
|
||||||
name: argocd-image-updater-config
|
name: {{ .Values.config.name }}
|
||||||
optional: true
|
optional: true
|
||||||
- name: ARGOCD_SERVER
|
- name: ARGOCD_SERVER
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
key: argocd.server_addr
|
key: argocd.server_addr
|
||||||
name: argocd-image-updater-config
|
name: {{ .Values.config.name }}
|
||||||
optional: true
|
optional: true
|
||||||
- name: ARGOCD_INSECURE
|
- name: ARGOCD_INSECURE
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
key: argocd.insecure
|
key: argocd.insecure
|
||||||
name: argocd-image-updater-config
|
name: {{ .Values.config.name }}
|
||||||
optional: true
|
optional: true
|
||||||
- name: ARGOCD_PLAINTEXT
|
- name: ARGOCD_PLAINTEXT
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
key: argocd.plaintext
|
key: argocd.plaintext
|
||||||
name: argocd-image-updater-config
|
name: {{ .Values.config.name }}
|
||||||
optional: true
|
optional: true
|
||||||
- name: ARGOCD_TOKEN
|
- name: ARGOCD_TOKEN
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
key: argocd.token
|
key: argocd.token
|
||||||
name: argocd-image-updater-secret
|
name: {{ .Values.config.argocd.tokenSecretName }}
|
||||||
optional: true
|
optional: true
|
||||||
- name: IMAGE_UPDATER_LOGLEVEL
|
- name: IMAGE_UPDATER_LOGLEVEL
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
key: log.level
|
key: log.level
|
||||||
name: argocd-image-updater-config
|
name: {{ .Values.config.name }}
|
||||||
optional: true
|
optional: true
|
||||||
- name: GIT_COMMIT_USER
|
- name: GIT_COMMIT_USER
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
key: git.user
|
key: git.user
|
||||||
name: argocd-image-updater-config
|
name: {{ .Values.config.name }}
|
||||||
optional: true
|
optional: true
|
||||||
- name: GIT_COMMIT_EMAIL
|
- name: GIT_COMMIT_EMAIL
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
key: git.email
|
key: git.email
|
||||||
name: argocd-image-updater-config
|
name: {{ .Values.config.name }}
|
||||||
optional: true
|
optional: true
|
||||||
- name: IMAGE_UPDATER_KUBE_EVENTS
|
- name: IMAGE_UPDATER_KUBE_EVENTS
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
key: kube.events
|
key: kube.events
|
||||||
name: argocd-image-updater-config
|
name: {{ .Values.config.name }}
|
||||||
optional: true
|
optional: true
|
||||||
- name: GIT_COMMIT_SIGNING_KEY
|
- name: GIT_COMMIT_SIGNING_KEY
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
key: git.commit-signing-key
|
key: git.commit-signing-key
|
||||||
name: argocd-image-updater-config
|
name: {{ .Values.config.name }}
|
||||||
optional: true
|
optional: true
|
||||||
- name: GIT_COMMIT_SIGNING_METHOD
|
- name: GIT_COMMIT_SIGNING_METHOD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
key: git.commit-signing-method
|
key: git.commit-signing-method
|
||||||
name: argocd-image-updater-config
|
name: {{ .Values.config.name }}
|
||||||
optional: true
|
optional: true
|
||||||
- name: GIT_COMMIT_SIGN_OFF
|
- name: GIT_COMMIT_SIGN_OFF
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
key: git.commit-sign-off
|
key: git.commit-sign-off
|
||||||
name: argocd-image-updater-config
|
name: {{ .Values.config.name }}
|
||||||
optional: true
|
optional: true
|
||||||
{{- with .Values.extraEnv }}
|
{{- with .Values.extraEnv }}
|
||||||
{{- toYaml . | nindent 10 }}
|
{{- toYaml . | nindent 10 }}
|
||||||
|
@ -177,13 +177,13 @@ spec:
|
||||||
path: registries.conf
|
path: registries.conf
|
||||||
- key: git.commit-message-template
|
- key: git.commit-message-template
|
||||||
path: commit.template
|
path: commit.template
|
||||||
name: argocd-image-updater-config
|
name: {{ .Values.config.name }}
|
||||||
optional: true
|
optional: true
|
||||||
name: image-updater-conf
|
name: image-updater-conf
|
||||||
{{- if .Values.authScripts.enabled }}
|
{{- if .Values.authScripts.enabled }}
|
||||||
- configMap:
|
- configMap:
|
||||||
defaultMode: 0777
|
defaultMode: 0777
|
||||||
name: argocd-image-updater-authscripts
|
name: {{ .Values.authScripts.name }}
|
||||||
name: authscripts
|
name: authscripts
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- configMap:
|
- configMap:
|
||||||
|
@ -191,7 +191,7 @@ spec:
|
||||||
optional: true
|
optional: true
|
||||||
name: ssh-known-hosts
|
name: ssh-known-hosts
|
||||||
- configMap:
|
- configMap:
|
||||||
name: argocd-image-updater-ssh-config
|
name: {{ .Values.config.sshConfig.name }}
|
||||||
optional: true
|
optional: true
|
||||||
name: ssh-config
|
name: ssh-config
|
||||||
- name: ssh-signing-key
|
- name: ssh-signing-key
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: argocd-image-updater-secret
|
name: {{ .Values.config.argocd.tokenSecretName }}
|
||||||
namespace: {{ include "argocd-image-updater.namespace" . | quote }}
|
namespace: {{ include "argocd-image-updater.namespace" . | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "argocd-image-updater.labels" . | nindent 4 }}
|
{{- include "argocd-image-updater.labels" . | nindent 4 }}
|
||||||
|
|
|
@ -109,6 +109,8 @@ volumes: []
|
||||||
# emptyDir: {}
|
# emptyDir: {}
|
||||||
|
|
||||||
config:
|
config:
|
||||||
|
# -- Name of the ConfigMap
|
||||||
|
name: argocd-image-updater-config
|
||||||
# -- API kind that is used to manage Argo CD applications (`kubernetes` or `argocd`)
|
# -- API kind that is used to manage Argo CD applications (`kubernetes` or `argocd`)
|
||||||
applicationsAPIKind: ""
|
applicationsAPIKind: ""
|
||||||
|
|
||||||
|
@ -125,6 +127,8 @@ config:
|
||||||
plaintext: false
|
plaintext: false
|
||||||
# -- If specified, the secret with Argo CD API key will be created.
|
# -- If specified, the secret with Argo CD API key will be created.
|
||||||
token: ""
|
token: ""
|
||||||
|
# -- Name of the Secret containing the token
|
||||||
|
tokenSecretName: "argocd-image-updater-secret"
|
||||||
|
|
||||||
# -- Disable kubernetes events
|
# -- Disable kubernetes events
|
||||||
disableKubeEvents: false
|
disableKubeEvents: false
|
||||||
|
@ -175,9 +179,11 @@ config:
|
||||||
# credentials: ext:/scripts/auth1.sh
|
# credentials: ext:/scripts/auth1.sh
|
||||||
# credsexpire: 10h
|
# credsexpire: 10h
|
||||||
|
|
||||||
# -- Argo CD Image Updater ssh client parameter configuration.
|
|
||||||
sshConfig:
|
sshConfig:
|
||||||
{}
|
# -- Name of the sshConfig ConfigMap
|
||||||
|
name: argocd-image-updater-ssh-config
|
||||||
|
# -- Argo CD Image Updater ssh client parameter configuration.
|
||||||
|
config: ""
|
||||||
# config: |
|
# config: |
|
||||||
# Host *
|
# Host *
|
||||||
# PubkeyAcceptedAlgorithms +ssh-rsa
|
# PubkeyAcceptedAlgorithms +ssh-rsa
|
||||||
|
@ -188,6 +194,8 @@ config:
|
||||||
authScripts:
|
authScripts:
|
||||||
# -- Whether to mount the defined scripts that can be used to authenticate with a registry, the scripts will be mounted at `/scripts`
|
# -- Whether to mount the defined scripts that can be used to authenticate with a registry, the scripts will be mounted at `/scripts`
|
||||||
enabled: false
|
enabled: false
|
||||||
|
# -- Name of the authentication scripts ConfigMap
|
||||||
|
name: argocd-image-updater-authscripts
|
||||||
# -- Map of key-value pairs where the key consists of the name of the script and the value the contents
|
# -- Map of key-value pairs where the key consists of the name of the script and the value the contents
|
||||||
scripts: {}
|
scripts: {}
|
||||||
# auth1.sh: |
|
# auth1.sh: |
|
||||||
|
|
Loading…
Reference in a new issue