Skip to content

Commit

Permalink
feat: allow pod labels for cleanup jobs (kyverno#7808) (kyverno#7809)
Browse files Browse the repository at this point in the history
Signed-off-by: bakito <[email protected]>
Co-authored-by: Marc Brugger <[email protected]>
  • Loading branch information
gcp-cherry-pick-bot[bot] and bakito authored Jul 11, 2023
1 parent fdc962e commit bbd0cb0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/kyverno/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ annotations:
description: define resources for cleanupJobs
- kind: changed
description: change to enable webhook cleanup hook by default
- kind: added
description: allow pod labels for cleanup jobs
2 changes: 2 additions & 0 deletions charts/kyverno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ The chart values are organised per component.
| cleanupJobs.admissionReports.resources | object | `{}` | Job resources |
| cleanupJobs.admissionReports.tolerations | list | `[]` | List of node taints to tolerate |
| cleanupJobs.admissionReports.podAnnotations | object | `{}` | Pod Annotations |
| cleanupJobs.admissionReports.podLabels | object | `{}` | Pod labels |
| cleanupJobs.clusterAdmissionReports.enabled | bool | `true` | Enable cleanup cronjob |
| cleanupJobs.clusterAdmissionReports.image.registry | string | `nil` | Image registry |
| cleanupJobs.clusterAdmissionReports.image.repository | string | `"bitnami/kubectl"` | Image repository |
Expand All @@ -660,6 +661,7 @@ The chart values are organised per component.
| cleanupJobs.clusterAdmissionReports.resources | object | `{}` | Job resources |
| cleanupJobs.clusterAdmissionReports.tolerations | list | `[]` | List of node taints to tolerate |
| cleanupJobs.clusterAdmissionReports.podAnnotations | object | `{}` | Pod Annotations |
| cleanupJobs.clusterAdmissionReports.podLabels | object | `{}` | Pod Labels |

### Other

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ spec:
annotations:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.cleanupJobs.admissionReports.podLabels }}
labels:
{{- toYaml . | nindent 12 }}
{{- end }}
spec:
serviceAccountName: {{ template "kyverno.name" . }}-cleanup-jobs
{{- with .Values.cleanupJobs.admissionReports.podSecurityContext }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ spec:
annotations:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.cleanupJobs.clusterAdmissionReports.podLabels }}
labels:
{{- toYaml . | nindent 12 }}
{{- end }}
spec:
serviceAccountName: {{ template "kyverno.name" . }}-cleanup-jobs
{{- with .Values.cleanupJobs.clusterAdmissionReports.podSecurityContext }}
Expand Down
6 changes: 6 additions & 0 deletions charts/kyverno/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,9 @@ cleanupJobs:
# -- Pod Annotations
podAnnotations: {}

# -- Pod labels
podLabels: {}

clusterAdmissionReports:

# -- Enable cleanup cronjob
Expand Down Expand Up @@ -504,6 +507,9 @@ cleanupJobs:
# -- Pod Annotations
podAnnotations: {}

# -- Pod Labels
podLabels: {}

# Admission controller configuration
admissionController:

Expand Down

0 comments on commit bbd0cb0

Please sign in to comment.