diff --git a/charts/flux2/templates/helm-controller-pdb.yaml b/charts/flux2/templates/helm-controller-pdb.yaml new file mode 100644 index 0000000..23afa8f --- /dev/null +++ b/charts/flux2/templates/helm-controller-pdb.yaml @@ -0,0 +1,16 @@ +{{- if .Values.helmController.podDisruptionBudget }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: helm-controller +spec: + {{- with .Values.helmController.podDisruptionBudget.minAvailable }} + minAvailable: {{ . }} + {{- end }} + {{- with .Values.helmController.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + selector: + matchLabels: + app: helm-controller +{{- end }} \ No newline at end of file diff --git a/charts/flux2/templates/image-automation-controller-pdb.yaml b/charts/flux2/templates/image-automation-controller-pdb.yaml new file mode 100644 index 0000000..f7d54cb --- /dev/null +++ b/charts/flux2/templates/image-automation-controller-pdb.yaml @@ -0,0 +1,16 @@ +{{- if .Values.imageAutomationController.podDisruptionBudget }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: image-automation-controller +spec: + {{- with .Values.imageAutomationController.podDisruptionBudget.minAvailable }} + minAvailable: {{ . }} + {{- end }} + {{- with .Values.imageAutomationController.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + selector: + matchLabels: + app: image-automation-controller +{{- end }} \ No newline at end of file diff --git a/charts/flux2/templates/image-reflector-controller-pdb.yaml b/charts/flux2/templates/image-reflector-controller-pdb.yaml new file mode 100644 index 0000000..4fd3256 --- /dev/null +++ b/charts/flux2/templates/image-reflector-controller-pdb.yaml @@ -0,0 +1,16 @@ +{{- if .Values.imageReflectionController.podDisruptionBudget }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: image-reflector-controller +spec: + {{- with .Values.imageReflectionController.podDisruptionBudget.minAvailable }} + minAvailable: {{ . }} + {{- end }} + {{- with .Values.imageReflectionController.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + selector: + matchLabels: + app: image-reflector-controller +{{- end }} \ No newline at end of file diff --git a/charts/flux2/templates/kustomize-controller-pdb.yaml b/charts/flux2/templates/kustomize-controller-pdb.yaml new file mode 100644 index 0000000..4acaf56 --- /dev/null +++ b/charts/flux2/templates/kustomize-controller-pdb.yaml @@ -0,0 +1,16 @@ +{{- if .Values.kustomizeController.podDisruptionBudget }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: kustomize-controller +spec: + {{- with .Values.kustomizeController.podDisruptionBudget.minAvailable }} + minAvailable: {{ . }} + {{- end }} + {{- with .Values.kustomizeController.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + selector: + matchLabels: + app: kustomize-controller +{{- end }} \ No newline at end of file diff --git a/charts/flux2/templates/notification-controller-pdb.yaml b/charts/flux2/templates/notification-controller-pdb.yaml new file mode 100644 index 0000000..87575a1 --- /dev/null +++ b/charts/flux2/templates/notification-controller-pdb.yaml @@ -0,0 +1,16 @@ +{{- if .Values.notificationController.podDisruptionBudget }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: notification-controller +spec: + {{- with .Values.notificationController.podDisruptionBudget.minAvailable }} + minAvailable: {{ . }} + {{- end }} + {{- with .Values.notificationController.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + selector: + matchLabels: + app: notification-controller +{{- end }} \ No newline at end of file diff --git a/charts/flux2/templates/source-controller-pdb.yaml b/charts/flux2/templates/source-controller-pdb.yaml new file mode 100644 index 0000000..fa5dd2d --- /dev/null +++ b/charts/flux2/templates/source-controller-pdb.yaml @@ -0,0 +1,16 @@ +{{- if .Values.sourceController.podDisruptionBudget }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: source-controller +spec: + {{- with .Values.sourceController.podDisruptionBudget.minAvailable }} + minAvailable: {{ . }} + {{- end }} + {{- with .Values.sourceController.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + selector: + matchLabels: + app: source-controller +{{- end }} \ No newline at end of file diff --git a/charts/flux2/values.yaml b/charts/flux2/values.yaml index 8f97ab2..ea555a3 100644 --- a/charts/flux2/values.yaml +++ b/charts/flux2/values.yaml @@ -54,6 +54,9 @@ helmController: automount: true annotations: {} imagePullPolicy: {} + podDisruptionBudget: {} + # minAvailable: 1 + # maxUnavailable: 1 nodeSelector: {} # expects input structure as per specification https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#affinity-v1-core # for example: @@ -102,6 +105,9 @@ imageAutomationController: automount: true annotations: {} imagePullPolicy: {} + podDisruptionBudget: {} + # minAvailable: 1 + # maxUnavailable: 1 nodeSelector: {} affinity: {} tolerations: [] @@ -130,6 +136,9 @@ imageReflectionController: automount: true annotations: {} imagePullPolicy: {} + podDisruptionBudget: {} + # minAvailable: 1 + # maxUnavailable: 1 nodeSelector: {} affinity: {} tolerations: [] @@ -177,7 +186,9 @@ kustomizeController: # subPath: "" # secretName: secret-files # readOnly: true - + podDisruptionBudget: {} + # minAvailable: 1 + # maxUnavailable: 1 nodeSelector: {} affinity: {} tolerations: [] @@ -213,6 +224,9 @@ notificationController: service: labels: {} annotations: {} + podDisruptionBudget: {} + # minAvailable: 1 + # maxUnavailable: 1 nodeSelector: {} affinity: {} tolerations: [] @@ -243,6 +257,9 @@ sourceController: service: labels: {} annotations: {} + podDisruptionBudget: {} + # minAvailable: 1 + # maxUnavailable: 1 nodeSelector: {} affinity: {} tolerations: []