Skip to content
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
4 changes: 2 additions & 2 deletions charts/flux2/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
annotations:
artifacthub.io/changes: |
- "[Chore]: Update App Version to upstream 2.5.1"
- "[feat]: Add ability to override namespace"
apiVersion: v2
appVersion: 2.5.1
description: A Helm chart for flux2
name: flux2
sources:
- https://github.com/fluxcd-community/helm-charts
type: application
version: 2.15.0
version: 2.16.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: 2.15.0](https://img.shields.io/badge/Version-2.15.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.5.1](https://img.shields.io/badge/AppVersion-2.5.1-informational?style=flat-square)
![Version: 2.16.0](https://img.shields.io/badge/Version-2.16.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.5.1](https://img.shields.io/badge/AppVersion-2.5.1-informational?style=flat-square)

A Helm chart for flux2

Expand Down Expand Up @@ -111,6 +111,7 @@ This helm chart is maintained and released by the fluxcd-community on a best eff
| multitenancy.defaultServiceAccount | string | `"default"` | All Kustomizations and HelmReleases which don’t have spec.serviceAccountName specified, will use the default account from the tenant’s namespace. Tenants have to specify a service account in their Flux resources to be able to deploy workloads in their namespaces as the default account has no permissions. |
| multitenancy.enabled | bool | `false` | Implement the patches for Multi-tenancy lockdown. See https://fluxcd.io/docs/installation/#multi-tenancy-lockdown |
| multitenancy.privileged | bool | `true` | Both kustomize-controller and helm-controller service accounts run privileged with cluster-admin ClusterRoleBinding. Disable if you want to run them with a minimum set of permissions. |
| namespace | string | `""` | |
| notificationController.affinity | object | `{}` | |
| notificationController.annotations."prometheus.io/port" | string | `"8080"` | |
| notificationController.annotations."prometheus.io/scrape" | string | `"true"` | |
Expand Down
11 changes: 11 additions & 0 deletions charts/flux2/templates/_helper.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,14 @@
{{- printf "%s:%s" .image .tag -}}
{{- end -}}
{{- end -}}

{{/*
Namespace for all resources to be installed into
If not defined in values file then the helm release namespace is used
By default this is not set so the helm release namespace will be used
This gets around an problem within helm discussed here
https://github.com/helm/helm/issues/5358
*/}}
{{- define "flux.namespace" -}}
{{ .Values.namespace | default .Release.Namespace }}
{{- end -}}
1 change: 1 addition & 0 deletions charts/flux2/templates/helm-controller-sa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/component: helm-controller
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/flux2/templates/helm-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/component: helm-controller
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/flux2/templates/image-automation-controller-sa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/component: image-automation-controller
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/flux2/templates/image-automation-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/component: image-automation-controller
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/flux2/templates/image-reflector-controller-sa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/component: image-reflector-controller
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/flux2/templates/image-reflector-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/component: image-reflector-controller
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/flux2/templates/kustomize-controller-sa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/component: kustomize-controller
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
Expand Down
2 changes: 1 addition & 1 deletion charts/flux2/templates/kustomize-controller-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.kustomizeController.secret.name }}
namespace: {{ .Release.Namespace }}
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/flux2/templates/kustomize-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/component: kustomize-controller
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/flux2/templates/notification-controller-sa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/component: notification-controller
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: v1
kind: Service
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: v1
kind: Service
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/flux2/templates/notification-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/component: notification-controller
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/flux2/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ .Release.Name }}
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
Expand Down
3 changes: 3 additions & 0 deletions charts/flux2/templates/policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
Expand All @@ -23,6 +24,7 @@ spec:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
Expand All @@ -44,6 +46,7 @@ spec:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/flux2/templates/pre-install-job-serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/flux2/templates/pre-install-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: batch/v1
kind: Job
metadata:
name: "{{ .Release.Name }}-flux-check"
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/flux2/templates/source-controller-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: v1
kind: Service
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/component: source-controller
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/flux2/templates/source-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ include "flux.namespace" . }}
labels:
app.kubernetes.io/component: source-controller
app.kubernetes.io/instance: {{ .Release.Namespace | quote }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.5.1
control-plane: controller
helm.sh/chart: flux2-2.15.0
helm.sh/chart: flux2-2.16.0
labeltestkey: labeltestvalue
labeltestkey2: labeltestvalue2
name: helm-controller
namespace: NAMESPACE
spec:
replicas: 1
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.5.1
control-plane: controller
helm.sh/chart: flux2-2.15.0
helm.sh/chart: flux2-2.16.0
name: image-automation-controller
namespace: NAMESPACE
spec:
replicas: 1
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.5.1
control-plane: controller
helm.sh/chart: flux2-2.15.0
helm.sh/chart: flux2-2.16.0
name: image-reflector-controller
namespace: NAMESPACE
spec:
replicas: 1
selector:
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: 2.5.1
helm.sh/chart: flux2-2.15.0
helm.sh/chart: flux2-2.16.0
name: test1
namespace: NAMESPACE
type: Opaque
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.5.1
control-plane: controller
helm.sh/chart: flux2-2.15.0
helm.sh/chart: flux2-2.16.0
name: kustomize-controller
namespace: NAMESPACE
spec:
replicas: 1
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.5.1
control-plane: controller
helm.sh/chart: flux2-2.15.0
helm.sh/chart: flux2-2.16.0
name: notification-controller
namespace: NAMESPACE
spec:
replicas: 1
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ should match snapshot of default values:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.5.1
helm.sh/chart: flux2-2.15.0
helm.sh/chart: flux2-2.16.0
name: RELEASE-NAME-flux-check
namespace: NAMESPACE
spec:
backoffLimit: 1
template:
Expand All @@ -23,7 +24,7 @@ should match snapshot of default values:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.5.1
helm.sh/chart: flux2-2.15.0
helm.sh/chart: flux2-2.16.0
name: RELEASE-NAME
spec:
automountServiceAccountToken: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.5.1
control-plane: controller
helm.sh/chart: flux2-2.15.0
helm.sh/chart: flux2-2.16.0
name: source-controller
namespace: NAMESPACE
spec:
replicas: 1
selector:
Expand Down
2 changes: 1 addition & 1 deletion charts/flux2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ installCRDs: true
crds:
# -- Add annotations to all CRD resources, e.g. "helm.sh/resource-policy": keep
annotations: {}

namespace: ""
multitenancy:
# -- Implement the patches for Multi-tenancy lockdown.
# See https://fluxcd.io/docs/installation/#multi-tenancy-lockdown
Expand Down