From 049693d3d79927b867fba834db0701e3342e19fdd3e4ec3428a54c97d2638983 Mon Sep 17 00:00:00 2001 From: Ivo Petrov Date: Wed, 11 Dec 2024 15:45:28 +0100 Subject: [PATCH 1/2] Introduce K8s distribution core component list (#52) Introduces the K8s distribution core component list that the upgrade-controller will follow in order to make sure that a specific Kubernetes upgrade has completed successfully. Relates to the [#116](https://github.com/suse-edge/upgrade-controller/pull/116) upgrade-controller PR. Reviewed-on: https://src.opensuse.org/suse-edge/Factory/pulls/52 Reviewed-by: Atanas Dinov Reviewed-by: Nicolas Belouin Co-authored-by: Ivo Petrov Co-committed-by: Ivo Petrov (cherry picked from commit 83fec09683280454adc83e82ea6f9fc42e4fc2d8a050aaf831ef57c09f698fae) Signed-off-by: Atanas Dinov --- release-manifest-image/release_manifest.yaml | 65 ++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/release-manifest-image/release_manifest.yaml b/release-manifest-image/release_manifest.yaml index 034459d..f2fc889 100644 --- a/release-manifest-image/release_manifest.yaml +++ b/release-manifest-image/release_manifest.yaml @@ -8,8 +8,73 @@ spec: kubernetes: k3s: version: v1.31.2+k3s1 + coreComponents: + - name: traefik-crd + version: 27.0.201+up27.0.2 + type: HelmChart + - name: traefik + version: 27.0.201+up27.0.2 + type: HelmChart + - name: local-path-provisioner + containers: + - name: local-path-provisioner + image: rancher/local-path-provisioner:v0.0.30 + type: Deployment + - name: coredns + containers: + - name: coredns + image: rancher/mirrored-coredns-coredns:1.11.3 + type: Deployment + - name: metrics-server + containers: + - name: metrics-server + image: rancher/mirrored-metrics-server:v0.7.2 + type: Deployment rke2: version: v1.31.2+rke2r1 + coreComponents: + - name: rke2-cilium + version: 1.16.201 + type: HelmChart + - name: rke2-canal + version: v3.28.2-build2024101601 + type: HelmChart + - name: rke2-calico-crd + version: v3.28.200 + type: HelmChart + - name: rke2-calico + version: v3.28.200 + type: HelmChart + - name: rke2-coredns + version: 1.33.002 + type: HelmChart + - name: rke2-ingress-nginx + version: 4.10.501 + type: HelmChart + - name: rke2-metrics-server + version: 3.12.004 + type: HelmChart + - name: rancher-vsphere-csi + version: 3.3.1-rancher100 + type: HelmChart + - name: rancher-vsphere-cpi + version: 1.9.000 + type: HelmChart + - name: harvester-cloud-provider + version: 0.2.600 + type: HelmChart + - name: harvester-csi-driver + version: 0.1.2000 + type: HelmChart + - name: rke2-snapshot-controller-crd + version: 3.0.601 + type: HelmChart + - name: rke2-snapshot-controller + version: 3.0.601 + type: HelmChart + - name: rke2-snapshot-validation-webhook + version: 1.9.001 + type: HelmChart operatingSystem: version: "6.0" zypperID: "SL-Micro" -- 2.45.2 From 8e6c55708449429fd895a720d660d1818e8f4ec3d3bb244484727d7db73afe71 Mon Sep 17 00:00:00 2001 From: Atanas Dinov Date: Wed, 11 Dec 2024 18:35:11 +0100 Subject: [PATCH 2/2] Merge pull request 'Bump upgrade-controller to v0.1.1' (#53) from upgrade-controller-v0.1.1 into main Reviewed-on: https://src.opensuse.org/suse-edge/Factory/pulls/53 Reviewed-by: Ivo Petrov Reviewed-by: Nicolas Belouin Reviewed-by: Denislav Prodanov (cherry picked from commit 8c310735063e336728f4cf152aa7927869bb8092141282eab1f72636a797707e) Signed-off-by: Atanas Dinov --- upgrade-controller-chart/Chart.yaml | 10 ++-- .../charts/lifecycle-crds/Chart.yaml | 4 +- .../templates/release-manifest-crd.yaml | 58 +++++++++++++++++++ .../templates/clusterrole.yaml | 8 +++ upgrade-controller-image/Dockerfile | 8 +-- upgrade-controller/_service | 2 +- upgrade-controller/upgrade-controller.spec | 2 +- 7 files changed, 79 insertions(+), 13 deletions(-) diff --git a/upgrade-controller-chart/Chart.yaml b/upgrade-controller-chart/Chart.yaml index 033cedf..247c13e 100644 --- a/upgrade-controller-chart/Chart.yaml +++ b/upgrade-controller-chart/Chart.yaml @@ -1,13 +1,13 @@ -#!BuildTag: %%IMG_PREFIX%%upgrade-controller-chart:%%CHART_MAJOR%%.0.0_up0.1.0 -#!BuildTag: %%IMG_PREFIX%%upgrade-controller-chart:%%CHART_MAJOR%%.0.0_up0.1.0-%RELEASE% +#!BuildTag: %%IMG_PREFIX%%upgrade-controller-chart:%%CHART_MAJOR%%.0.0_up0.1.1 +#!BuildTag: %%IMG_PREFIX%%upgrade-controller-chart:%%CHART_MAJOR%%.0.0_up0.1.1-%RELEASE% apiVersion: v2 -appVersion: 0.1.0 +appVersion: 0.1.1 dependencies: - condition: crds.enabled name: lifecycle-crds repository: file://./charts/lifecycle-crds - version: 0.1.0 + version: 0.1.1 description: A Helm chart for Upgrade Controller name: upgrade-controller type: application -version: "%%CHART_MAJOR%%.0.0+up0.1.0" +version: "%%CHART_MAJOR%%.0.0+up0.1.1" diff --git a/upgrade-controller-chart/charts/lifecycle-crds/Chart.yaml b/upgrade-controller-chart/charts/lifecycle-crds/Chart.yaml index 2ac8dc1..735f8f0 100644 --- a/upgrade-controller-chart/charts/lifecycle-crds/Chart.yaml +++ b/upgrade-controller-chart/charts/lifecycle-crds/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -appVersion: 0.1.0 +appVersion: 0.1.1 description: A Helm chart containing SUSE Lifecycle CRDs name: lifecycle-crds type: application -version: 0.1.0 +version: 0.1.1 diff --git a/upgrade-controller-chart/charts/lifecycle-crds/templates/release-manifest-crd.yaml b/upgrade-controller-chart/charts/lifecycle-crds/templates/release-manifest-crd.yaml index 5927e10..b19107d 100644 --- a/upgrade-controller-chart/charts/lifecycle-crds/templates/release-manifest-crd.yaml +++ b/upgrade-controller-chart/charts/lifecycle-crds/templates/release-manifest-crd.yaml @@ -43,6 +43,35 @@ spec: properties: k3s: properties: + coreComponents: + items: + properties: + containers: + items: + properties: + image: + type: string + name: + type: string + required: + - image + - name + type: object + type: array + name: + type: string + type: + enum: + - HelmChart + - Deployment + type: string + version: + type: string + required: + - name + - type + type: object + type: array version: type: string required: @@ -50,6 +79,35 @@ spec: type: object rke2: properties: + coreComponents: + items: + properties: + containers: + items: + properties: + image: + type: string + name: + type: string + required: + - image + - name + type: object + type: array + name: + type: string + type: + enum: + - HelmChart + - Deployment + type: string + version: + type: string + required: + - name + - type + type: object + type: array version: type: string required: diff --git a/upgrade-controller-chart/templates/clusterrole.yaml b/upgrade-controller-chart/templates/clusterrole.yaml index 8e9c6e7..ae75204 100644 --- a/upgrade-controller-chart/templates/clusterrole.yaml +++ b/upgrade-controller-chart/templates/clusterrole.yaml @@ -29,6 +29,14 @@ rules: - customresourcedefinitions verbs: - get +- apiGroups: + - apps + resources: + - deployments + verbs: + - get + - list + - watch - apiGroups: - batch resources: diff --git a/upgrade-controller-image/Dockerfile b/upgrade-controller-image/Dockerfile index bbc72eb..77febf4 100644 --- a/upgrade-controller-image/Dockerfile +++ b/upgrade-controller-image/Dockerfile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 -#!BuildTag: %%IMG_PREFIX%%upgrade-controller:0.1.0 -#!BuildTag: %%IMG_PREFIX%%upgrade-controller:0.1.0-%RELEASE% +#!BuildTag: %%IMG_PREFIX%%upgrade-controller:0.1.1 +#!BuildTag: %%IMG_PREFIX%%upgrade-controller:0.1.1-%RELEASE% #!BuildVersion: 15.6 ARG SLE_VERSION FROM registry.suse.com/bci/bci-micro:$SLE_VERSION AS micro @@ -16,11 +16,11 @@ FROM micro AS final LABEL org.opencontainers.image.authors="SUSE LLC (https://www.suse.com/)" LABEL org.opencontainers.image.title="SLE Edge Upgrade Controller Container Image" LABEL org.opencontainers.image.description="Edge Update Controller Image based on the SLE Base Container Image." -LABEL org.opencontainers.image.version="0.1.0" +LABEL org.opencontainers.image.version="0.1.1" LABEL org.opencontainers.image.url="https://www.suse.com/solutions/edge-computing/" LABEL org.opencontainers.image.created="%BUILDTIME%" LABEL org.opencontainers.image.vendor="SUSE LLC" -LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%upgrade-controller:0.1.0-%RELEASE%" +LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%upgrade-controller:0.1.1-%RELEASE%" LABEL org.openbuildservice.disturl="%DISTURL%" LABEL com.suse.supportlevel="%%SUPPORT_LEVEL%%" LABEL com.suse.eula="SUSE Combined EULA February 2024" diff --git a/upgrade-controller/_service b/upgrade-controller/_service index c7bc886..251bb05 100644 --- a/upgrade-controller/_service +++ b/upgrade-controller/_service @@ -4,7 +4,7 @@ @PARENT_TAG@ git .git - v0.1.0 + v0.1.1 v(\d+).(\d+).(\d+) \1.\2.\3 enable diff --git a/upgrade-controller/upgrade-controller.spec b/upgrade-controller/upgrade-controller.spec index c6fbedf..2d7d586 100644 --- a/upgrade-controller/upgrade-controller.spec +++ b/upgrade-controller/upgrade-controller.spec @@ -17,7 +17,7 @@ Name: upgrade-controller -Version: 0.1.0 +Version: 0.1.1 Release: 0 Summary: Upgrade Controller License: Apache-2.0 -- 2.45.2