Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(argocd-image-updater): Add parameter to chose namespaced or clusterwide mode #2879

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 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.11.0
version: 0.11.1
appVersion: v0.14.0
home: https://github.com/argoproj-labs/argocd-image-updater
icon: https://argocd-image-updater.readthedocs.io/en/stable/assets/logo.png
Expand All @@ -18,5 +18,5 @@ annotations:
fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
artifacthub.io/changes: |
- kind: changed
description: Bump argocd-image-updater to v0.14.0
- kind: added
description: parameter for namespaced/clusterwide behavior
1 change: 1 addition & 0 deletions charts/argocd-image-updater/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ The `config.registries` value can be used exactly as it looks in the documentati
| config.gitCommitTemplate | string | `""` | Changing the Git commit message |
| config.gitCommitUser | string | `""` | Username to use for Git commits |
| config.logLevel | string | `"info"` | Argo CD Image Update log level |
| config.namespaced | string | `"true"` | Check annotations in ArgoCD namespace only (if true) or in all namespaces (if false) |
| 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. |
| 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
36 changes: 36 additions & 0 deletions charts/argocd-image-updater/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{{- if .Values.rbac.enabled }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: argocd-image-updater-clusterrole
labels:
{{ include "argocd-image-updater.labels" . | nindent 4 }}
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- delete
- get
- patch
- list
- watch
- apiGroups:
- ""
resources:
- applications
- applicationsets
verbs:
- get
- list
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- create
{{- end }}
17 changes: 17 additions & 0 deletions charts/argocd-image-updater/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.rbac.enabled }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: argocd-image-updater-clusterrolebinding
labels:
{{ include "argocd-image-updater.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: argocd-image-updater-clusterrole
subjects:
- kind: ServiceAccount
name: {{ include "argocd-image-updater.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
1 change: 1 addition & 0 deletions charts/argocd-image-updater/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ data:
registries:
{{- toYaml . | nindent 6 }}
{{- end }}
namespaced: {{ .Values.config.namespaced | quote }}
6 changes: 6 additions & 0 deletions charts/argocd-image-updater/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ spec:
key: git.commit-sign-off
name: argocd-image-updater-config
optional: true
- name: IMAGE_UPDATER_NAMESPACED
valueFrom:
configMapKeyRef:
key: namespaced
name: argocd-image-updater-config
optional: true
{{- with .Values.extraEnv }}
{{- toYaml . | nindent 10 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/argocd-image-updater/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ config:
# -- Argo CD Image Update log level
logLevel: "info"

# -- Check annotations in ArgoCD namespace only (if true) or in all namespaces (if false)
namespaced : "true"

# -- Argo CD Image Updater registries list configuration. More information [here](https://argocd-image-updater.readthedocs.io/en/stable/configuration/registries/)
registries: []
# - name: Docker Hub
Expand Down