Skip to content

Commit

Permalink
support setting of imagePullSecrets for all controllers fluxcd-commun…
Browse files Browse the repository at this point in the history
…ity#53

Example helm cli usage to provide an imagePullSecret

```
helm ... --set "imagePullSecrets[0].name=secret1"
```

Signed-off-by: Robert R Allen <[email protected]>
  • Loading branch information
Robert R Allen committed Dec 20, 2021
1 parent 9df6962 commit 98e4cf8
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/flux2/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: flux2
description: A Helm chart for flux2
type: application
version: 0.8.2
version: 0.8.3
appVersion: 0.24.1
3 changes: 2 additions & 1 deletion charts/flux2/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flux2

![Version: 0.8.2](https://img.shields.io/badge/Version-0.8.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.24.1](https://img.shields.io/badge/AppVersion-0.24.1-informational?style=flat-square)
![Version: 0.8.3](https://img.shields.io/badge/Version-0.8.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.24.1](https://img.shields.io/badge/AppVersion-0.24.1-informational?style=flat-square)

A Helm chart for flux2

Expand Down Expand Up @@ -29,6 +29,7 @@ A Helm chart for flux2
| helmcontroller.serviceaccount.create | bool | `true` | |
| helmcontroller.tag | string | `"v0.14.1"` | |
| helmcontroller.tolerations | list | `[]` | |
| imagePullSecrets | list | `[]` | contents of pod imagePullSecret in form 'name=[secretName]'; applied to all controllers |
| imageautomationcontroller.affinity | object | `{}` | |
| imageautomationcontroller.annotations."prometheus.io/port" | string | `"8080"` | |
| imageautomationcontroller.annotations."prometheus.io/scrape" | string | `"true"` | |
Expand Down
3 changes: 3 additions & 0 deletions charts/flux2/templates/helm-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ spec:
{{- toYaml .Values.helmcontroller.volumeMounts | nindent 8 }}
{{- end}}
serviceAccountName: helm-controller
{{- if .Values.imagePullSecrets }}
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 6 }}
{{- end }}
terminationGracePeriodSeconds: 600
volumes:
- emptyDir: {}
Expand Down
3 changes: 3 additions & 0 deletions charts/flux2/templates/image-automation-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ spec:
securityContext:
fsGroup: 1337
serviceAccountName: image-automation-controller
{{- if .Values.imagePullSecrets }}
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 6 }}
{{- end }}
terminationGracePeriodSeconds: 10
volumes:
- emptyDir: {}
Expand Down
3 changes: 3 additions & 0 deletions charts/flux2/templates/image-reflector-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ spec:
securityContext:
fsGroup: 1337
serviceAccountName: image-reflector-controller
{{- if .Values.imagePullSecrets }}
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 6 }}
{{- end }}
terminationGracePeriodSeconds: 10
volumes:
- emptyDir: {}
Expand Down
3 changes: 3 additions & 0 deletions charts/flux2/templates/kustomize-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ spec:
securityContext:
fsGroup: 1337
serviceAccountName: kustomize-controller
{{- if .Values.imagePullSecrets }}
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 6 }}
{{- end }}
terminationGracePeriodSeconds: 60
volumes:
- emptyDir: {}
Expand Down
3 changes: 3 additions & 0 deletions charts/flux2/templates/notification-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ spec:
{{- toYaml .Values.notificationcontroller.volumeMounts | nindent 8 }}
{{- end}}
serviceAccountName: notification-controller
{{- if .Values.imagePullSecrets }}
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 6 }}
{{- end }}
terminationGracePeriodSeconds: 10
volumes:
- emptyDir: {}
Expand Down
3 changes: 3 additions & 0 deletions charts/flux2/templates/source-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ spec:
securityContext:
fsGroup: 1337
serviceAccountName: source-controller
{{- if .Values.imagePullSecrets }}
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 6 }}
{{- end }}
terminationGracePeriodSeconds: 10
volumes:
- emptyDir: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 0.24.1
control-plane: controller
helm.sh/chart: flux2-0.8.2
helm.sh/chart: flux2-0.8.3
name: helm-controller
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 0.24.1
control-plane: controller
helm.sh/chart: flux2-0.8.2
helm.sh/chart: flux2-0.8.3
name: image-automation-controller
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 0.24.1
control-plane: controller
helm.sh/chart: flux2-0.8.2
helm.sh/chart: flux2-0.8.3
name: image-reflector-controller
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 0.24.1
helm.sh/chart: flux2-0.8.2
helm.sh/chart: flux2-0.8.3
name: test1
namespace: NAMESPACE
type: Opaque
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 0.24.1
control-plane: controller
helm.sh/chart: flux2-0.8.2
helm.sh/chart: flux2-0.8.3
name: kustomize-controller
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 0.24.1
control-plane: controller
helm.sh/chart: flux2-0.8.2
helm.sh/chart: flux2-0.8.3
name: notification-controller
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 0.24.1
control-plane: controller
helm.sh/chart: flux2-0.8.2
helm.sh/chart: flux2-0.8.3
name: source-controller
spec:
replicas: 1
Expand Down
3 changes: 3 additions & 0 deletions charts/flux2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,6 @@ rbac:
create: true

watchallnamespaces: true

# -- contents of pod imagePullSecret in form 'name=[secretName]'; applied to all controllers
imagePullSecrets: []

0 comments on commit 98e4cf8

Please sign in to comment.