diff --git a/charts/argocd-image-updater/Chart.yaml b/charts/argocd-image-updater/Chart.yaml index d9ca894a..17601f76 100644 --- a/charts/argocd-image-updater/Chart.yaml +++ b/charts/argocd-image-updater/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 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 type: application -version: 0.4.1 +version: 0.4.2 appVersion: v0.10.3 home: https://github.com/argoproj-labs/argocd-image-updater icon: https://argocd-image-updater.readthedocs.io/en/stable/assets/logo.png @@ -15,4 +15,4 @@ maintainers: url: https://argoproj.github.io/ annotations: artifacthub.io/changes: | - - "[Changed]: Bumped application version to v0.10.3" + - "[Fixed]: Added missing git-template-message key to deployment configMap" diff --git a/charts/argocd-image-updater/README.md b/charts/argocd-image-updater/README.md index ee5f8f52..e1223139 100644 --- a/charts/argocd-image-updater/README.md +++ b/charts/argocd-image-updater/README.md @@ -61,11 +61,16 @@ The `config.registries` value can be used exactly as it looks in the documentati |-----|------|---------|-------------| | 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.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.argocd.grpcWeb | bool | `true` | Use the gRPC-web protocol to connect to the Argo CD API | | config.argocd.insecure | bool | `false` | If specified, the certificate of the Argo CD API server is not verified. | | config.argocd.plaintext | bool | `false` | If specified, use an unencrypted HTTP connection to the ArgoCD API instead of TLS. | | config.argocd.serverAddress | string | `""` | Connect to the Argo CD API server at server address | +| config.disableKubeEvents | bool | `false` | Disable kubernetes events | +| config.gitCommitMail | string | `""` | E-Mail address to use for Git commits | +| config.gitCommitTemplate | string | `""` | Changing the Git commit message | +| config.gitCommitUser | string | `""` | Username to use for Git commits | | config.logLevel | string | `"info"` | ArgoCD Image Update log level | | config.registries | list | `[]` | ArgoCD Image Updater registries list configuration. More information [here](https://argocd-image-updater.readthedocs.io/en/stable/configuration/registries/) | | 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 | diff --git a/charts/argocd-image-updater/README.md.gotmpl b/charts/argocd-image-updater/README.md.gotmpl index da81914b..afefdafe 100644 --- a/charts/argocd-image-updater/README.md.gotmpl +++ b/charts/argocd-image-updater/README.md.gotmpl @@ -51,7 +51,7 @@ ArgoCD Image Updater natively supports the following registries (as mentioned in - GitHub Container Registry - GitHub Docker Packages -If you need support for ECR, you can reference [this issue](https://github.com/argoproj-labs/argocd-image-updater/issues/112) for configuration. +If you need support for ECR, you can reference [this issue](https://github.com/argoproj-labs/argocd-image-updater/issues/112) for configuration. You can use the `authScripts` values to configure the scripts that are needed to authenticate with ECR. The `config.registries` value can be used exactly as it looks in the documentation as it gets dumped directly into a configmap in this chart. diff --git a/charts/argocd-image-updater/templates/configmap.yaml b/charts/argocd-image-updater/templates/configmap.yaml index dab468a2..0e0b6cfc 100644 --- a/charts/argocd-image-updater/templates/configmap.yaml +++ b/charts/argocd-image-updater/templates/configmap.yaml @@ -6,6 +6,29 @@ metadata: {{- include "argocd-image-updater.labels" . | nindent 4 }} name: argocd-image-updater-config data: + {{- with .Values.config.applicationsAPIKind }} + applications_api: {{ . }} + {{- end }} + argocd.grpc_web: {{ .Values.config.argocd.grpcWeb | quote }} + {{- with .Values.config.argocd.serverAddress }} + argocd.server_addr: {{ . }} + {{- end }} + argocd.insecure: {{ .Values.config.argocd.insecure | quote }} + argocd.plaintext: {{ .Values.config.argocd.plaintext | quote }} + {{- with .Values.config.logLevel }} + log.level: {{ . }} + {{- end }} + {{- with .Values.config.gitCommitUser }} + git.user: {{ . }} + {{- end }} + {{- with .Values.config.gitCommitMail }} + git.email: {{ . }} + {{- end }} + {{- with .Values.config.gitCommitTemplate }} + git.commit-message-template: | + {{- nindent 4 . }} + {{- end }} + kube.events: {{ .Values.config.disableKubeEvents | quote }} registries.conf: | {{- with .Values.config.registries }} registries: diff --git a/charts/argocd-image-updater/templates/deployment.yaml b/charts/argocd-image-updater/templates/deployment.yaml index b503444d..d975747d 100644 --- a/charts/argocd-image-updater/templates/deployment.yaml +++ b/charts/argocd-image-updater/templates/deployment.yaml @@ -35,14 +35,36 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} env: + - name: APPLICATIONS_API + valueFrom: + configMapKeyRef: + key: applications_api + name: argocd-image-updater-config + optional: true - name: ARGOCD_GRPC_WEB - value: {{ .Values.config.argocd.grpcWeb | quote }} + valueFrom: + configMapKeyRef: + key: argocd.grpc_web + name: argocd-image-updater-config + optional: true - name: ARGOCD_SERVER - value: {{ .Values.config.argocd.serverAddress }} + valueFrom: + configMapKeyRef: + key: argocd.server_addr + name: argocd-image-updater-config + optional: true - name: ARGOCD_INSECURE - value: {{ .Values.config.argocd.insecure | quote }} + valueFrom: + configMapKeyRef: + key: argocd.insecure + name: argocd-image-updater-config + optional: true - name: ARGOCD_PLAINTEXT - value: {{ .Values.config.argocd.plaintext | quote }} + valueFrom: + configMapKeyRef: + key: argocd.plaintext + name: argocd-image-updater-config + optional: true - name: ARGOCD_TOKEN valueFrom: secretKeyRef: @@ -50,7 +72,29 @@ spec: name: argocd-image-updater-secret optional: true - name: IMAGE_UPDATER_LOGLEVEL - value: {{ .Values.config.logLevel }} + valueFrom: + configMapKeyRef: + key: log.level + name: argocd-image-updater-config + optional: true + - name: GIT_COMMIT_USER + valueFrom: + configMapKeyRef: + key: git.user + name: argocd-image-updater-config + optional: true + - name: GIT_COMMIT_EMAIL + valueFrom: + configMapKeyRef: + key: git.email + name: argocd-image-updater-config + optional: true + - name: IMAGE_UPDATER_KUBE_EVENTS + valueFrom: + configMapKeyRef: + key: kube.events + name: argocd-image-updater-config + optional: true {{- with .Values.extraEnv }} {{- toYaml . | nindent 10 }} {{- end }} @@ -81,7 +125,7 @@ spec: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - mountPath: /app/config - name: registries-conf + name: image-updater-conf - mountPath: /tmp name: tmp-dir {{- if .Values.authScripts.enabled }} @@ -93,8 +137,11 @@ spec: items: - key: registries.conf path: registries.conf + - key: git.commit-message-template + path: commit.template name: argocd-image-updater-config - name: registries-conf + optional: true + name: image-updater-conf {{- if .Values.authScripts.enabled }} - configMap: defaultMode: 0777 diff --git a/charts/argocd-image-updater/values.yaml b/charts/argocd-image-updater/values.yaml index b511a35c..460006dc 100644 --- a/charts/argocd-image-updater/values.yaml +++ b/charts/argocd-image-updater/values.yaml @@ -40,6 +40,9 @@ extraEnv: [] # value: "us-west-1" config: + # -- API kind that is used to manage Argo CD applications (`kubernetes` or `argocd`) + applicationsAPIKind: "" + # Described in detail here https://argocd-image-updater.readthedocs.io/en/stable/install/running/#flags argocd: # -- Use the gRPC-web protocol to connect to the Argo CD API @@ -51,6 +54,18 @@ config: # -- If specified, use an unencrypted HTTP connection to the ArgoCD API instead of TLS. plaintext: false + # -- Disable kubernetes events + disableKubeEvents: false + + # -- Username to use for Git commits + gitCommitUser: "" + + # -- E-Mail address to use for Git commits + gitCommitMail: "" + + # -- Changing the Git commit message + gitCommitTemplate: "" + # -- ArgoCD Image Update log level logLevel: "info"