From d56011650922e8f9e0fb65dcf7bc101bdecf3363 Mon Sep 17 00:00:00 2001 From: Lucas Machado Date: Fri, 8 Mar 2024 16:58:58 -0300 Subject: [PATCH] [dev-v2.9] Forward porting system-upgrade-controller 102.2.0+up0.6.0 from release-v2.7 (#3598) --- ...tem-upgrade-controller-102.2.0+up0.6.0.tgz | Bin 0 -> 2139 bytes .../102.2.0+up0.6.0/Chart.yaml | 18 +++++ .../102.2.0+up0.6.0/templates/_helpers.tpl | 9 +++ .../templates/clusterrolebinding.yaml | 12 +++ .../102.2.0+up0.6.0/templates/configmap.yaml | 16 ++++ .../102.2.0+up0.6.0/templates/deployment.yaml | 69 ++++++++++++++++++ .../102.2.0+up0.6.0/templates/psp.yaml | 51 +++++++++++++ .../templates/serviceaccount.yaml | 5 ++ .../102.2.0+up0.6.0/values.yaml | 15 ++++ index.yaml | 22 ++++++ release.yaml | 1 + 11 files changed, 218 insertions(+) create mode 100644 assets/system-upgrade-controller/system-upgrade-controller-102.2.0+up0.6.0.tgz create mode 100644 charts/system-upgrade-controller/102.2.0+up0.6.0/Chart.yaml create mode 100644 charts/system-upgrade-controller/102.2.0+up0.6.0/templates/_helpers.tpl create mode 100644 charts/system-upgrade-controller/102.2.0+up0.6.0/templates/clusterrolebinding.yaml create mode 100644 charts/system-upgrade-controller/102.2.0+up0.6.0/templates/configmap.yaml create mode 100644 charts/system-upgrade-controller/102.2.0+up0.6.0/templates/deployment.yaml create mode 100644 charts/system-upgrade-controller/102.2.0+up0.6.0/templates/psp.yaml create mode 100644 charts/system-upgrade-controller/102.2.0+up0.6.0/templates/serviceaccount.yaml create mode 100644 charts/system-upgrade-controller/102.2.0+up0.6.0/values.yaml diff --git a/assets/system-upgrade-controller/system-upgrade-controller-102.2.0+up0.6.0.tgz b/assets/system-upgrade-controller/system-upgrade-controller-102.2.0+up0.6.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..af1ed75e2cd06e609bdbbea1bd9f42116ee97571 GIT binary patch literal 2139 zcmV-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r2q%Dh>W7z@&!azM(~ARwup4l)9G^m6?91cFVwL&e=+U5|Fi4c_y2aq zuAcJ$x1hp)U3lyZN`-HFRROv zwsJAW@jsuUKN%zp;5D(p6GDk5sRuGqv(X<9KM%*3x3?oBb~-)KU$}f&jgA~qrQkX^^54D4Fs^W%7 z{@aYNHBsqP$uLdRIKF}Ns>@xWgb|9AG+5H+&C2zgiAE%U#fbmP6=r4|9K~r?Iw&)x zrxJaNW+xD5fD4e54YokRS8l~Iy{vdkzFj}77$~p56~RTja2R$L$w{(k9B0wW$rkHr zv;5R6|5MW;@jt65uTKT`_5UkpwXOJHtyNC001ExADI9E literal 0 HcmV?d00001 diff --git a/charts/system-upgrade-controller/102.2.0+up0.6.0/Chart.yaml b/charts/system-upgrade-controller/102.2.0+up0.6.0/Chart.yaml new file mode 100644 index 000000000..363e7f6fc --- /dev/null +++ b/charts/system-upgrade-controller/102.2.0+up0.6.0/Chart.yaml @@ -0,0 +1,18 @@ +annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/hidden: "true" + catalog.cattle.io/kube-version: '>= 1.23.0-0 < 1.28.0-0' + catalog.cattle.io/namespace: cattle-system + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux,windows + catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.8.0-0' + catalog.cattle.io/release-name: system-upgrade-controller +apiVersion: v1 +appVersion: v0.13.1 +description: General purpose controller to make system level updates to nodes. +home: https://github.com/rancher/system-charts/blob/dev-v2.7.11/charts/rancher-k3s-upgrader +kubeVersion: '>= 1.23.0-0' +name: system-upgrade-controller +sources: +- https://github.com/rancher/system-charts/blob/dev-v2.7.11/charts/rancher-k3s-upgrader +version: 102.2.0+up0.6.0 diff --git a/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/_helpers.tpl b/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/_helpers.tpl new file mode 100644 index 000000000..67a534eb7 --- /dev/null +++ b/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/_helpers.tpl @@ -0,0 +1,9 @@ +{{/* vim: set filetype=mustache: */}} + +{{- define "system_default_registry" -}} +{{- if .Values.global.cattle.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} +{{- else -}} +{{- "" -}} +{{- end -}} +{{- end -}} diff --git a/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/clusterrolebinding.yaml b/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/clusterrolebinding.yaml new file mode 100644 index 000000000..f2a09949d --- /dev/null +++ b/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/clusterrolebinding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: system-upgrade-controller +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: + - kind: ServiceAccount + name: system-upgrade-controller + namespace: cattle-system diff --git a/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/configmap.yaml b/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/configmap.yaml new file mode 100644 index 000000000..7619c3974 --- /dev/null +++ b/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/configmap.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: system-upgrade-controller-config + namespace: cattle-system +data: + SYSTEM_UPGRADE_CONTROLLER_DEBUG: {{ .Values.systemUpgradeControllerDebug | default "false" | quote }} + SYSTEM_UPGRADE_CONTROLLER_THREADS: {{ .Values.systemUpgradeControllerThreads | default "2" | quote }} + SYSTEM_UPGRADE_JOB_ACTIVE_DEADLINE_SECONDS: {{ .Values.systemUpgradeJobActiveDeadlineSeconds | default "900" | quote }} + SYSTEM_UPGRADE_JOB_BACKOFF_LIMIT: {{ .Values.systemUpgradeJobBackoffLimit | default "99" | quote }} + SYSTEM_UPGRADE_JOB_IMAGE_PULL_POLICY: {{ .Values.systemUpgradeJobImagePullPolicy | default "IfNotPresent" | quote }} + SYSTEM_UPGRADE_JOB_KUBECTL_IMAGE: {{ template "system_default_registry" . }}{{ .Values.kubectl.image.repository }}:{{ .Values.kubectl.image.tag }} + SYSTEM_UPGRADE_JOB_PRIVILEGED: {{ .Values.systemUpgradeJobPrivileged | default "true" | quote }} + SYSTEM_UPGRADE_JOB_TTL_SECONDS_AFTER_FINISH: {{ .Values.systemUpgradeJobTTLSecondsAfterFinish | default "900" | quote }} + SYSTEM_UPGRADE_PLAN_POLLING_INTERVAL: {{ .Values.systemUpgradePlanRollingInterval | default "15m" | quote }} + diff --git a/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/deployment.yaml b/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/deployment.yaml new file mode 100644 index 000000000..cfc27992e --- /dev/null +++ b/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/deployment.yaml @@ -0,0 +1,69 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: system-upgrade-controller + namespace: cattle-system +spec: + selector: + matchLabels: + upgrade.cattle.io/controller: system-upgrade-controller + template: + metadata: + labels: + upgrade.cattle.io/controller: system-upgrade-controller # necessary to avoid drain + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "kubernetes.io/os" + operator: NotIn + values: + - windows + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: node-role.kubernetes.io/control-plane + operator: In + values: + - "true" + weight: 100 + - preference: + matchExpressions: + - key: node-role.kubernetes.io/master + operator: In + values: + - "true" + weight: 100 + tolerations: + - operator: Exists + serviceAccountName: system-upgrade-controller + containers: + - name: system-upgrade-controller + image: {{ template "system_default_registry" . }}{{ .Values.systemUpgradeController.image.repository }}:{{ .Values.systemUpgradeController.image.tag }} + imagePullPolicy: IfNotPresent + envFrom: + - configMapRef: + name: system-upgrade-controller-config + 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 + volumeMounts: + - name: etc-ssl + mountPath: /etc/ssl + - name: tmp + mountPath: /tmp + volumes: + - name: etc-ssl + hostPath: + path: /etc/ssl + type: Directory + - name: tmp + emptyDir: {} diff --git a/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/psp.yaml b/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/psp.yaml new file mode 100644 index 000000000..ca87b996c --- /dev/null +++ b/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/psp.yaml @@ -0,0 +1,51 @@ +{{- if .Values.global.cattle.psp.enabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: system-upgrade-controller +spec: + allowPrivilegeEscalation: true + allowedCapabilities: + - CAP_SYS_BOOT + hostNetwork: true + hostPID: true + hostIPC: true + privileged: true + runAsUser: + rule: RunAsAny + seLinux: + rule: RunAsAny + supplementalGroups: + rule: RunAsAny + fsGroup: + rule: RunAsAny + volumes: + - "*" +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: system-upgrade-controller-psp +rules: + - apiGroups: + - policy + resourceNames: + - system-upgrade-controller + resources: + - podsecuritypolicies + verbs: + - use +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: system-upgrade-controller-psp +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system-upgrade-controller-psp +subjects: + - kind: Group + apiGroup: rbac.authorization.k8s.io + name: system:serviceaccounts:cattle-system +{{- end }} diff --git a/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/serviceaccount.yaml b/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/serviceaccount.yaml new file mode 100644 index 000000000..b6cdcf48b --- /dev/null +++ b/charts/system-upgrade-controller/102.2.0+up0.6.0/templates/serviceaccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: system-upgrade-controller + namespace: cattle-system diff --git a/charts/system-upgrade-controller/102.2.0+up0.6.0/values.yaml b/charts/system-upgrade-controller/102.2.0+up0.6.0/values.yaml new file mode 100644 index 000000000..015736f08 --- /dev/null +++ b/charts/system-upgrade-controller/102.2.0+up0.6.0/values.yaml @@ -0,0 +1,15 @@ +global: + cattle: + systemDefaultRegistry: "" + psp: + enabled: true + +systemUpgradeController: + image: + repository: rancher/system-upgrade-controller + tag: v0.13.1 + +kubectl: + image: + repository: rancher/kubectl + tag: v1.23.3 diff --git a/index.yaml b/index.yaml index 0df64ed8a..f5f7cd760 100755 --- a/index.yaml +++ b/index.yaml @@ -20056,6 +20056,28 @@ entries: urls: - assets/system-upgrade-controller/system-upgrade-controller-103.0.0+up0.6.0.tgz version: 103.0.0+up0.6.0 + - annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/hidden: "true" + catalog.cattle.io/kube-version: '>= 1.23.0-0 < 1.28.0-0' + catalog.cattle.io/namespace: cattle-system + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux,windows + catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.8.0-0' + catalog.cattle.io/release-name: system-upgrade-controller + apiVersion: v1 + appVersion: v0.13.1 + created: "2024-03-08T14:58:07.303597-03:00" + description: General purpose controller to make system level updates to nodes. + digest: 915adb224b81feb69ace1118e3a804e26b5593a68cf5543966dad8eef8fb446b + home: https://github.com/rancher/system-charts/blob/dev-v2.7.11/charts/rancher-k3s-upgrader + kubeVersion: '>= 1.23.0-0' + name: system-upgrade-controller + sources: + - https://github.com/rancher/system-charts/blob/dev-v2.7.11/charts/rancher-k3s-upgrader + urls: + - assets/system-upgrade-controller/system-upgrade-controller-102.2.0+up0.6.0.tgz + version: 102.2.0+up0.6.0 - annotations: catalog.cattle.io/certified: rancher catalog.cattle.io/hidden: "true" diff --git a/release.yaml b/release.yaml index f9cccb1dd..d1b6730c0 100644 --- a/release.yaml +++ b/release.yaml @@ -96,6 +96,7 @@ rancher-windows-gmsa-crd: - 4.0.0 system-upgrade-controller: - 104.0.0+up0.7.0 + - 102.2.0+up0.6.0 ui-plugin-operator: - 103.0.2+up0.2.1 - 104.0.0+up0.2.1