| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276 |
- apiVersion: v1
- kind: Namespace
- metadata:
- labels:
- pod-security.kubernetes.io/enforce: privileged
- name: system-upgrade
- ---
- apiVersion: v1
- kind: ServiceAccount
- metadata:
- name: system-upgrade
- namespace: system-upgrade
- ---
- apiVersion: rbac.authorization.k8s.io/v1
- kind: Role
- metadata:
- name: system-upgrade-controller
- namespace: system-upgrade
- rules:
- - apiGroups:
- - batch
- resources:
- - jobs
- verbs:
- - create
- - delete
- - deletecollection
- - patch
- - update
- - get
- - list
- - watch
- - apiGroups:
- - ""
- resources:
- - secrets
- verbs:
- - get
- - list
- - watch
- ---
- apiVersion: rbac.authorization.k8s.io/v1
- kind: ClusterRole
- metadata:
- name: system-upgrade-controller
- rules:
- - apiGroups:
- - batch
- resources:
- - jobs
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - apiextensions.k8s.io
- resources:
- - customresourcedefinitions
- verbs:
- - get
- - list
- - watch
- - create
- - patch
- - update
- - apiGroups:
- - ""
- resources:
- - namespaces
- - nodes
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - ""
- resources:
- - nodes
- verbs:
- - update
- - apiGroups:
- - upgrade.cattle.io
- resources:
- - plans
- - plans/status
- verbs:
- - get
- - list
- - watch
- - create
- - patch
- - update
- - delete
- ---
- apiVersion: rbac.authorization.k8s.io/v1
- kind: ClusterRole
- metadata:
- name: system-upgrade-controller-drainer
- rules:
- - apiGroups:
- - ""
- resources:
- - pods/eviction
- verbs:
- - create
- - apiGroups:
- - ""
- resources:
- - pods
- verbs:
- - get
- - list
- - delete
- - apiGroups:
- - ""
- resources:
- - nodes
- verbs:
- - get
- - patch
- - apiGroups:
- - apps
- resources:
- - statefulsets
- - daemonsets
- - replicasets
- verbs:
- - get
- - list
- ---
- apiVersion: rbac.authorization.k8s.io/v1
- kind: RoleBinding
- metadata:
- name: system-upgrade
- namespace: system-upgrade
- roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: Role
- name: system-upgrade-controller
- subjects:
- - kind: ServiceAccount
- name: system-upgrade
- namespace: system-upgrade
- ---
- apiVersion: rbac.authorization.k8s.io/v1
- kind: ClusterRoleBinding
- metadata:
- name: system-upgrade
- roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: ClusterRole
- name: system-upgrade-controller
- subjects:
- - kind: ServiceAccount
- name: system-upgrade
- namespace: system-upgrade
- ---
- apiVersion: rbac.authorization.k8s.io/v1
- kind: ClusterRoleBinding
- metadata:
- name: system-upgrade-drainer
- roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: ClusterRole
- name: system-upgrade-controller-drainer
- subjects:
- - kind: ServiceAccount
- name: system-upgrade
- namespace: system-upgrade
- ---
- apiVersion: v1
- data:
- SYSTEM_UPGRADE_CONTROLLER_DEBUG: "false"
- SYSTEM_UPGRADE_CONTROLLER_THREADS: "2"
- SYSTEM_UPGRADE_JOB_ACTIVE_DEADLINE_SECONDS: "900"
- SYSTEM_UPGRADE_JOB_BACKOFF_LIMIT: "99"
- SYSTEM_UPGRADE_JOB_IMAGE_PULL_POLICY: Always
- SYSTEM_UPGRADE_JOB_KUBECTL_IMAGE: kumahq/kubectl:v1.20.15
- SYSTEM_UPGRADE_JOB_PRIVILEGED: "true"
- SYSTEM_UPGRADE_JOB_TTL_SECONDS_AFTER_FINISH: "900"
- SYSTEM_UPGRADE_PLAN_POLLING_INTERVAL: 15m
- kind: ConfigMap
- metadata:
- name: default-controller-env
- namespace: system-upgrade
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: system-upgrade-controller
- namespace: system-upgrade
- spec:
- selector:
- matchLabels:
- upgrade.cattle.io/controller: system-upgrade-controller
- template:
- metadata:
- labels:
- upgrade.cattle.io/controller: system-upgrade-controller
- spec:
- affinity:
- nodeAffinity:
- requiredDuringSchedulingIgnoredDuringExecution:
- nodeSelectorTerms:
- - matchExpressions:
- - key: node-role.kubernetes.io/control-plane
- operator: Exists
- containers:
- - env:
- - name: SYSTEM_UPGRADE_CONTROLLER_NAME
- valueFrom:
- fieldRef:
- fieldPath: metadata.labels['upgrade.cattle.io/controller']
- - name: SYSTEM_UPGRADE_CONTROLLER_NAMESPACE
- valueFrom:
- fieldRef:
- fieldPath: metadata.namespace
- envFrom:
- - configMapRef:
- name: default-controller-env
- image: rancher/system-upgrade-controller:v0.14.2
- imagePullPolicy: IfNotPresent
- name: system-upgrade-controller
- securityContext:
- allowPrivilegeEscalation: false
- capabilities:
- drop:
- - ALL
- runAsGroup: 65534
- runAsNonRoot: true
- runAsUser: 65534
- seccompProfile:
- type: RuntimeDefault
- volumeMounts:
- - mountPath: /etc/ssl
- name: etc-ssl
- readOnly: true
- - mountPath: /etc/pki
- name: etc-pki
- readOnly: true
- - mountPath: /etc/ca-certificates
- name: etc-ca-certificates
- readOnly: true
- - mountPath: /tmp
- name: tmp
- serviceAccountName: system-upgrade
- tolerations:
- - key: CriticalAddonsOnly
- operator: Exists
- - effect: NoSchedule
- key: node-role.kubernetes.io/master
- operator: Exists
- - effect: NoSchedule
- key: node-role.kubernetes.io/controlplane
- operator: Exists
- - effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
- operator: Exists
- - effect: NoExecute
- key: node-role.kubernetes.io/etcd
- operator: Exists
- volumes:
- - hostPath:
- path: /etc/ssl
- type: DirectoryOrCreate
- name: etc-ssl
- - hostPath:
- path: /etc/pki
- type: DirectoryOrCreate
- name: etc-pki
- - hostPath:
- path: /etc/ca-certificates
- type: DirectoryOrCreate
- name: etc-ca-certificates
- - emptyDir: {}
- name: tmp
|