Skip to content

Commit

Permalink
feat(argocd-image-updater): Add missing config map key for git commit…
Browse files Browse the repository at this point in the history
…-message-template (argoproj#986)

* [v0.2.2] Add missing config map key for git commit-message-template

Signed-off-by: Niklas Jönsson <[email protected]>

* Sync some other things from upstream manifests

Signed-off-by: Marco Kilchhofer <[email protected]>

* Quote bools

Signed-off-by: Marco Kilchhofer <[email protected]>

* fix: Rerun helm-docs

Signed-off-by: Marco Kilchhofer <[email protected]>

Co-authored-by: Marco Kilchhofer <[email protected]>
  • Loading branch information
nickjn92 and mkilchhofer authored Nov 22, 2021
1 parent bdb42a5 commit aa41896
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 11 deletions.
4 changes: 2 additions & 2 deletions charts/argocd-image-updater/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
7 changes: 6 additions & 1 deletion charts/argocd-image-updater/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion charts/argocd-image-updater/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
23 changes: 23 additions & 0 deletions charts/argocd-image-updater/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
61 changes: 54 additions & 7 deletions charts/argocd-image-updater/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,66 @@ 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:
key: argocd.token
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 }}
Expand Down Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
15 changes: 15 additions & 0 deletions charts/argocd-image-updater/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

Expand Down

0 comments on commit aa41896

Please sign in to comment.