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

Provide ability to specify kustomize controller envFrom values #36

Closed
wants to merge 13 commits into from
Closed
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
2 changes: 1 addition & 1 deletion charts/flux2/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ name: flux2
description: A Helm chart for flux2

type: application
version: "0.7.0"
version: "0.7.1"

appVersion: "0.24.0"
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.7.0](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.24.0](https://img.shields.io/badge/AppVersion-0.24.0-informational?style=flat-square)
![Version: 0.7.1](https://img.shields.io/badge/Version-0.7.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.24.0](https://img.shields.io/badge/AppVersion-0.24.0-informational?style=flat-square)

A Helm chart for flux2

Expand Down Expand Up @@ -64,6 +64,7 @@ A Helm chart for flux2
| kustomizecontroller.annotations."prometheus.io/port" | string | `"8080"` | |
| kustomizecontroller.annotations."prometheus.io/scrape" | string | `"true"` | |
| kustomizecontroller.create | bool | `true` | |
| kustomizecontroller.envFrom | object | `{"map":{"name":""},"secret":{"name":""}}` | Defines envFrom using a configmap and/or secret. |
| kustomizecontroller.extraSecretMounts | list | `[]` | Defines additional mounts with secrets. Secrets must be manually created in the namespace or with kustomizecontroller.secret |
| kustomizecontroller.image | string | `"ghcr.io/fluxcd/kustomize-controller"` | |
| kustomizecontroller.labels | object | `{}` | |
Expand Down
11 changes: 11 additions & 0 deletions charts/flux2/templates/kustomize-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if or (.Values.kustomizecontroller.envFrom.map.name) (.Values.kustomizecontroller.envFrom.secret.name) }}
envFrom:
{{- if .Values.kustomizecontroller.envFrom.map.name }}
- configMapRef:
name: {{ .Values.kustomizecontroller.envFrom.map.name }}
{{- end }}
{{- if .Values.kustomizecontroller.envFrom.secret.name }}
- secretRef:
name: {{ .Values.kustomizecontroller.envFrom.secret.name }}
{{- end }}
{{- end }}
image: {{ .Values.kustomizecontroller.image }}:{{ .Values.kustomizecontroller.tag }}
imagePullPolicy: IfNotPresent
livenessProbe:
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.0
control-plane: controller
helm.sh/chart: flux2-0.7.0
helm.sh/chart: flux2-0.7.1
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.0
control-plane: controller
helm.sh/chart: flux2-0.7.0
helm.sh/chart: flux2-0.7.1
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.0
control-plane: controller
helm.sh/chart: flux2-0.7.0
helm.sh/chart: flux2-0.7.1
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.0
helm.sh/chart: flux2-0.7.0
helm.sh/chart: flux2-0.7.1
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.0
control-plane: controller
helm.sh/chart: flux2-0.7.0
helm.sh/chart: flux2-0.7.1
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.0
control-plane: controller
helm.sh/chart: flux2-0.7.0
helm.sh/chart: flux2-0.7.1
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.0
control-plane: controller
helm.sh/chart: flux2-0.7.0
helm.sh/chart: flux2-0.7.1
name: source-controller
spec:
replicas: 1
Expand Down
6 changes: 6 additions & 0 deletions charts/flux2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ kustomizecontroller:
nodeSelector: {}
affinity: {}
tolerations: []
# -- Defines envFrom using a configmap and/or secret.
envFrom:
map:
name: ""
secret:
name: ""

notificationcontroller:
create: true
Expand Down