|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: system-upgrade-controller |
| 5 | + namespace: cattle-system |
| 6 | +spec: |
| 7 | + selector: |
| 8 | + matchLabels: |
| 9 | + upgrade.cattle.io/controller: system-upgrade-controller |
| 10 | + template: |
| 11 | + metadata: |
| 12 | + labels: |
| 13 | + upgrade.cattle.io/controller: system-upgrade-controller # necessary to avoid drain |
| 14 | + spec: |
| 15 | + affinity: |
| 16 | + nodeAffinity: |
| 17 | + requiredDuringSchedulingIgnoredDuringExecution: |
| 18 | + nodeSelectorTerms: |
| 19 | + - matchExpressions: |
| 20 | + - key: "kubernetes.io/os" |
| 21 | + operator: NotIn |
| 22 | + values: |
| 23 | + - windows |
| 24 | + preferredDuringSchedulingIgnoredDuringExecution: |
| 25 | + - preference: |
| 26 | + matchExpressions: |
| 27 | + - key: "node-role.kubernetes.io/control-plane" |
| 28 | + operator: In |
| 29 | + values: |
| 30 | + - "true" |
| 31 | + weight: 100 |
| 32 | + - preference: |
| 33 | + matchExpressions: |
| 34 | + - key: "node-role.kubernetes.io/master" |
| 35 | + operator: In |
| 36 | + values: |
| 37 | + - "true" |
| 38 | + weight: 100 |
| 39 | + tolerations: |
| 40 | + - operator: Exists |
| 41 | + serviceAccountName: system-upgrade-controller |
| 42 | + containers: |
| 43 | + - name: system-upgrade-controller |
| 44 | + image: {{ template "system_default_registry" . }}{{ .Values.systemUpgradeController.image.repository }}:{{ .Values.systemUpgradeController.image.tag }} |
| 45 | + imagePullPolicy: IfNotPresent |
| 46 | + securityContext: |
| 47 | + runAsNonRoot: true |
| 48 | + runAsUser: 65534 |
| 49 | + runAsGroup: 65534 |
| 50 | + allowPrivilegeEscalation: false |
| 51 | + seccompProfile: |
| 52 | + type: RuntimeDefault |
| 53 | + capabilities: |
| 54 | + drop: |
| 55 | + - ALL |
| 56 | + envFrom: |
| 57 | + - configMapRef: |
| 58 | + name: system-upgrade-controller-config |
| 59 | + env: |
| 60 | + - name: SYSTEM_UPGRADE_CONTROLLER_NAME |
| 61 | + valueFrom: |
| 62 | + fieldRef: |
| 63 | + fieldPath: metadata.labels['upgrade.cattle.io/controller'] |
| 64 | + - name: SYSTEM_UPGRADE_CONTROLLER_NAMESPACE |
| 65 | + valueFrom: |
| 66 | + fieldRef: |
| 67 | + fieldPath: metadata.namespace |
| 68 | + volumeMounts: |
| 69 | + - name: etc-ssl |
| 70 | + mountPath: /etc/ssl |
| 71 | + readOnly: true |
| 72 | + - name: etc-pki |
| 73 | + mountPath: /etc/pki |
| 74 | + readOnly: true |
| 75 | + - name: etc-ca-certificates |
| 76 | + mountPath: /etc/ca-certificates |
| 77 | + readOnly: true |
| 78 | + - name: tmp |
| 79 | + mountPath: /tmp |
| 80 | + volumes: |
| 81 | + - name: etc-ssl |
| 82 | + hostPath: |
| 83 | + path: /etc/ssl |
| 84 | + type: DirectoryOrCreate |
| 85 | + - name: etc-pki |
| 86 | + hostPath: |
| 87 | + path: /etc/pki |
| 88 | + type: DirectoryOrCreate |
| 89 | + - name: etc-ca-certificates |
| 90 | + hostPath: |
| 91 | + path: /etc/ca-certificates |
| 92 | + type: DirectoryOrCreate |
| 93 | + - name: tmp |
| 94 | + emptyDir: {} |
0 commit comments