mirror of https://git.rancher.io/charts
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
{{- if .Values.migrations.clusterRegistrationCleanup }}
|
|
---
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: fleet-cleanup-clusterregistrations
|
|
annotations:
|
|
"helm.sh/hook": post-install, post-upgrade
|
|
"helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: fleet-job
|
|
spec:
|
|
serviceAccountName: fleet-controller
|
|
restartPolicy: Never
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsGroup: 1000
|
|
runAsUser: 1000
|
|
containers:
|
|
- name: cleanup
|
|
image: "{{ template "system_default_registry" . }}{{.Values.image.repository}}:{{.Values.image.tag}}"
|
|
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
readOnlyRootFilesystem: false
|
|
privileged: false
|
|
command:
|
|
- fleet
|
|
args:
|
|
- cleanup
|
|
nodeSelector: {{ include "linux-node-selector" . | nindent 8 }}
|
|
tolerations: {{ include "linux-node-tolerations" . | nindent 8 }}
|
|
backoffLimit: 1
|
|
{{- end }}
|