diff --git a/charts/kyverno/Chart.yaml b/charts/kyverno/Chart.yaml index df3658653a..acdbec5194 100644 --- a/charts/kyverno/Chart.yaml +++ b/charts/kyverno/Chart.yaml @@ -45,6 +45,8 @@ annotations: description: Add cronjob ttl support - kind: fixed description: Ensure CA certificate config maps are created when data is provided + - kind: added + description: Add global tolerations dependencies: - name: grafana version: v0.0.0 diff --git a/charts/kyverno/README.md b/charts/kyverno/README.md index 6334815668..42de2db93a 100644 --- a/charts/kyverno/README.md +++ b/charts/kyverno/README.md @@ -847,6 +847,7 @@ The chart values are organised per component. | global.caCertificates.volume | object | `{}` | Global value to set single volume to be mounted for CA certificates for all deployments. Not used when `.Values.global.caCertificates.data` is defined Individual controller values will override this global value | | global.extraEnvVars | list | `[]` | Additional container environment variables to apply to all containers and init containers | | global.nodeSelector | object | `{}` | Global node labels for pod assignment. Non-global values will override the global value. | +| global.tolerations | list | `[]` | Global List of node taints to tolerate. Non-global values will override the global value. | | nameOverride | string | `nil` | Override the name of the chart | | fullnameOverride | string | `nil` | Override the expanded name of the chart | | namespaceOverride | string | `nil` | Override the namespace the chart deploys to | diff --git a/charts/kyverno/templates/admission-controller/deployment.yaml b/charts/kyverno/templates/admission-controller/deployment.yaml index dae95c4093..6017e9ad23 100644 --- a/charts/kyverno/templates/admission-controller/deployment.yaml +++ b/charts/kyverno/templates/admission-controller/deployment.yaml @@ -39,7 +39,7 @@ spec: nodeSelector: {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} - {{- with .Values.admissionController.tolerations }} + {{- with .Values.admissionController.tolerations | default .Values.global.tolerations}} tolerations: {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} diff --git a/charts/kyverno/templates/background-controller/deployment.yaml b/charts/kyverno/templates/background-controller/deployment.yaml index 48d5fc4940..acbaf7f7c1 100644 --- a/charts/kyverno/templates/background-controller/deployment.yaml +++ b/charts/kyverno/templates/background-controller/deployment.yaml @@ -40,7 +40,7 @@ spec: nodeSelector: {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} - {{- with .Values.backgroundController.tolerations }} + {{- with .Values.backgroundController.tolerations | default .Values.global.tolerations}} tolerations: {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} diff --git a/charts/kyverno/templates/cleanup-controller/deployment.yaml b/charts/kyverno/templates/cleanup-controller/deployment.yaml index 41f33bac97..ddb80db49a 100644 --- a/charts/kyverno/templates/cleanup-controller/deployment.yaml +++ b/charts/kyverno/templates/cleanup-controller/deployment.yaml @@ -40,7 +40,7 @@ spec: nodeSelector: {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} - {{- with .Values.cleanupController.tolerations }} + {{- with .Values.cleanupController.tolerations | default .Values.global.tolerations}} tolerations: {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} diff --git a/charts/kyverno/templates/cleanup/cleanup-admission-reports.yaml b/charts/kyverno/templates/cleanup/cleanup-admission-reports.yaml index fa8b91640b..7686d3efb5 100644 --- a/charts/kyverno/templates/cleanup/cleanup-admission-reports.yaml +++ b/charts/kyverno/templates/cleanup/cleanup-admission-reports.yaml @@ -65,7 +65,7 @@ spec: {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} restartPolicy: OnFailure - {{- with .Values.cleanupJobs.admissionReports.tolerations }} + {{- with .Values.cleanupJobs.admissionReports.tolerations | default .Values.global.tolerations}} tolerations: {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} diff --git a/charts/kyverno/templates/cleanup/cleanup-cluster-admission-reports.yaml b/charts/kyverno/templates/cleanup/cleanup-cluster-admission-reports.yaml index def5f5f133..3aed886802 100644 --- a/charts/kyverno/templates/cleanup/cleanup-cluster-admission-reports.yaml +++ b/charts/kyverno/templates/cleanup/cleanup-cluster-admission-reports.yaml @@ -65,7 +65,7 @@ spec: {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} restartPolicy: OnFailure - {{- with .Values.cleanupJobs.clusterAdmissionReports.tolerations }} + {{- with .Values.cleanupJobs.clusterAdmissionReports.tolerations | default .Values.global.tolerations}} tolerations: {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} diff --git a/charts/kyverno/templates/cleanup/cleanup-cluster-ephemeral-reports.yaml b/charts/kyverno/templates/cleanup/cleanup-cluster-ephemeral-reports.yaml index f5fb679d97..1b8ab312e7 100644 --- a/charts/kyverno/templates/cleanup/cleanup-cluster-ephemeral-reports.yaml +++ b/charts/kyverno/templates/cleanup/cleanup-cluster-ephemeral-reports.yaml @@ -65,7 +65,7 @@ spec: {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} restartPolicy: OnFailure - {{- with .Values.cleanupJobs.clusterEphemeralReports.tolerations }} + {{- with .Values.cleanupJobs.clusterEphemeralReports.tolerations | default .Values.global.tolerations}} tolerations: {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} diff --git a/charts/kyverno/templates/cleanup/cleanup-ephemeral-reports.yaml b/charts/kyverno/templates/cleanup/cleanup-ephemeral-reports.yaml index 2ec6469ad5..33a7c5ead1 100644 --- a/charts/kyverno/templates/cleanup/cleanup-ephemeral-reports.yaml +++ b/charts/kyverno/templates/cleanup/cleanup-ephemeral-reports.yaml @@ -65,7 +65,7 @@ spec: {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} restartPolicy: OnFailure - {{- with .Values.cleanupJobs.ephemeralReports.tolerations }} + {{- with .Values.cleanupJobs.ephemeralReports.tolerations | default .Values.global.tolerations}} tolerations: {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} diff --git a/charts/kyverno/templates/cleanup/cleanup-update-requests.yaml b/charts/kyverno/templates/cleanup/cleanup-update-requests.yaml index ac564f9377..51d7ee10a7 100644 --- a/charts/kyverno/templates/cleanup/cleanup-update-requests.yaml +++ b/charts/kyverno/templates/cleanup/cleanup-update-requests.yaml @@ -65,7 +65,7 @@ spec: {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} restartPolicy: OnFailure - {{- with .Values.cleanupJobs.updateRequests.tolerations }} + {{- with .Values.cleanupJobs.updateRequests.tolerations | default .Values.global.tolerations}} tolerations: {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} diff --git a/charts/kyverno/templates/hooks/post-upgrade-clean-reports.yaml b/charts/kyverno/templates/hooks/post-upgrade-clean-reports.yaml index 87b12950a6..0aec49dd95 100644 --- a/charts/kyverno/templates/hooks/post-upgrade-clean-reports.yaml +++ b/charts/kyverno/templates/hooks/post-upgrade-clean-reports.yaml @@ -68,7 +68,7 @@ spec: imagePullSecrets: {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} - {{- with .Values.policyReportsCleanup.tolerations }} + {{- with .Values.policyReportsCleanup.tolerations | default .Values.global.tolerations}} tolerations: {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} diff --git a/charts/kyverno/templates/hooks/post-upgrade-migrate-resources.yaml b/charts/kyverno/templates/hooks/post-upgrade-migrate-resources.yaml index 063ef5d445..034bea6723 100644 --- a/charts/kyverno/templates/hooks/post-upgrade-migrate-resources.yaml +++ b/charts/kyverno/templates/hooks/post-upgrade-migrate-resources.yaml @@ -111,7 +111,7 @@ spec: imagePullSecrets: {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} - {{- with .Values.crds.migration.tolerations }} + {{- with .Values.crds.migration.tolerations | default .Values.global.tolerations}} tolerations: {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} diff --git a/charts/kyverno/templates/hooks/pre-delete-scale-to-zero.yaml b/charts/kyverno/templates/hooks/pre-delete-scale-to-zero.yaml index 32da024430..11bb6bd81d 100644 --- a/charts/kyverno/templates/hooks/pre-delete-scale-to-zero.yaml +++ b/charts/kyverno/templates/hooks/pre-delete-scale-to-zero.yaml @@ -50,7 +50,7 @@ spec: securityContext: {{- toYaml . | nindent 12 }} {{- end }} - {{- with .Values.webhooksCleanup.tolerations }} + {{- with .Values.webhooksCleanup.tolerations | default .Values.global.tolerations}} tolerations: {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} diff --git a/charts/kyverno/templates/reports-controller/deployment.yaml b/charts/kyverno/templates/reports-controller/deployment.yaml index 664850fadc..18992f042f 100644 --- a/charts/kyverno/templates/reports-controller/deployment.yaml +++ b/charts/kyverno/templates/reports-controller/deployment.yaml @@ -40,7 +40,7 @@ spec: nodeSelector: {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} - {{- with .Values.reportsController.tolerations }} + {{- with .Values.reportsController.tolerations | default .Values.global.tolerations}} tolerations: {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} diff --git a/charts/kyverno/values.yaml b/charts/kyverno/values.yaml index f6f620b999..89eeaf1856 100644 --- a/charts/kyverno/values.yaml +++ b/charts/kyverno/values.yaml @@ -37,6 +37,9 @@ global: # -- Global node labels for pod assignment. Non-global values will override the global value. nodeSelector: {} + # -- Global List of node taints to tolerate. Non-global values will override the global value. + tolerations: [] + # -- (string) Override the name of the chart nameOverride: ~