From 36569143f0da552086e81bfbf3f0ee47a4a75a32 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Thu, 25 Feb 2021 17:34:15 -0800 Subject: [PATCH] Migrate all packages Just needed to run: ```bash REPOSITORY=https://github.com/rancher/rke2-charts BRANCH=main-source ./scripts/regenerate-packages ``` Signed-off-by: Arvind Iyengar --- packages/rke2-canal/package.yaml | 3 + .../generated-changes/patch/Chart.yaml.patch | 12 + .../patch/templates/_helpers.tpl.patch | 22 + .../clusterrole-autoscaler.yaml.patch | 11 + .../patch/templates/clusterrole.yaml.patch | 11 + .../clusterrolebinding-autoscaler.yaml.patch | 11 + .../templates/clusterrolebinding.yaml.patch | 11 + .../templates/configmap-autoscaler.yaml.patch | 11 + .../patch/templates/configmap.yaml.patch | 20 + .../deployment-autoscaler.yaml.patch | 37 ++ .../patch/templates/deployment.yaml.patch | 62 +++ .../templates/poddisruptionbudget.yaml.patch | 20 + .../templates/podsecuritypolicy.yaml.patch | 11 + .../templates/service-metrics.yaml.patch | 20 + .../patch/templates/service.yaml.patch | 26 ++ .../serviceaccount-autoscaler.yaml.patch | 11 + .../patch/templates/serviceaccount.yaml.patch | 11 + .../patch/templates/servicemonitor.yaml.patch | 20 + .../generated-changes/patch/values.yaml.patch | 43 ++ packages/rke2-coredns/package.yaml | 1 + packages/rke2-coredns/rke2-coredns.patch | 388 ------------------ .../generated-changes/patch/Chart.yaml.patch | 11 + .../patch/templates/_helpers.tpl.patch | 19 + .../job-patch/job-createSecret.yaml.patch | 11 + .../job-patch/job-patchWebhook.yaml.patch | 11 + .../templates/controller-daemonset.yaml.patch | 11 + .../controller-deployment.yaml.patch | 11 + .../default-backend-deployment.yaml.patch | 11 + .../generated-changes/patch/values.yaml.patch | 58 +++ packages/rke2-ingress-nginx/package.yaml | 1 + .../rke2-ingress-nginx.patch | 151 ------- packages/rke2-kube-proxy/package.yaml | 3 + .../generated-changes/patch/Chart.yaml.patch | 12 + .../patch/templates/_helpers.tpl.patch | 14 + .../metrics-server-deployment.yaml.patch | 11 + .../generated-changes/patch/values.yaml.patch | 39 ++ packages/rke2-metrics-server/package.yaml | 1 + .../rke2-metrics-server.patch | 80 ---- 38 files changed, 598 insertions(+), 619 deletions(-) create mode 100644 packages/rke2-canal/package.yaml create mode 100644 packages/rke2-coredns/generated-changes/patch/Chart.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/_helpers.tpl.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/clusterrole-autoscaler.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/clusterrole.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/clusterrolebinding-autoscaler.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/clusterrolebinding.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/configmap-autoscaler.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/configmap.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/deployment-autoscaler.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/deployment.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/poddisruptionbudget.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/podsecuritypolicy.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/service-metrics.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/service.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/serviceaccount-autoscaler.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/serviceaccount.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/templates/servicemonitor.yaml.patch create mode 100644 packages/rke2-coredns/generated-changes/patch/values.yaml.patch delete mode 100644 packages/rke2-coredns/rke2-coredns.patch create mode 100644 packages/rke2-ingress-nginx/generated-changes/patch/Chart.yaml.patch create mode 100644 packages/rke2-ingress-nginx/generated-changes/patch/templates/_helpers.tpl.patch create mode 100644 packages/rke2-ingress-nginx/generated-changes/patch/templates/admission-webhooks/job-patch/job-createSecret.yaml.patch create mode 100644 packages/rke2-ingress-nginx/generated-changes/patch/templates/admission-webhooks/job-patch/job-patchWebhook.yaml.patch create mode 100644 packages/rke2-ingress-nginx/generated-changes/patch/templates/controller-daemonset.yaml.patch create mode 100644 packages/rke2-ingress-nginx/generated-changes/patch/templates/controller-deployment.yaml.patch create mode 100644 packages/rke2-ingress-nginx/generated-changes/patch/templates/default-backend-deployment.yaml.patch create mode 100644 packages/rke2-ingress-nginx/generated-changes/patch/values.yaml.patch delete mode 100644 packages/rke2-ingress-nginx/rke2-ingress-nginx.patch create mode 100644 packages/rke2-kube-proxy/package.yaml create mode 100644 packages/rke2-metrics-server/generated-changes/patch/Chart.yaml.patch create mode 100644 packages/rke2-metrics-server/generated-changes/patch/templates/_helpers.tpl.patch create mode 100644 packages/rke2-metrics-server/generated-changes/patch/templates/metrics-server-deployment.yaml.patch create mode 100644 packages/rke2-metrics-server/generated-changes/patch/values.yaml.patch delete mode 100644 packages/rke2-metrics-server/rke2-metrics-server.patch diff --git a/packages/rke2-canal/package.yaml b/packages/rke2-canal/package.yaml new file mode 100644 index 0000000..ad1b360 --- /dev/null +++ b/packages/rke2-canal/package.yaml @@ -0,0 +1,3 @@ +url: local +packageVersion: 00 +releaseCandidateVersion: 00 diff --git a/packages/rke2-coredns/generated-changes/patch/Chart.yaml.patch b/packages/rke2-coredns/generated-changes/patch/Chart.yaml.patch new file mode 100644 index 0000000..f9581e4 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/Chart.yaml.patch @@ -0,0 +1,12 @@ +--- charts-original/Chart.yaml ++++ charts/Chart.yaml +@@ -17,7 +17,7 @@ + name: andor44 + - email: manuel@rueg.eu + name: mrueg +-name: coredns ++name: rke2-coredns + sources: + - https://github.com/coredns/coredns +-version: 1.10.1 ++version: 1.10.101-build20210223 diff --git a/packages/rke2-coredns/generated-changes/patch/templates/_helpers.tpl.patch b/packages/rke2-coredns/generated-changes/patch/templates/_helpers.tpl.patch new file mode 100644 index 0000000..daa4c90 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/_helpers.tpl.patch @@ -0,0 +1,22 @@ +--- charts-original/templates/_helpers.tpl ++++ charts/templates/_helpers.tpl +@@ -137,6 +137,7 @@ + {{- end -}} + {{- end -}} + ++ + {{/* + Create the name of the service account to use + */}} +@@ -147,3 +148,11 @@ + {{ default "default" .Values.serviceAccount.name }} + {{- end -}} + {{- end -}} ++ ++{{- define "system_default_registry" -}} ++{{- if .Values.global.systemDefaultRegistry -}} ++{{- printf "%s/" .Values.global.systemDefaultRegistry -}} ++{{- else -}} ++{{- "" -}} ++{{- end -}} ++{{- end -}} diff --git a/packages/rke2-coredns/generated-changes/patch/templates/clusterrole-autoscaler.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/clusterrole-autoscaler.yaml.patch new file mode 100644 index 0000000..9b66f27 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/clusterrole-autoscaler.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/clusterrole-autoscaler.yaml ++++ charts/templates/clusterrole-autoscaler.yaml +@@ -9,7 +9,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name }}-autoscaler ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name }}-autoscaler + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- end }} diff --git a/packages/rke2-coredns/generated-changes/patch/templates/clusterrole.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/clusterrole.yaml.patch new file mode 100644 index 0000000..cfe5512 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/clusterrole.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/clusterrole.yaml ++++ charts/templates/clusterrole.yaml +@@ -8,7 +8,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- end }} diff --git a/packages/rke2-coredns/generated-changes/patch/templates/clusterrolebinding-autoscaler.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/clusterrolebinding-autoscaler.yaml.patch new file mode 100644 index 0000000..28b0b06 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/clusterrolebinding-autoscaler.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/clusterrolebinding-autoscaler.yaml ++++ charts/templates/clusterrolebinding-autoscaler.yaml +@@ -9,7 +9,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name }}-autoscaler ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name }}-autoscaler + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- end }} diff --git a/packages/rke2-coredns/generated-changes/patch/templates/clusterrolebinding.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/clusterrolebinding.yaml.patch new file mode 100644 index 0000000..48cfce0 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/clusterrolebinding.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/clusterrolebinding.yaml ++++ charts/templates/clusterrolebinding.yaml +@@ -8,7 +8,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- end }} diff --git a/packages/rke2-coredns/generated-changes/patch/templates/configmap-autoscaler.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/configmap-autoscaler.yaml.patch new file mode 100644 index 0000000..6ea7cc9 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/configmap-autoscaler.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/configmap-autoscaler.yaml ++++ charts/templates/configmap-autoscaler.yaml +@@ -10,7 +10,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name }}-autoscaler ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name }}-autoscaler + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- end }} diff --git a/packages/rke2-coredns/generated-changes/patch/templates/configmap.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/configmap.yaml.patch new file mode 100644 index 0000000..3562a86 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/configmap.yaml.patch @@ -0,0 +1,20 @@ +--- charts-original/templates/configmap.yaml ++++ charts/templates/configmap.yaml +@@ -7,7 +7,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- end }} +@@ -19,7 +19,7 @@ + {{- if .port }}:{{ .port }} {{ end -}} + { + {{- range .plugins }} +- {{ .name }}{{ if .parameters }} {{ .parameters }}{{ end }}{{ if .configBlock }} { ++ {{ .name }} {{ if .parameters }} {{if eq .name "kubernetes" }} {{ (lookup "v1" "ConfigMap" "kube-system" "cluster-dns").data.clusterDomain }} {{ end }} {{.parameters}}{{ end }}{{ if .configBlock }} { + {{ .configBlock | indent 12 }} + }{{ end }} + {{- end }} diff --git a/packages/rke2-coredns/generated-changes/patch/templates/deployment-autoscaler.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/deployment-autoscaler.yaml.patch new file mode 100644 index 0000000..9ed1380 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/deployment-autoscaler.yaml.patch @@ -0,0 +1,37 @@ +--- charts-original/templates/deployment-autoscaler.yaml ++++ charts/templates/deployment-autoscaler.yaml +@@ -10,7 +10,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name }}-autoscaler ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name }}-autoscaler + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- end }} +@@ -23,14 +23,14 @@ + matchLabels: + app.kubernetes.io/instance: {{ .Release.Name | quote }} + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name }}-autoscaler ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name }}-autoscaler + {{- end }} + app.kubernetes.io/name: {{ template "coredns.name" . }}-autoscaler + template: + metadata: + labels: + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name }}-autoscaler ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name }}-autoscaler + {{- end }} + app.kubernetes.io/name: {{ template "coredns.name" . }}-autoscaler + app.kubernetes.io/instance: {{ .Release.Name | quote }} +@@ -63,7 +63,7 @@ + {{- end }} + containers: + - name: autoscaler +- image: "{{ .Values.autoscaler.image.repository }}:{{ .Values.autoscaler.image.tag }}" ++ image: {{ template "system_default_registry" . }}{{ .Values.autoscaler.image.repository }}:{{ .Values.autoscaler.image.tag }} + imagePullPolicy: {{ .Values.autoscaler.image.pullPolicy }} + resources: + {{ toYaml .Values.autoscaler.resources | indent 10 }} diff --git a/packages/rke2-coredns/generated-changes/patch/templates/deployment.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/deployment.yaml.patch new file mode 100644 index 0000000..ed5b9e1 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/deployment.yaml.patch @@ -0,0 +1,62 @@ +--- charts-original/templates/deployment.yaml ++++ charts/templates/deployment.yaml +@@ -7,7 +7,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- end }} +@@ -28,14 +28,14 @@ + matchLabels: + app.kubernetes.io/instance: {{ .Release.Name | quote }} + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + {{- end }} + app.kubernetes.io/name: {{ template "coredns.name" . }} + template: + metadata: + labels: + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + {{- end }} + app.kubernetes.io/name: {{ template "coredns.name" . }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} +@@ -46,7 +46,6 @@ + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- if .Values.isClusterService }} + scheduler.alpha.kubernetes.io/critical-pod: '' +- scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]' + {{- end }} + spec: + serviceAccountName: {{ template "coredns.serviceAccountName" . }} +@@ -60,9 +59,15 @@ + affinity: + {{ toYaml .Values.affinity | indent 8 }} + {{- end }} +- {{- if .Values.tolerations }} ++ {{- if or (.Values.isClusterService) (.Values.tolerations) }} + tolerations: ++ {{- if .Values.isClusterService }} ++ - key: CriticalAddonsOnly ++ operator: Exists ++ {{- end }} ++ {{- if .Values.tolerations }} + {{ toYaml .Values.tolerations | indent 8 }} ++ {{- end }} + {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: +@@ -70,7 +75,7 @@ + {{- end }} + containers: + - name: "coredns" +- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" ++ image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: [ "-conf", "/etc/coredns/Corefile" ] + volumeMounts: diff --git a/packages/rke2-coredns/generated-changes/patch/templates/poddisruptionbudget.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/poddisruptionbudget.yaml.patch new file mode 100644 index 0000000..3f71422 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/poddisruptionbudget.yaml.patch @@ -0,0 +1,20 @@ +--- charts-original/templates/poddisruptionbudget.yaml ++++ charts/templates/poddisruptionbudget.yaml +@@ -8,7 +8,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- end }} +@@ -21,7 +21,7 @@ + matchLabels: + app.kubernetes.io/instance: {{ .Release.Name | quote }} + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + {{- end }} + app.kubernetes.io/name: {{ template "coredns.name" . }} + {{ toYaml .Values.podDisruptionBudget | indent 2 }} diff --git a/packages/rke2-coredns/generated-changes/patch/templates/podsecuritypolicy.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/podsecuritypolicy.yaml.patch new file mode 100644 index 0000000..106ea3d --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/podsecuritypolicy.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/podsecuritypolicy.yaml ++++ charts/templates/podsecuritypolicy.yaml +@@ -12,7 +12,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- else }} diff --git a/packages/rke2-coredns/generated-changes/patch/templates/service-metrics.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/service-metrics.yaml.patch new file mode 100644 index 0000000..6462918 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/service-metrics.yaml.patch @@ -0,0 +1,20 @@ +--- charts-original/templates/service-metrics.yaml ++++ charts/templates/service-metrics.yaml +@@ -8,7 +8,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- end }} +@@ -23,7 +23,7 @@ + selector: + app.kubernetes.io/instance: {{ .Release.Name | quote }} + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + {{- end }} + app.kubernetes.io/name: {{ template "coredns.name" . }} + ports: diff --git a/packages/rke2-coredns/generated-changes/patch/templates/service.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/service.yaml.patch new file mode 100644 index 0000000..797e2f3 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/service.yaml.patch @@ -0,0 +1,26 @@ +--- charts-original/templates/service.yaml ++++ charts/templates/service.yaml +@@ -7,7 +7,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- end }} +@@ -21,11 +21,13 @@ + selector: + app.kubernetes.io/instance: {{ .Release.Name | quote }} + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + {{- end }} + app.kubernetes.io/name: {{ template "coredns.name" . }} + {{- if .Values.service.clusterIP }} + clusterIP: {{ .Values.service.clusterIP }} ++ {{ else }} ++ clusterIP: {{ (lookup "v1" "ConfigMap" "kube-system" "cluster-dns").data.clusterDNS }} + {{- end }} + {{- if .Values.service.externalTrafficPolicy }} + externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} diff --git a/packages/rke2-coredns/generated-changes/patch/templates/serviceaccount-autoscaler.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/serviceaccount-autoscaler.yaml.patch new file mode 100644 index 0000000..0df1266 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/serviceaccount-autoscaler.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/serviceaccount-autoscaler.yaml ++++ charts/templates/serviceaccount-autoscaler.yaml +@@ -10,7 +10,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name }}-autoscaler ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name }}-autoscaler + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- end }} diff --git a/packages/rke2-coredns/generated-changes/patch/templates/serviceaccount.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/serviceaccount.yaml.patch new file mode 100644 index 0000000..ab3fe63 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/serviceaccount.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/serviceaccount.yaml ++++ charts/templates/serviceaccount.yaml +@@ -8,7 +8,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- end }} diff --git a/packages/rke2-coredns/generated-changes/patch/templates/servicemonitor.yaml.patch b/packages/rke2-coredns/generated-changes/patch/templates/servicemonitor.yaml.patch new file mode 100644 index 0000000..e3da0ab --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/templates/servicemonitor.yaml.patch @@ -0,0 +1,20 @@ +--- charts-original/templates/servicemonitor.yaml ++++ charts/templates/servicemonitor.yaml +@@ -11,7 +11,7 @@ + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "CoreDNS" + {{- end }} +@@ -24,7 +24,7 @@ + matchLabels: + app.kubernetes.io/instance: {{ .Release.Name | quote }} + {{- if .Values.isClusterService }} +- k8s-app: {{ .Chart.Name | quote }} ++ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} + {{- end }} + app.kubernetes.io/name: {{ template "coredns.name" . }} + app.kubernetes.io/component: metrics diff --git a/packages/rke2-coredns/generated-changes/patch/values.yaml.patch b/packages/rke2-coredns/generated-changes/patch/values.yaml.patch new file mode 100644 index 0000000..3b870d9 --- /dev/null +++ b/packages/rke2-coredns/generated-changes/patch/values.yaml.patch @@ -0,0 +1,43 @@ +--- charts-original/values.yaml ++++ charts/values.yaml +@@ -3,8 +3,8 @@ + # Declare variables to be passed into your templates. + + image: +- repository: coredns/coredns +- tag: "1.6.9" ++ repository: rancher/hardened-coredns ++ tag: "v1.6.9-build20210223" + pullPolicy: IfNotPresent + + replicaCount: 1 +@@ -34,10 +34,10 @@ + prometheus.io/port: "9153" + + serviceAccount: +- create: false ++ create: true + # The name of the ServiceAccount to use + # If not set and create is true, a name is generated using the fullname template +- name: ++ name: coredns + + rbac: + # If true, create & use RBAC resources +@@ -52,7 +52,7 @@ + isClusterService: true + + # Optional priority class to be used for the coredns pods. Used for autoscaler if autoscaler.priorityClassName not set. +-priorityClassName: "" ++priorityClassName: "system-cluster-critical" + + # Default zone is what Kubernetes recommends: + # https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/#coredns-configmap-options +@@ -196,3 +196,7 @@ + ## Annotations for the coredns-autoscaler configmap + # i.e. strategy.spinnaker.io/versioned: "false" to ensure configmap isn't renamed + annotations: {} ++k8sApp : "kube-dns" ++ ++global: ++ systemDefaultRegistry: "" diff --git a/packages/rke2-coredns/package.yaml b/packages/rke2-coredns/package.yaml index 6389f0b..c410395 100644 --- a/packages/rke2-coredns/package.yaml +++ b/packages/rke2-coredns/package.yaml @@ -1,2 +1,3 @@ url: https://charts.helm.sh/stable/packages/coredns-1.10.1.tgz packageVersion: 01 +releaseCandidateVersion: 00 diff --git a/packages/rke2-coredns/rke2-coredns.patch b/packages/rke2-coredns/rke2-coredns.patch deleted file mode 100644 index db142a8..0000000 --- a/packages/rke2-coredns/rke2-coredns.patch +++ /dev/null @@ -1,388 +0,0 @@ -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/Chart.yaml packages/rke2-coredns/charts/Chart.yaml ---- packages/rke2-coredns/charts-original/Chart.yaml -+++ packages/rke2-coredns/charts/Chart.yaml -@@ -17,7 +17,7 @@ - name: andor44 - - email: manuel@rueg.eu - name: mrueg --name: coredns -+name: rke2-coredns - sources: - - https://github.com/coredns/coredns --version: 1.10.1 -+version: 1.10.101-build20210223 -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/_helpers.tpl packages/rke2-coredns/charts/templates/_helpers.tpl ---- packages/rke2-coredns/charts-original/templates/_helpers.tpl -+++ packages/rke2-coredns/charts/templates/_helpers.tpl -@@ -137,6 +137,7 @@ - {{- end -}} - {{- end -}} - -+ - {{/* - Create the name of the service account to use - */}} -@@ -147,3 +148,11 @@ - {{ default "default" .Values.serviceAccount.name }} - {{- end -}} - {{- end -}} -+ -+{{- define "system_default_registry" -}} -+{{- if .Values.global.systemDefaultRegistry -}} -+{{- printf "%s/" .Values.global.systemDefaultRegistry -}} -+{{- else -}} -+{{- "" -}} -+{{- end -}} -+{{- end -}} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/clusterrole-autoscaler.yaml packages/rke2-coredns/charts/templates/clusterrole-autoscaler.yaml ---- packages/rke2-coredns/charts-original/templates/clusterrole-autoscaler.yaml -+++ packages/rke2-coredns/charts/templates/clusterrole-autoscaler.yaml -@@ -9,7 +9,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name }}-autoscaler -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name }}-autoscaler - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- end }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/clusterrole.yaml packages/rke2-coredns/charts/templates/clusterrole.yaml ---- packages/rke2-coredns/charts-original/templates/clusterrole.yaml -+++ packages/rke2-coredns/charts/templates/clusterrole.yaml -@@ -8,7 +8,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- end }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/clusterrolebinding-autoscaler.yaml packages/rke2-coredns/charts/templates/clusterrolebinding-autoscaler.yaml ---- packages/rke2-coredns/charts-original/templates/clusterrolebinding-autoscaler.yaml -+++ packages/rke2-coredns/charts/templates/clusterrolebinding-autoscaler.yaml -@@ -9,7 +9,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name }}-autoscaler -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name }}-autoscaler - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- end }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/clusterrolebinding.yaml packages/rke2-coredns/charts/templates/clusterrolebinding.yaml ---- packages/rke2-coredns/charts-original/templates/clusterrolebinding.yaml -+++ packages/rke2-coredns/charts/templates/clusterrolebinding.yaml -@@ -8,7 +8,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- end }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/configmap-autoscaler.yaml packages/rke2-coredns/charts/templates/configmap-autoscaler.yaml ---- packages/rke2-coredns/charts-original/templates/configmap-autoscaler.yaml -+++ packages/rke2-coredns/charts/templates/configmap-autoscaler.yaml -@@ -10,7 +10,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name }}-autoscaler -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name }}-autoscaler - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- end }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/configmap.yaml packages/rke2-coredns/charts/templates/configmap.yaml ---- packages/rke2-coredns/charts-original/templates/configmap.yaml -+++ packages/rke2-coredns/charts/templates/configmap.yaml -@@ -7,7 +7,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- end }} -@@ -19,7 +19,7 @@ - {{- if .port }}:{{ .port }} {{ end -}} - { - {{- range .plugins }} -- {{ .name }}{{ if .parameters }} {{ .parameters }}{{ end }}{{ if .configBlock }} { -+ {{ .name }} {{ if .parameters }} {{if eq .name "kubernetes" }} {{ (lookup "v1" "ConfigMap" "kube-system" "cluster-dns").data.clusterDomain }} {{ end }} {{.parameters}}{{ end }}{{ if .configBlock }} { - {{ .configBlock | indent 12 }} - }{{ end }} - {{- end }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/deployment-autoscaler.yaml packages/rke2-coredns/charts/templates/deployment-autoscaler.yaml ---- packages/rke2-coredns/charts-original/templates/deployment-autoscaler.yaml -+++ packages/rke2-coredns/charts/templates/deployment-autoscaler.yaml -@@ -10,7 +10,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name }}-autoscaler -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name }}-autoscaler - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- end }} -@@ -23,14 +23,14 @@ - matchLabels: - app.kubernetes.io/instance: {{ .Release.Name | quote }} - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name }}-autoscaler -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name }}-autoscaler - {{- end }} - app.kubernetes.io/name: {{ template "coredns.name" . }}-autoscaler - template: - metadata: - labels: - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name }}-autoscaler -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name }}-autoscaler - {{- end }} - app.kubernetes.io/name: {{ template "coredns.name" . }}-autoscaler - app.kubernetes.io/instance: {{ .Release.Name | quote }} -@@ -63,7 +63,7 @@ - {{- end }} - containers: - - name: autoscaler -- image: "{{ .Values.autoscaler.image.repository }}:{{ .Values.autoscaler.image.tag }}" -+ image: {{ template "system_default_registry" . }}{{ .Values.autoscaler.image.repository }}:{{ .Values.autoscaler.image.tag }} - imagePullPolicy: {{ .Values.autoscaler.image.pullPolicy }} - resources: - {{ toYaml .Values.autoscaler.resources | indent 10 }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/deployment.yaml packages/rke2-coredns/charts/templates/deployment.yaml ---- packages/rke2-coredns/charts-original/templates/deployment.yaml -+++ packages/rke2-coredns/charts/templates/deployment.yaml -@@ -7,7 +7,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- end }} -@@ -28,14 +28,14 @@ - matchLabels: - app.kubernetes.io/instance: {{ .Release.Name | quote }} - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - {{- end }} - app.kubernetes.io/name: {{ template "coredns.name" . }} - template: - metadata: - labels: - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - {{- end }} - app.kubernetes.io/name: {{ template "coredns.name" . }} - app.kubernetes.io/instance: {{ .Release.Name | quote }} -@@ -46,7 +46,6 @@ - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - {{- if .Values.isClusterService }} - scheduler.alpha.kubernetes.io/critical-pod: '' -- scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]' - {{- end }} - spec: - serviceAccountName: {{ template "coredns.serviceAccountName" . }} -@@ -60,9 +59,15 @@ - affinity: - {{ toYaml .Values.affinity | indent 8 }} - {{- end }} -- {{- if .Values.tolerations }} -+ {{- if or (.Values.isClusterService) (.Values.tolerations) }} - tolerations: -+ {{- if .Values.isClusterService }} -+ - key: CriticalAddonsOnly -+ operator: Exists -+ {{- end }} -+ {{- if .Values.tolerations }} - {{ toYaml .Values.tolerations | indent 8 }} -+ {{- end }} - {{- end }} - {{- if .Values.nodeSelector }} - nodeSelector: -@@ -70,7 +75,7 @@ - {{- end }} - containers: - - name: "coredns" -- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" -+ image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - args: [ "-conf", "/etc/coredns/Corefile" ] - volumeMounts: -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/poddisruptionbudget.yaml packages/rke2-coredns/charts/templates/poddisruptionbudget.yaml ---- packages/rke2-coredns/charts-original/templates/poddisruptionbudget.yaml -+++ packages/rke2-coredns/charts/templates/poddisruptionbudget.yaml -@@ -8,7 +8,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- end }} -@@ -21,7 +21,7 @@ - matchLabels: - app.kubernetes.io/instance: {{ .Release.Name | quote }} - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - {{- end }} - app.kubernetes.io/name: {{ template "coredns.name" . }} - {{ toYaml .Values.podDisruptionBudget | indent 2 }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/podsecuritypolicy.yaml packages/rke2-coredns/charts/templates/podsecuritypolicy.yaml ---- packages/rke2-coredns/charts-original/templates/podsecuritypolicy.yaml -+++ packages/rke2-coredns/charts/templates/podsecuritypolicy.yaml -@@ -12,7 +12,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- else }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/service-metrics.yaml packages/rke2-coredns/charts/templates/service-metrics.yaml ---- packages/rke2-coredns/charts-original/templates/service-metrics.yaml -+++ packages/rke2-coredns/charts/templates/service-metrics.yaml -@@ -8,7 +8,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- end }} -@@ -23,7 +23,7 @@ - selector: - app.kubernetes.io/instance: {{ .Release.Name | quote }} - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - {{- end }} - app.kubernetes.io/name: {{ template "coredns.name" . }} - ports: -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/service.yaml packages/rke2-coredns/charts/templates/service.yaml ---- packages/rke2-coredns/charts-original/templates/service.yaml -+++ packages/rke2-coredns/charts/templates/service.yaml -@@ -7,7 +7,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- end }} -@@ -21,11 +21,13 @@ - selector: - app.kubernetes.io/instance: {{ .Release.Name | quote }} - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - {{- end }} - app.kubernetes.io/name: {{ template "coredns.name" . }} - {{- if .Values.service.clusterIP }} - clusterIP: {{ .Values.service.clusterIP }} -+ {{ else }} -+ clusterIP: {{ (lookup "v1" "ConfigMap" "kube-system" "cluster-dns").data.clusterDNS }} - {{- end }} - {{- if .Values.service.externalTrafficPolicy }} - externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/serviceaccount-autoscaler.yaml packages/rke2-coredns/charts/templates/serviceaccount-autoscaler.yaml ---- packages/rke2-coredns/charts-original/templates/serviceaccount-autoscaler.yaml -+++ packages/rke2-coredns/charts/templates/serviceaccount-autoscaler.yaml -@@ -10,7 +10,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name }}-autoscaler -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name }}-autoscaler - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- end }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/serviceaccount.yaml packages/rke2-coredns/charts/templates/serviceaccount.yaml ---- packages/rke2-coredns/charts-original/templates/serviceaccount.yaml -+++ packages/rke2-coredns/charts/templates/serviceaccount.yaml -@@ -8,7 +8,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- end }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/templates/servicemonitor.yaml packages/rke2-coredns/charts/templates/servicemonitor.yaml ---- packages/rke2-coredns/charts-original/templates/servicemonitor.yaml -+++ packages/rke2-coredns/charts/templates/servicemonitor.yaml -@@ -11,7 +11,7 @@ - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - {{- end }} -@@ -24,7 +24,7 @@ - matchLabels: - app.kubernetes.io/instance: {{ .Release.Name | quote }} - {{- if .Values.isClusterService }} -- k8s-app: {{ .Chart.Name | quote }} -+ k8s-app: {{ .Values.k8sApp | default .Chart.Name | quote }} - {{- end }} - app.kubernetes.io/name: {{ template "coredns.name" . }} - app.kubernetes.io/component: metrics -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-coredns/charts-original/values.yaml packages/rke2-coredns/charts/values.yaml ---- packages/rke2-coredns/charts-original/values.yaml -+++ packages/rke2-coredns/charts/values.yaml -@@ -3,8 +3,8 @@ - # Declare variables to be passed into your templates. - - image: -- repository: coredns/coredns -- tag: "1.6.9" -+ repository: rancher/hardened-coredns -+ tag: "v1.6.9-build20210223" - pullPolicy: IfNotPresent - - replicaCount: 1 -@@ -34,10 +34,10 @@ - prometheus.io/port: "9153" - - serviceAccount: -- create: false -+ create: true - # The name of the ServiceAccount to use - # If not set and create is true, a name is generated using the fullname template -- name: -+ name: coredns - - rbac: - # If true, create & use RBAC resources -@@ -52,7 +52,7 @@ - isClusterService: true - - # Optional priority class to be used for the coredns pods. Used for autoscaler if autoscaler.priorityClassName not set. --priorityClassName: "" -+priorityClassName: "system-cluster-critical" - - # Default zone is what Kubernetes recommends: - # https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/#coredns-configmap-options -@@ -196,3 +196,7 @@ - ## Annotations for the coredns-autoscaler configmap - # i.e. strategy.spinnaker.io/versioned: "false" to ensure configmap isn't renamed - annotations: {} -+k8sApp : "kube-dns" -+ -+global: -+ systemDefaultRegistry: "" diff --git a/packages/rke2-ingress-nginx/generated-changes/patch/Chart.yaml.patch b/packages/rke2-ingress-nginx/generated-changes/patch/Chart.yaml.patch new file mode 100644 index 0000000..9a7b08c --- /dev/null +++ b/packages/rke2-ingress-nginx/generated-changes/patch/Chart.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/Chart.yaml ++++ charts/Chart.yaml +@@ -10,7 +10,7 @@ + kubeVersion: '>=1.16.0-0' + maintainers: + - name: ChiefAlexander +-name: ingress-nginx ++name: rke2-ingress-nginx + sources: + - https://github.com/kubernetes/ingress-nginx + version: 3.3.0 diff --git a/packages/rke2-ingress-nginx/generated-changes/patch/templates/_helpers.tpl.patch b/packages/rke2-ingress-nginx/generated-changes/patch/templates/_helpers.tpl.patch new file mode 100644 index 0000000..eb71229 --- /dev/null +++ b/packages/rke2-ingress-nginx/generated-changes/patch/templates/_helpers.tpl.patch @@ -0,0 +1,19 @@ +--- charts-original/templates/_helpers.tpl ++++ charts/templates/_helpers.tpl +@@ -118,7 +118,15 @@ + Check the ingress controller version tag is at most three versions behind the last release + */}} + {{- define "isControllerTagValid" -}} +-{{- if not (semverCompare ">=0.27.0-0" .Values.controller.image.tag) -}} ++{{- if not (semverCompare ">=0.27.0-0" (trimPrefix "nginx-" .Values.controller.image.tag)) -}} + {{- fail "Controller container image tag should be 0.27.0 or higher" -}} + {{- end -}} + {{- end -}} ++ ++{{- define "system_default_registry" -}} ++{{- if .Values.global.systemDefaultRegistry -}} ++{{- printf "%s/" .Values.global.systemDefaultRegistry -}} ++{{- else -}} ++{{- "" -}} ++{{- end -}} ++{{- end -}} diff --git a/packages/rke2-ingress-nginx/generated-changes/patch/templates/admission-webhooks/job-patch/job-createSecret.yaml.patch b/packages/rke2-ingress-nginx/generated-changes/patch/templates/admission-webhooks/job-patch/job-createSecret.yaml.patch new file mode 100644 index 0000000..4ba69b6 --- /dev/null +++ b/packages/rke2-ingress-nginx/generated-changes/patch/templates/admission-webhooks/job-patch/job-createSecret.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/admission-webhooks/job-patch/job-createSecret.yaml ++++ charts/templates/admission-webhooks/job-patch/job-createSecret.yaml +@@ -33,7 +33,7 @@ + containers: + - name: create + {{- with .Values.controller.admissionWebhooks.patch.image }} +- image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" ++ image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" + {{- end }} + imagePullPolicy: {{ .Values.controller.admissionWebhooks.patch.image.pullPolicy }} + args: diff --git a/packages/rke2-ingress-nginx/generated-changes/patch/templates/admission-webhooks/job-patch/job-patchWebhook.yaml.patch b/packages/rke2-ingress-nginx/generated-changes/patch/templates/admission-webhooks/job-patch/job-patchWebhook.yaml.patch new file mode 100644 index 0000000..f89b333 --- /dev/null +++ b/packages/rke2-ingress-nginx/generated-changes/patch/templates/admission-webhooks/job-patch/job-patchWebhook.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/admission-webhooks/job-patch/job-patchWebhook.yaml ++++ charts/templates/admission-webhooks/job-patch/job-patchWebhook.yaml +@@ -33,7 +33,7 @@ + containers: + - name: patch + {{- with .Values.controller.admissionWebhooks.patch.image }} +- image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" ++ image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" + {{- end }} + imagePullPolicy: {{ .Values.controller.admissionWebhooks.patch.image.pullPolicy }} + args: diff --git a/packages/rke2-ingress-nginx/generated-changes/patch/templates/controller-daemonset.yaml.patch b/packages/rke2-ingress-nginx/generated-changes/patch/templates/controller-daemonset.yaml.patch new file mode 100644 index 0000000..403b79f --- /dev/null +++ b/packages/rke2-ingress-nginx/generated-changes/patch/templates/controller-daemonset.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/controller-daemonset.yaml ++++ charts/templates/controller-daemonset.yaml +@@ -61,7 +61,7 @@ + containers: + - name: controller + {{- with .Values.controller.image }} +- image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" ++ image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" + {{- end }} + imagePullPolicy: {{ .Values.controller.image.pullPolicy }} + {{- if .Values.controller.lifecycle }} diff --git a/packages/rke2-ingress-nginx/generated-changes/patch/templates/controller-deployment.yaml.patch b/packages/rke2-ingress-nginx/generated-changes/patch/templates/controller-deployment.yaml.patch new file mode 100644 index 0000000..3536352 --- /dev/null +++ b/packages/rke2-ingress-nginx/generated-changes/patch/templates/controller-deployment.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/controller-deployment.yaml ++++ charts/templates/controller-deployment.yaml +@@ -65,7 +65,7 @@ + containers: + - name: controller + {{- with .Values.controller.image }} +- image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" ++ image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" + {{- end }} + imagePullPolicy: {{ .Values.controller.image.pullPolicy }} + {{- if .Values.controller.lifecycle }} diff --git a/packages/rke2-ingress-nginx/generated-changes/patch/templates/default-backend-deployment.yaml.patch b/packages/rke2-ingress-nginx/generated-changes/patch/templates/default-backend-deployment.yaml.patch new file mode 100644 index 0000000..21034c1 --- /dev/null +++ b/packages/rke2-ingress-nginx/generated-changes/patch/templates/default-backend-deployment.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/default-backend-deployment.yaml ++++ charts/templates/default-backend-deployment.yaml +@@ -37,7 +37,7 @@ + containers: + - name: {{ template "ingress-nginx.name" . }}-default-backend + {{- with .Values.defaultBackend.image }} +- image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" ++ image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" + {{- end }} + imagePullPolicy: {{ .Values.defaultBackend.image.pullPolicy }} + {{- if .Values.defaultBackend.extraArgs }} diff --git a/packages/rke2-ingress-nginx/generated-changes/patch/values.yaml.patch b/packages/rke2-ingress-nginx/generated-changes/patch/values.yaml.patch new file mode 100644 index 0000000..0927d9a --- /dev/null +++ b/packages/rke2-ingress-nginx/generated-changes/patch/values.yaml.patch @@ -0,0 +1,58 @@ +--- charts-original/values.yaml ++++ charts/values.yaml +@@ -3,8 +3,8 @@ + ## + controller: + image: +- repository: k8s.gcr.io/ingress-nginx/controller +- tag: "v0.35.0" ++ repository: rancher/nginx-ingress-controller ++ tag: "nginx-0.35.0-rancher2" + digest: sha256:fc4979d8b8443a831c9789b5155cded454cb7de737a8b727bc2ba0106d2eae8b + pullPolicy: IfNotPresent + # www-data -> uid 101 +@@ -35,7 +35,7 @@ + # Optionally change this to ClusterFirstWithHostNet in case you have 'hostNetwork: true'. + # By default, while using host network, name resolution uses the host's DNS. If you wish nginx-controller + # to keep resolving names inside the k8s network, use ClusterFirstWithHostNet. +- dnsPolicy: ClusterFirst ++ dnsPolicy: ClusterFirstWithHostNet + + # Bare-metal considerations via the host network https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network + # Ingress status was blank because there is no Service exposing the NGINX Ingress controller in a configuration using the host network, the default --publish-service flag used in standard cloud setups does not apply +@@ -44,7 +44,7 @@ + # Required for use with CNI based kubernetes installations (such as ones set up by kubeadm), + # since CNI and hostport don't mix yet. Can be deprecated once https://github.com/kubernetes/kubernetes/issues/23920 + # is merged +- hostNetwork: false ++ hostNetwork: true + + ## Use host ports 80 and 443 + ## Disabled by default +@@ -301,7 +301,7 @@ + configMapKey: "" + + service: +- enabled: true ++ enabled: false + + annotations: {} + labels: {} +@@ -540,8 +540,8 @@ + enabled: false + + image: +- repository: k8s.gcr.io/defaultbackend-amd64 +- tag: "1.5" ++ repository: rancher/nginx-ingress-controller-defaultbackend ++ tag: "1.5-rancher1" + pullPolicy: IfNotPresent + # nobody user -> uid 65534 + runAsUser: 65534 +@@ -661,3 +661,6 @@ + ## + udp: {} + # 53: "kube-system/kube-dns:53" ++ ++global: ++ systemDefaultRegistry: "" diff --git a/packages/rke2-ingress-nginx/package.yaml b/packages/rke2-ingress-nginx/package.yaml index 54bf19e..69f555d 100644 --- a/packages/rke2-ingress-nginx/package.yaml +++ b/packages/rke2-ingress-nginx/package.yaml @@ -1,2 +1,3 @@ url: https://github.com/kubernetes/ingress-nginx/releases/download/ingress-nginx-3.3.0/ingress-nginx-3.3.0.tgz packageVersion: 00 +releaseCandidateVersion: 00 diff --git a/packages/rke2-ingress-nginx/rke2-ingress-nginx.patch b/packages/rke2-ingress-nginx/rke2-ingress-nginx.patch deleted file mode 100644 index 069deb7..0000000 --- a/packages/rke2-ingress-nginx/rke2-ingress-nginx.patch +++ /dev/null @@ -1,151 +0,0 @@ -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/Chart.yaml packages/rke2-ingress-nginx/charts/Chart.yaml ---- packages/rke2-ingress-nginx/charts-original/Chart.yaml -+++ packages/rke2-ingress-nginx/charts/Chart.yaml -@@ -10,7 +10,7 @@ - kubeVersion: '>=1.16.0-0' - maintainers: - - name: ChiefAlexander --name: ingress-nginx -+name: rke2-ingress-nginx - sources: - - https://github.com/kubernetes/ingress-nginx - version: 3.3.0 -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/_helpers.tpl packages/rke2-ingress-nginx/charts/templates/_helpers.tpl ---- packages/rke2-ingress-nginx/charts-original/templates/_helpers.tpl -+++ packages/rke2-ingress-nginx/charts/templates/_helpers.tpl -@@ -118,7 +118,15 @@ - Check the ingress controller version tag is at most three versions behind the last release - */}} - {{- define "isControllerTagValid" -}} --{{- if not (semverCompare ">=0.27.0-0" .Values.controller.image.tag) -}} -+{{- if not (semverCompare ">=0.27.0-0" (trimPrefix "nginx-" .Values.controller.image.tag)) -}} - {{- fail "Controller container image tag should be 0.27.0 or higher" -}} - {{- end -}} - {{- end -}} -+ -+{{- define "system_default_registry" -}} -+{{- if .Values.global.systemDefaultRegistry -}} -+{{- printf "%s/" .Values.global.systemDefaultRegistry -}} -+{{- else -}} -+{{- "" -}} -+{{- end -}} -+{{- end -}} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/admission-webhooks/job-patch/job-createSecret.yaml packages/rke2-ingress-nginx/charts/templates/admission-webhooks/job-patch/job-createSecret.yaml ---- packages/rke2-ingress-nginx/charts-original/templates/admission-webhooks/job-patch/job-createSecret.yaml -+++ packages/rke2-ingress-nginx/charts/templates/admission-webhooks/job-patch/job-createSecret.yaml -@@ -33,7 +33,7 @@ - containers: - - name: create - {{- with .Values.controller.admissionWebhooks.patch.image }} -- image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" -+ image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" - {{- end }} - imagePullPolicy: {{ .Values.controller.admissionWebhooks.patch.image.pullPolicy }} - args: -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/admission-webhooks/job-patch/job-patchWebhook.yaml packages/rke2-ingress-nginx/charts/templates/admission-webhooks/job-patch/job-patchWebhook.yaml ---- packages/rke2-ingress-nginx/charts-original/templates/admission-webhooks/job-patch/job-patchWebhook.yaml -+++ packages/rke2-ingress-nginx/charts/templates/admission-webhooks/job-patch/job-patchWebhook.yaml -@@ -33,7 +33,7 @@ - containers: - - name: patch - {{- with .Values.controller.admissionWebhooks.patch.image }} -- image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" -+ image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" - {{- end }} - imagePullPolicy: {{ .Values.controller.admissionWebhooks.patch.image.pullPolicy }} - args: -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/controller-daemonset.yaml packages/rke2-ingress-nginx/charts/templates/controller-daemonset.yaml ---- packages/rke2-ingress-nginx/charts-original/templates/controller-daemonset.yaml -+++ packages/rke2-ingress-nginx/charts/templates/controller-daemonset.yaml -@@ -61,7 +61,7 @@ - containers: - - name: controller - {{- with .Values.controller.image }} -- image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" -+ image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" - {{- end }} - imagePullPolicy: {{ .Values.controller.image.pullPolicy }} - {{- if .Values.controller.lifecycle }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/controller-deployment.yaml packages/rke2-ingress-nginx/charts/templates/controller-deployment.yaml ---- packages/rke2-ingress-nginx/charts-original/templates/controller-deployment.yaml -+++ packages/rke2-ingress-nginx/charts/templates/controller-deployment.yaml -@@ -65,7 +65,7 @@ - containers: - - name: controller - {{- with .Values.controller.image }} -- image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" -+ image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" - {{- end }} - imagePullPolicy: {{ .Values.controller.image.pullPolicy }} - {{- if .Values.controller.lifecycle }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/default-backend-deployment.yaml packages/rke2-ingress-nginx/charts/templates/default-backend-deployment.yaml ---- packages/rke2-ingress-nginx/charts-original/templates/default-backend-deployment.yaml -+++ packages/rke2-ingress-nginx/charts/templates/default-backend-deployment.yaml -@@ -37,7 +37,7 @@ - containers: - - name: {{ template "ingress-nginx.name" . }}-default-backend - {{- with .Values.defaultBackend.image }} -- image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" -+ image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" - {{- end }} - imagePullPolicy: {{ .Values.defaultBackend.image.pullPolicy }} - {{- if .Values.defaultBackend.extraArgs }} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/values.yaml packages/rke2-ingress-nginx/charts/values.yaml ---- packages/rke2-ingress-nginx/charts-original/values.yaml -+++ packages/rke2-ingress-nginx/charts/values.yaml -@@ -3,8 +3,8 @@ - ## - controller: - image: -- repository: k8s.gcr.io/ingress-nginx/controller -- tag: "v0.35.0" -+ repository: rancher/nginx-ingress-controller -+ tag: "nginx-0.35.0-rancher2" - digest: sha256:fc4979d8b8443a831c9789b5155cded454cb7de737a8b727bc2ba0106d2eae8b - pullPolicy: IfNotPresent - # www-data -> uid 101 -@@ -35,7 +35,7 @@ - # Optionally change this to ClusterFirstWithHostNet in case you have 'hostNetwork: true'. - # By default, while using host network, name resolution uses the host's DNS. If you wish nginx-controller - # to keep resolving names inside the k8s network, use ClusterFirstWithHostNet. -- dnsPolicy: ClusterFirst -+ dnsPolicy: ClusterFirstWithHostNet - - # Bare-metal considerations via the host network https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network - # Ingress status was blank because there is no Service exposing the NGINX Ingress controller in a configuration using the host network, the default --publish-service flag used in standard cloud setups does not apply -@@ -44,7 +44,7 @@ - # Required for use with CNI based kubernetes installations (such as ones set up by kubeadm), - # since CNI and hostport don't mix yet. Can be deprecated once https://github.com/kubernetes/kubernetes/issues/23920 - # is merged -- hostNetwork: false -+ hostNetwork: true - - ## Use host ports 80 and 443 - ## Disabled by default -@@ -301,7 +301,7 @@ - configMapKey: "" - - service: -- enabled: true -+ enabled: false - - annotations: {} - labels: {} -@@ -540,8 +540,8 @@ - enabled: false - - image: -- repository: k8s.gcr.io/defaultbackend-amd64 -- tag: "1.5" -+ repository: rancher/nginx-ingress-controller-defaultbackend -+ tag: "1.5-rancher1" - pullPolicy: IfNotPresent - # nobody user -> uid 65534 - runAsUser: 65534 -@@ -661,3 +661,6 @@ - ## - udp: {} - # 53: "kube-system/kube-dns:53" -+ -+global: -+ systemDefaultRegistry: "" diff --git a/packages/rke2-kube-proxy/package.yaml b/packages/rke2-kube-proxy/package.yaml new file mode 100644 index 0000000..ad1b360 --- /dev/null +++ b/packages/rke2-kube-proxy/package.yaml @@ -0,0 +1,3 @@ +url: local +packageVersion: 00 +releaseCandidateVersion: 00 diff --git a/packages/rke2-metrics-server/generated-changes/patch/Chart.yaml.patch b/packages/rke2-metrics-server/generated-changes/patch/Chart.yaml.patch new file mode 100644 index 0000000..59924b9 --- /dev/null +++ b/packages/rke2-metrics-server/generated-changes/patch/Chart.yaml.patch @@ -0,0 +1,12 @@ +--- charts-original/Chart.yaml ++++ charts/Chart.yaml +@@ -9,7 +9,7 @@ + name: olemarkus + - email: k.aasan@sportradar.com + name: kennethaasan +-name: metrics-server ++name: rke2-metrics-server + sources: + - https://github.com/kubernetes-incubator/metrics-server +-version: 2.11.1 ++version: 2.11.100-build20210223 diff --git a/packages/rke2-metrics-server/generated-changes/patch/templates/_helpers.tpl.patch b/packages/rke2-metrics-server/generated-changes/patch/templates/_helpers.tpl.patch new file mode 100644 index 0000000..6bb58c1 --- /dev/null +++ b/packages/rke2-metrics-server/generated-changes/patch/templates/_helpers.tpl.patch @@ -0,0 +1,14 @@ +--- charts-original/templates/_helpers.tpl ++++ charts/templates/_helpers.tpl +@@ -49,3 +49,11 @@ + {{ default "default" .Values.serviceAccount.name }} + {{- end -}} + {{- end -}} ++ ++{{- define "system_default_registry" -}} ++{{- if .Values.global.systemDefaultRegistry -}} ++{{- printf "%s/" .Values.global.systemDefaultRegistry -}} ++{{- else -}} ++{{- "" -}} ++{{- end -}} ++{{- end -}} diff --git a/packages/rke2-metrics-server/generated-changes/patch/templates/metrics-server-deployment.yaml.patch b/packages/rke2-metrics-server/generated-changes/patch/templates/metrics-server-deployment.yaml.patch new file mode 100644 index 0000000..afeabe0 --- /dev/null +++ b/packages/rke2-metrics-server/generated-changes/patch/templates/metrics-server-deployment.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/metrics-server-deployment.yaml ++++ charts/templates/metrics-server-deployment.yaml +@@ -47,7 +47,7 @@ + {{- ( tpl (toYaml .Values.extraContainers) . ) | nindent 8 }} + {{- end }} + - name: metrics-server +- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" ++ image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - /metrics-server diff --git a/packages/rke2-metrics-server/generated-changes/patch/values.yaml.patch b/packages/rke2-metrics-server/generated-changes/patch/values.yaml.patch new file mode 100644 index 0000000..baec7f4 --- /dev/null +++ b/packages/rke2-metrics-server/generated-changes/patch/values.yaml.patch @@ -0,0 +1,39 @@ +--- charts-original/values.yaml ++++ charts/values.yaml +@@ -27,16 +27,17 @@ + enabled: false + + image: +- repository: k8s.gcr.io/metrics-server-amd64 +- tag: v0.3.6 ++ repository: rancher/hardened-k8s-metrics-server ++ tag: v0.3.6-build20210223 + pullPolicy: IfNotPresent + + imagePullSecrets: [] + # - registrySecretName + +-args: [] ++args: + # enable this if you have self-signed certificates, see: https://github.com/kubernetes-incubator/metrics-server + # - --kubelet-insecure-tls ++ - --kubelet-preferred-address-types=InternalIP + + resources: {} + +@@ -58,7 +59,7 @@ + # scheduler.alpha.kubernetes.io/critical-pod: '' + + ## Set a pod priorityClassName +-# priorityClassName: system-node-critical ++priorityClassName: system-node-critical + + extraVolumeMounts: [] + # - name: secrets +@@ -107,3 +108,6 @@ + enabled: false + minAvailable: + maxUnavailable: ++ ++global: ++ systemDefaultRegistry: "" diff --git a/packages/rke2-metrics-server/package.yaml b/packages/rke2-metrics-server/package.yaml index 5b8cae6..46f880a 100644 --- a/packages/rke2-metrics-server/package.yaml +++ b/packages/rke2-metrics-server/package.yaml @@ -1,2 +1,3 @@ url: https://charts.helm.sh/stable/packages/metrics-server-2.11.1.tgz packageVersion: 00 +releaseCandidateVersion: 00 diff --git a/packages/rke2-metrics-server/rke2-metrics-server.patch b/packages/rke2-metrics-server/rke2-metrics-server.patch deleted file mode 100644 index 76840e9..0000000 --- a/packages/rke2-metrics-server/rke2-metrics-server.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-metrics-server/charts-original/Chart.yaml packages/rke2-metrics-server/charts/Chart.yaml ---- packages/rke2-metrics-server/charts-original/Chart.yaml -+++ packages/rke2-metrics-server/charts/Chart.yaml -@@ -9,7 +9,7 @@ - name: olemarkus - - email: k.aasan@sportradar.com - name: kennethaasan --name: metrics-server -+name: rke2-metrics-server - sources: - - https://github.com/kubernetes-incubator/metrics-server --version: 2.11.1 -+version: 2.11.100-build20210223 -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-metrics-server/charts-original/templates/_helpers.tpl packages/rke2-metrics-server/charts/templates/_helpers.tpl ---- packages/rke2-metrics-server/charts-original/templates/_helpers.tpl -+++ packages/rke2-metrics-server/charts/templates/_helpers.tpl -@@ -49,3 +49,11 @@ - {{ default "default" .Values.serviceAccount.name }} - {{- end -}} - {{- end -}} -+ -+{{- define "system_default_registry" -}} -+{{- if .Values.global.systemDefaultRegistry -}} -+{{- printf "%s/" .Values.global.systemDefaultRegistry -}} -+{{- else -}} -+{{- "" -}} -+{{- end -}} -+{{- end -}} -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-metrics-server/charts-original/templates/metrics-server-deployment.yaml packages/rke2-metrics-server/charts/templates/metrics-server-deployment.yaml ---- packages/rke2-metrics-server/charts-original/templates/metrics-server-deployment.yaml -+++ packages/rke2-metrics-server/charts/templates/metrics-server-deployment.yaml -@@ -47,7 +47,7 @@ - {{- ( tpl (toYaml .Values.extraContainers) . ) | nindent 8 }} - {{- end }} - - name: metrics-server -- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" -+ image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - command: - - /metrics-server -diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-metrics-server/charts-original/values.yaml packages/rke2-metrics-server/charts/values.yaml ---- packages/rke2-metrics-server/charts-original/values.yaml -+++ packages/rke2-metrics-server/charts/values.yaml -@@ -27,16 +27,17 @@ - enabled: false - - image: -- repository: k8s.gcr.io/metrics-server-amd64 -- tag: v0.3.6 -+ repository: rancher/hardened-k8s-metrics-server -+ tag: v0.3.6-build20210223 - pullPolicy: IfNotPresent - - imagePullSecrets: [] - # - registrySecretName - --args: [] -+args: - # enable this if you have self-signed certificates, see: https://github.com/kubernetes-incubator/metrics-server - # - --kubelet-insecure-tls -+ - --kubelet-preferred-address-types=InternalIP - - resources: {} - -@@ -58,7 +59,7 @@ - # scheduler.alpha.kubernetes.io/critical-pod: '' - - ## Set a pod priorityClassName --# priorityClassName: system-node-critical -+priorityClassName: system-node-critical - - extraVolumeMounts: [] - # - name: secrets -@@ -107,3 +108,6 @@ - enabled: false - minAvailable: - maxUnavailable: -+ -+global: -+ systemDefaultRegistry: ""