Skip to content

Commit f73ad1e

Browse files
committed
Move helm charts from rancher/charts to /charts dir
1 parent c0758c1 commit f73ad1e

File tree

7 files changed

+165
-0
lines changed

7 files changed

+165
-0
lines changed

charts/Chart.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
annotations:
2+
catalog.cattle.io/certified: rancher
3+
catalog.cattle.io/hidden: "true"
4+
catalog.cattle.io/kube-version: '>= 1.25.0-0 < 1.32.0-0'
5+
catalog.cattle.io/namespace: cattle-system
6+
catalog.cattle.io/os: linux
7+
catalog.cattle.io/permits-os: linux,windows
8+
catalog.cattle.io/rancher-version: '>= 2.10.0-0'
9+
catalog.cattle.io/release-name: system-upgrade-controller
10+
apiVersion: v1
11+
appVersion: v0.14.2
12+
description: General purpose controller to make system level updates to nodes.
13+
home: https://github.com/rancher/system-upgrade-controller
14+
kubeVersion: '>= 1.25.0-0'
15+
name: system-upgrade-controller
16+
version: 105.0.0

charts/templates/_helpers.tpl

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
3+
{{- define "system_default_registry" -}}
4+
{{- if .Values.global.cattle.systemDefaultRegistry -}}
5+
{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}}
6+
{{- else -}}
7+
{{- "" -}}
8+
{{- end -}}
9+
{{- end -}}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRoleBinding
3+
metadata:
4+
name: system-upgrade-controller
5+
roleRef:
6+
apiGroup: rbac.authorization.k8s.io
7+
kind: ClusterRole
8+
name: cluster-admin
9+
subjects:
10+
- kind: ServiceAccount
11+
name: system-upgrade-controller
12+
namespace: cattle-system

charts/templates/configmap.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: system-upgrade-controller-config
5+
namespace: cattle-system
6+
data:
7+
SYSTEM_UPGRADE_CONTROLLER_DEBUG: {{ .Values.systemUpgradeControllerDebug | default "false" | quote }}
8+
SYSTEM_UPGRADE_CONTROLLER_THREADS: {{ .Values.systemUpgradeControllerThreads | default "2" | quote }}
9+
SYSTEM_UPGRADE_JOB_ACTIVE_DEADLINE_SECONDS: {{ .Values.systemUpgradeJobActiveDeadlineSeconds | default "900" | quote }}
10+
SYSTEM_UPGRADE_JOB_BACKOFF_LIMIT: {{ .Values.systemUpgradeJobBackoffLimit | default "99" | quote }}
11+
SYSTEM_UPGRADE_JOB_IMAGE_PULL_POLICY: {{ .Values.systemUpgradeJobImagePullPolicy | default "IfNotPresent" | quote }}
12+
SYSTEM_UPGRADE_JOB_KUBECTL_IMAGE: {{ template "system_default_registry" . }}{{ .Values.kubectl.image.repository }}:{{ .Values.kubectl.image.tag }}
13+
SYSTEM_UPGRADE_JOB_PRIVILEGED: {{ .Values.systemUpgradeJobPrivileged | default "true" | quote }}
14+
SYSTEM_UPGRADE_JOB_TTL_SECONDS_AFTER_FINISH: {{ .Values.systemUpgradeJobTTLSecondsAfterFinish | default "900" | quote }}
15+
SYSTEM_UPGRADE_PLAN_POLLING_INTERVAL: {{ .Values.systemUpgradePlanRollingInterval | default "15m" | quote }}
16+

charts/templates/deployment.yaml

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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: {}

charts/templates/serviceaccount.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
name: system-upgrade-controller
5+
namespace: cattle-system

charts/values.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
global:
2+
cattle:
3+
systemDefaultRegistry: ""
4+
5+
systemUpgradeController:
6+
image:
7+
repository: rancher/system-upgrade-controller
8+
tag: v0.14.2
9+
10+
kubectl:
11+
image:
12+
repository: rancher/kubectl
13+
tag: v1.31.1

0 commit comments

Comments
 (0)