From ce3cf5d8b2e110128a6d63152e343dd70c19ba4c Mon Sep 17 00:00:00 2001 From: Furkat Gofurov Date: Tue, 22 Aug 2023 11:31:36 +0300 Subject: [PATCH 1/2] Add k8s v1.27 support to aks-operator Signed-off-by: Furkat Gofurov --- .../rancher-aks-operator-crd/package.yaml | 4 ++-- .../generated-changes/patch/Chart.yaml.patch | 2 +- .../rancher-aks-operator/rancher-aks-operator/package.yaml | 4 ++-- release.yaml | 4 ++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/rancher-aks-operator/rancher-aks-operator-crd/package.yaml b/packages/rancher-aks-operator/rancher-aks-operator-crd/package.yaml index f434888a8a..e8905ed4bf 100644 --- a/packages/rancher-aks-operator/rancher-aks-operator-crd/package.yaml +++ b/packages/rancher-aks-operator/rancher-aks-operator-crd/package.yaml @@ -1,3 +1,3 @@ -url: https://github.com/rancher/aks-operator/releases/download/v1.1.2/rancher-aks-operator-crd-1.1.2.tgz +url: https://github.com/rancher/aks-operator/releases/download/v1.2.0-rc1/rancher-aks-operator-crd-1.2.0-rc1.tgz version: 103.0.0 -doNotRelease: true +doNotRelease: false diff --git a/packages/rancher-aks-operator/rancher-aks-operator/generated-changes/patch/Chart.yaml.patch b/packages/rancher-aks-operator/rancher-aks-operator/generated-changes/patch/Chart.yaml.patch index 98c810cbff..2398d32c2b 100644 --- a/packages/rancher-aks-operator/rancher-aks-operator/generated-changes/patch/Chart.yaml.patch +++ b/packages/rancher-aks-operator/rancher-aks-operator/generated-changes/patch/Chart.yaml.patch @@ -5,7 +5,7 @@ catalog.cattle.io/certified: rancher catalog.cattle.io/hidden: "true" - catalog.cattle.io/kube-version: '>= 1.18.0-0' -+ catalog.cattle.io/kube-version: '>= 1.20.0-0 < 1.27.0-0' ++ catalog.cattle.io/kube-version: '>= 1.20.0-0 < 1.28.0-0' catalog.cattle.io/namespace: cattle-system catalog.cattle.io/os: linux catalog.cattle.io/permits-os: linux,windows diff --git a/packages/rancher-aks-operator/rancher-aks-operator/package.yaml b/packages/rancher-aks-operator/rancher-aks-operator/package.yaml index 1629d7321e..05bfe05792 100644 --- a/packages/rancher-aks-operator/rancher-aks-operator/package.yaml +++ b/packages/rancher-aks-operator/rancher-aks-operator/package.yaml @@ -1,3 +1,3 @@ -url: https://github.com/rancher/aks-operator/releases/download/v1.1.2/rancher-aks-operator-1.1.2.tgz +url: https://github.com/rancher/aks-operator/releases/download/v1.2.0-rc1/rancher-aks-operator-1.2.0-rc1.tgz version: 103.0.0 -doNotRelease: true +doNotRelease: false diff --git a/release.yaml b/release.yaml index 7fed2a4083..c181497f35 100644 --- a/release.yaml +++ b/release.yaml @@ -10,3 +10,7 @@ fleet-crd: - 102.1.1+up0.7.1 rancher-webhook: - 103.0.0+up0.4.0-rc2 +rancher-aks-operator: +- 103.0.0+up1.2.0-rc1 +rancher-aks-operator-crd: +- 103.0.0+up1.2.0-rc1 From 29b448ca541c3faa64ec0d4a4a80ad66241ee786 Mon Sep 17 00:00:00 2001 From: Furkat Gofurov Date: Tue, 22 Aug 2023 11:34:14 +0300 Subject: [PATCH 2/2] Make charts Signed-off-by: Furkat Gofurov --- ...r-aks-operator-crd-103.0.0+up1.2.0-rc1.tgz | Bin 0 -> 1251 bytes ...ncher-aks-operator-103.0.0+up1.2.0-rc1.tgz | Bin 0 -> 2044 bytes .../103.0.0+up1.2.0-rc1/Chart.yaml | 12 + .../103.0.0+up1.2.0-rc1/templates/crds.yaml | 211 ++++++++++++++++++ .../103.0.0+up1.2.0-rc1/Chart.yaml | 20 ++ .../103.0.0+up1.2.0-rc1/templates/NOTES.txt | 4 + .../templates/_helpers.tpl | 25 +++ .../templates/clusterrole.yaml | 15 ++ .../templates/clusterrolebinding.yaml | 13 ++ .../templates/deployment.yaml | 61 +++++ .../templates/serviceaccount.yaml | 5 + .../103.0.0+up1.2.0-rc1/values.yaml | 23 ++ index.yaml | 40 ++++ 13 files changed, 429 insertions(+) create mode 100644 assets/rancher-aks-operator-crd/rancher-aks-operator-crd-103.0.0+up1.2.0-rc1.tgz create mode 100644 assets/rancher-aks-operator/rancher-aks-operator-103.0.0+up1.2.0-rc1.tgz create mode 100644 charts/rancher-aks-operator-crd/103.0.0+up1.2.0-rc1/Chart.yaml create mode 100644 charts/rancher-aks-operator-crd/103.0.0+up1.2.0-rc1/templates/crds.yaml create mode 100644 charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/Chart.yaml create mode 100644 charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/NOTES.txt create mode 100644 charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/_helpers.tpl create mode 100644 charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/clusterrole.yaml create mode 100644 charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/clusterrolebinding.yaml create mode 100644 charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/deployment.yaml create mode 100644 charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/serviceaccount.yaml create mode 100644 charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/values.yaml diff --git a/assets/rancher-aks-operator-crd/rancher-aks-operator-crd-103.0.0+up1.2.0-rc1.tgz b/assets/rancher-aks-operator-crd/rancher-aks-operator-crd-103.0.0+up1.2.0-rc1.tgz new file mode 100644 index 0000000000000000000000000000000000000000..85f24a309cfb8916053e2f7856042dfeb9fb6c7f GIT binary patch literal 1251 zcmV<91RVPxiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PI=cZz4Ak&NF|7b+0XCxzMEIjga;f-Svu&yQ|cvfv58jW}?@I_Zj4UDhgd8Giyud5#Z5h|r1HAKFmgJ<9 zbdn!pe#dv{_1{|mf?4iBkdHMPewGmIuK#ZDBDhaCIr<4XKYOQ~hWmrU(t z24F^Y6?n)9Q|N)`SoP{pXP$JC|0qn*;cj+)1B3iD-5Dc&w=p^x%Dokd~^;b z4*RN*^Nns<6fUul^=S=kAo~r?W&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6QHvu&AHF{rA2N*OlGr*+4?LFu^<_W}08p7>um zhE@_E-wy7p|4s*6^`ChWV;~D3w$joO4tml48zaH%I|Hj1W@zdZv{@;&! zJNf_QFTAa7Hmi9>A)jD96X{4dQoh zep@a8OtAS@uI^gcggk)NA+2^dM6@6`2<;&SuoBS1)}VI*BIB}1?&^jD_!%;hC72m_ z4ZAIHlU#WljC#+evK`}R*rsLMspYZ~ZewVChin@S<3914t!t}vO@uwd(MFWLXbZ6x zwj|h@WUmRf4Y?PKJ2x(uod%07(Rkr-Rc7#$Ss#oMRe2{0!$G~Oi|ma4L8v#@xylR^ z8S46A`R$3Mg!0{peM+mdde87AfaP+rsEyKi%@Q~|!TR+IESK@UsD_Q#npbjM6;fU) zDfm2wzmG1Ixzb4Ja$yOW&DK^~>GjRKcUK>;t}p-fzP?q@85$zgFL9b|n>217NQCaB za&h?p64m>nmSf)b_Nd9`XyXyW)E;1Rv+(s!uzN%X=2k&28OKI^nJHOJ@q4!|ZpdgU zyHR)|v~%z|2m*DRVFJT>$)L%&Ak;t#_(zQ?qtwlk2vXD-G|2j;gjdX@F?7-J`qeg( z>~iL>r4DlUnZp`Ndm2gp2A*H4uz^a&uw-#RMU5=E%;Y== 1.20.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/provides-gvr: aksclusterconfigs.aks.cattle.io/v1 + catalog.cattle.io/rancher-version: '>= 2.8.0-0 < 2.9.0-0' + catalog.cattle.io/release-name: rancher-aks-operator + catalog.cattle.io/scope: management +apiVersion: v2 +appVersion: 1.2.0-rc1 +description: A Helm chart for provisioning AKS clusters +home: https://github.com/rancher/aks-operator +name: rancher-aks-operator +sources: +- https://github.com/rancher/aks-operator +version: 103.0.0+up1.2.0-rc1 diff --git a/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/NOTES.txt b/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/NOTES.txt new file mode 100644 index 0000000000..5ba05b482c --- /dev/null +++ b/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/NOTES.txt @@ -0,0 +1,4 @@ +You have deployed the Rancher AKS operator +Version: {{ .Chart.AppVersion }} +Description: This operator provisions AKS clusters +from AKSClusterConfig CRs. diff --git a/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/_helpers.tpl b/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/_helpers.tpl new file mode 100644 index 0000000000..de3b332f6a --- /dev/null +++ b/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/_helpers.tpl @@ -0,0 +1,25 @@ +{{/* vim: set filetype=mustache: */}} + +{{- define "system_default_registry" -}} +{{- if .Values.global.cattle.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} +{{- else -}} +{{- "" -}} +{{- end -}} +{{- end -}} + +{{/* +Windows cluster will add default taint for linux nodes, +add below linux tolerations to workloads could be scheduled to those linux nodes +*/}} +{{- define "linux-node-tolerations" -}} +- key: "cattle.io/os" + value: "linux" + effect: "NoSchedule" + operator: "Equal" +{{- end -}} + +{{- define "linux-node-selector" -}} +kubernetes.io/os: linux +{{- end -}} + diff --git a/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/clusterrole.yaml b/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/clusterrole.yaml new file mode 100644 index 0000000000..5e2ce97567 --- /dev/null +++ b/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/clusterrole.yaml @@ -0,0 +1,15 @@ +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: aks-operator + namespace: cattle-system +rules: + - apiGroups: [''] + resources: ['secrets'] + verbs: ['get', 'list', 'create', 'watch', 'update'] + - apiGroups: ['aks.cattle.io'] + resources: ['aksclusterconfigs'] + verbs: ['get', 'list', 'update', 'watch'] + - apiGroups: ['aks.cattle.io'] + resources: ['aksclusterconfigs/status'] + verbs: ['update'] diff --git a/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/clusterrolebinding.yaml b/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/clusterrolebinding.yaml new file mode 100644 index 0000000000..7aa7e785a4 --- /dev/null +++ b/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/clusterrolebinding.yaml @@ -0,0 +1,13 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: aks-operator + namespace: cattle-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: aks-operator +subjects: +- kind: ServiceAccount + name: aks-operator + namespace: cattle-system diff --git a/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/deployment.yaml b/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/deployment.yaml new file mode 100644 index 0000000000..1d85eb18c8 --- /dev/null +++ b/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/deployment.yaml @@ -0,0 +1,61 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aks-config-operator + namespace: cattle-system +spec: + replicas: 1 + selector: + matchLabels: + ke.cattle.io/operator: aks + template: + metadata: + labels: + ke.cattle.io/operator: aks + spec: + nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} +{{- if .Values.nodeSelector }} +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} +{{- if .Values.tolerations }} +{{ toYaml .Values.tolerations | indent 8 }} +{{- end }} + serviceAccountName: aks-operator + {{- if .Values.priorityClassName }} + priorityClassName: "{{.Values.priorityClassName}}" + {{- end }} + securityContext: + fsGroup: 1007 + runAsUser: 1007 + containers: + - name: aks-operator + image: {{ template "system_default_registry" . }}{{ .Values.aksOperator.image.repository }}:{{ .Values.aksOperator.image.tag }} + imagePullPolicy: IfNotPresent + env: + - name: HTTP_PROXY + value: {{ .Values.httpProxy }} + - name: HTTPS_PROXY + value: {{ .Values.httpsProxy }} + - name: NO_PROXY + value: {{ .Values.noProxy }} +{{- if .Values.additionalTrustedCAs }} + # aks-operator mounts the additional CAs in two places: + volumeMounts: + # This directory is owned by the aks-operator user so c_rehash works here. + - mountPath: /etc/rancher/ssl/ca-additional.pem + name: tls-ca-additional-volume + subPath: ca-additional.pem + readOnly: true + # This directory is root-owned so c_rehash doesn't work here, + # but the cert is here in case update-ca-certificates is called in the future or by the OS. + - mountPath: /etc/pki/trust/anchors/ca-additional.pem + name: tls-ca-additional-volume + subPath: ca-additional.pem + readOnly: true + volumes: + - name: tls-ca-additional-volume + secret: + defaultMode: 0400 + secretName: tls-ca-additional + {{- end }} diff --git a/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/serviceaccount.yaml b/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/serviceaccount.yaml new file mode 100644 index 0000000000..9c40a152f5 --- /dev/null +++ b/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/templates/serviceaccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + namespace: cattle-system + name: aks-operator diff --git a/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/values.yaml b/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/values.yaml new file mode 100644 index 0000000000..619dcdbd4b --- /dev/null +++ b/charts/rancher-aks-operator/103.0.0+up1.2.0-rc1/values.yaml @@ -0,0 +1,23 @@ +global: + cattle: + systemDefaultRegistry: "" + +aksOperator: + image: + repository: rancher/aks-operator + tag: v1.2.0-rc1 + +httpProxy: "" +httpsProxy: "" +noProxy: "" +additionalTrustedCAs: false + +## Node labels for pod assignment +## Ref: https://kubernetes.io/docs/user-guide/node-selection/ +## +nodeSelector: {} +## List of node taints to tolerate (requires Kubernetes >= 1.6) +tolerations: [] + +## PriorityClassName assigned to deployment. +priorityClassName: "" diff --git a/index.yaml b/index.yaml index f23fb98508..f37d7d0143 100755 --- a/index.yaml +++ b/index.yaml @@ -4641,6 +4641,30 @@ entries: - assets/prometheus-federator/prometheus-federator-0.1.0.tgz version: 0.1.0 rancher-aks-operator: + - annotations: + catalog.cattle.io/auto-install: rancher-aks-operator-crd=match + catalog.cattle.io/certified: rancher + catalog.cattle.io/hidden: "true" + catalog.cattle.io/kube-version: '>= 1.20.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/provides-gvr: aksclusterconfigs.aks.cattle.io/v1 + catalog.cattle.io/rancher-version: '>= 2.8.0-0 < 2.9.0-0' + catalog.cattle.io/release-name: rancher-aks-operator + catalog.cattle.io/scope: management + apiVersion: v2 + appVersion: 1.2.0-rc1 + created: "2023-08-22T11:32:33.716651+03:00" + description: A Helm chart for provisioning AKS clusters + digest: d116445e5f79e3940902e3dd81680f662618e91dfd60f14921eaa049d52430ea + home: https://github.com/rancher/aks-operator + name: rancher-aks-operator + sources: + - https://github.com/rancher/aks-operator + urls: + - assets/rancher-aks-operator/rancher-aks-operator-103.0.0+up1.2.0-rc1.tgz + version: 103.0.0+up1.2.0-rc1 - annotations: catalog.cattle.io/auto-install: rancher-aks-operator-crd=match catalog.cattle.io/certified: rancher @@ -4927,6 +4951,22 @@ entries: - assets/rancher-aks-operator/rancher-aks-operator-100.0.0+up1.0.1.tgz version: 100.0.0+up1.0.1 rancher-aks-operator-crd: + - annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/hidden: "true" + catalog.cattle.io/namespace: cattle-system + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux,windows + catalog.cattle.io/release-name: rancher-aks-operator-crd + apiVersion: v2 + appVersion: 1.2.0-rc1 + created: "2023-08-22T11:32:35.184311+03:00" + description: AKS Operator CustomResourceDefinitions + digest: a2442f52f73988d3eead4b8432739f9ed516100ff1be69e3e93685caf1d05de4 + name: rancher-aks-operator-crd + urls: + - assets/rancher-aks-operator-crd/rancher-aks-operator-crd-103.0.0+up1.2.0-rc1.tgz + version: 103.0.0+up1.2.0-rc1 - annotations: catalog.cattle.io/certified: rancher catalog.cattle.io/hidden: "true"