mirror of https://git.rancher.io/charts
29 lines
1.0 KiB
YAML
29 lines
1.0 KiB
YAML
|
---
|
||
|
apiVersion: batch/v1
|
||
|
kind: Job
|
||
|
metadata:
|
||
|
name: patch-fleet-sa
|
||
|
annotations:
|
||
|
"helm.sh/hook": post-install, post-upgrade
|
||
|
"helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation
|
||
|
spec:
|
||
|
template:
|
||
|
spec:
|
||
|
serviceAccountName: fleet-agent
|
||
|
restartPolicy: Never
|
||
|
containers:
|
||
|
- name: sa
|
||
|
image: "{{ template "system_default_registry" . }}{{ .Values.global.kubectl.repository }}:{{ .Values.global.kubectl.tag }}"
|
||
|
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
|
||
|
command: ["kubectl", "patch", "serviceaccount", "default", "-p", "{\"automountServiceAccountToken\": false}"]
|
||
|
args: ["-n", {{ .Values.internal.systemNamespace }}]
|
||
|
nodeSelector: {{ include "linux-node-selector" . | nindent 8 }}
|
||
|
{{- if .Values.kubectl.nodeSelector }}
|
||
|
{{ toYaml .Values.kubectl.nodeSelector | indent 8 }}
|
||
|
{{- end }}
|
||
|
tolerations: {{ include "linux-node-tolerations" . | nindent 8 }}
|
||
|
{{- if .Values.kubectl.tolerations }}
|
||
|
{{ toYaml .Values.kubectl.tolerations | indent 8 }}
|
||
|
{{- end }}
|
||
|
backoffLimit: 1
|