From 01e4d64bc122d19a650151b39fe5524edafdf80e Mon Sep 17 00:00:00 2001 From: Denilson Nastacio Date: Thu, 30 Nov 2023 11:03:24 -0500 Subject: [PATCH] fix: Update HyperShift from TP to GA Signed-off-by: Denilson Nastacio --- config/argocd-rhacm/Chart.yaml | 4 +- .../templates/0100-rhacm-app.yaml | 4 +- .../templates/0100-rhacm-seeds-app.yaml | 4 +- config/argocd-rhacm/values.yaml | 2 +- config/argocd/templates/0200-argocd.yaml | 2 +- .../0030-argocd-role-bindings.yaml | 0 config/rhacm/seeds/Chart.yaml | 2 +- .../0020-rhacm-hypershift-preview-roles.yaml | 76 ------------------- .../templates/0150-multi-cluster-hub.yaml | 10 --- ...0302-gitops-cluster-placement-binding.yaml | 2 - .../9000-post-multi-cluster-engine.yaml | 15 +++- config/rhacm/seeds/values.yaml | 2 +- tests/prebuild/yamllint-config.yaml | 1 - 13 files changed, 22 insertions(+), 102 deletions(-) rename config/rhacm/seeds/{templates => }/0030-argocd-role-bindings.yaml (100%) delete mode 100644 config/rhacm/seeds/templates/0020-rhacm-hypershift-preview-roles.yaml diff --git a/config/argocd-rhacm/Chart.yaml b/config/argocd-rhacm/Chart.yaml index bfa1df61..0f59ba53 100644 --- a/config/argocd-rhacm/Chart.yaml +++ b/config/argocd-rhacm/Chart.yaml @@ -16,9 +16,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.6.0 +version: 0.6.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: "0.18.0" +appVersion: "0.18.1" diff --git a/config/argocd-rhacm/templates/0100-rhacm-app.yaml b/config/argocd-rhacm/templates/0100-rhacm-app.yaml index a860bed2..b6e80e64 100644 --- a/config/argocd-rhacm/templates/0100-rhacm-app.yaml +++ b/config/argocd-rhacm/templates/0100-rhacm-app.yaml @@ -27,8 +27,8 @@ spec: value: ${ARGOCD_APP_SOURCE_REPO_URL} - name: serviceaccount.argocd_application_controller value: {{.Values.serviceaccount.argocd_application_controller}} - - name: spec.components.hypershift_preview - value: "{{.Values.spec.components.hypershift_preview}}" + - name: spec.components.hypershift + value: "{{.Values.spec.components.hypershift}}" - name: targetRevision value: {{.Values.targetRevision}} path: config/argocd-rhacm diff --git a/config/argocd-rhacm/templates/0100-rhacm-seeds-app.yaml b/config/argocd-rhacm/templates/0100-rhacm-seeds-app.yaml index 85e13dc9..d37aea8c 100644 --- a/config/argocd-rhacm/templates/0100-rhacm-seeds-app.yaml +++ b/config/argocd-rhacm/templates/0100-rhacm-seeds-app.yaml @@ -29,8 +29,8 @@ spec: value: ${ARGOCD_APP_SOURCE_REPO_URL} - name: serviceaccount.argocd_application_controller value: {{.Values.serviceaccount.argocd_application_controller}} - - name: spec.components.hypershift_preview - value: "{{.Values.spec.components.hypershift_preview}}" + - name: spec.components.hypershift + value: "{{.Values.spec.components.hypershift}}" - name: targetRevision value: {{.Values.targetRevision}} path: config/rhacm/seeds diff --git a/config/argocd-rhacm/values.yaml b/config/argocd-rhacm/values.yaml index 5214d145..d8e28ab2 100644 --- a/config/argocd-rhacm/values.yaml +++ b/config/argocd-rhacm/values.yaml @@ -8,4 +8,4 @@ serviceaccount: argocd_application_controller: openshift-gitops-argocd-application-controller spec: components: - hypershift_preview: false + hypershift: false diff --git a/config/argocd/templates/0200-argocd.yaml b/config/argocd/templates/0200-argocd.yaml index 9902c148..a22f62ff 100644 --- a/config/argocd/templates/0200-argocd.yaml +++ b/config/argocd/templates/0200-argocd.yaml @@ -219,7 +219,7 @@ spec: if obj.status.phase ~= nil then if obj.status.phase == "Running" then hs.status = "Healthy" - elseif obj.status.phase == "Installing" then + elseif obj.status.phase == "Installing" or obj.status.phase == "Pending" then hs.status = "Progressing" else hs.status = "Degraded" diff --git a/config/rhacm/seeds/templates/0030-argocd-role-bindings.yaml b/config/rhacm/seeds/0030-argocd-role-bindings.yaml similarity index 100% rename from config/rhacm/seeds/templates/0030-argocd-role-bindings.yaml rename to config/rhacm/seeds/0030-argocd-role-bindings.yaml diff --git a/config/rhacm/seeds/Chart.yaml b/config/rhacm/seeds/Chart.yaml index ef549d53..075c97b1 100644 --- a/config/rhacm/seeds/Chart.yaml +++ b/config/rhacm/seeds/Chart.yaml @@ -16,7 +16,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.15.0 +version: 0.15.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/config/rhacm/seeds/templates/0020-rhacm-hypershift-preview-roles.yaml b/config/rhacm/seeds/templates/0020-rhacm-hypershift-preview-roles.yaml deleted file mode 100644 index 20f25ab0..00000000 --- a/config/rhacm/seeds/templates/0020-rhacm-hypershift-preview-roles.yaml +++ /dev/null @@ -1,76 +0,0 @@ -{{- $hypershift := .Values.spec.components.hypershift_preview }} -{{- if eq ( default false $hypershift ) true }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - annotations: - argocd.argoproj.io/sync-wave: "20" - creationTimestamp: null - name: hypershift-role - namespace: multicluster-engine -rules: - - apiGroups: [""] - resources: ["pods"] - verbs: ["get", "list"] - - apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "list"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - annotations: - argocd.argoproj.io/sync-wave: "20" - creationTimestamp: null - name: hypershift-cluster-manager-role -rules: - - apiGroups: ["config.openshift.io"] - resources: ["infrastructures"] - verbs: ["get", "list"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - annotations: - argocd.argoproj.io/sync-wave: "21" - creationTimestamp: null - name: hypershift-role-binding - namespace: multicluster-engine -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: hypershift-role -subjects: - - kind: ServiceAccount - name: cluster-manager - namespace: multicluster-engine - - kind: ServiceAccount - name: hypershift-addon-manager-sa - namespace: multicluster-engine - - kind: ServiceAccount - name: klusterlet-registration-sa - namespace: open-cluster-management-agent ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: - argocd.argoproj.io/sync-wave: "21" - creationTimestamp: null - name: hypershift-cluster-manager-role-binding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: hypershift-cluster-manager-role -subjects: - - kind: ServiceAccount - name: cluster-manager - namespace: multicluster-engine - - kind: ServiceAccount - name: klusterlet-registration-sa - namespace: open-cluster-management-agent - - kind: ServiceAccount - name: klusterlet-work-sa - namespace: multicluster-engine -{{- end }} diff --git a/config/rhacm/seeds/templates/0150-multi-cluster-hub.yaml b/config/rhacm/seeds/templates/0150-multi-cluster-hub.yaml index 6769195d..9ad4dfaa 100644 --- a/config/rhacm/seeds/templates/0150-multi-cluster-hub.yaml +++ b/config/rhacm/seeds/templates/0150-multi-cluster-hub.yaml @@ -8,16 +8,6 @@ metadata: creationTimestamp: null name: multiclusterhub namespace: open-cluster-management - finalizers: - - finalizer.operator.open-cluster-management.io spec: availabilityConfig: High - ingress: - sslCiphers: - - ECDHE-ECDSA-AES256-GCM-SHA384 - - ECDHE-RSA-AES256-GCM-SHA384 - - ECDHE-ECDSA-CHACHA20-POLY1305 - - ECDHE-RSA-CHACHA20-POLY1305 - - ECDHE-ECDSA-AES128-GCM-SHA256 - - ECDHE-RSA-AES128-GCM-SHA256 separateCertificateManagement: false diff --git a/config/rhacm/seeds/templates/0302-gitops-cluster-placement-binding.yaml b/config/rhacm/seeds/templates/0302-gitops-cluster-placement-binding.yaml index d07e4758..2e2edc65 100644 --- a/config/rhacm/seeds/templates/0302-gitops-cluster-placement-binding.yaml +++ b/config/rhacm/seeds/templates/0302-gitops-cluster-placement-binding.yaml @@ -11,8 +11,6 @@ spec: tolerations: - key: cluster.open-cluster-management.io/unreachable operator: Exists - - key: cluster.open-cluster-management.io/unavailable - operator: Exists predicates: - requiredClusterSelector: labelSelector: diff --git a/config/rhacm/seeds/templates/9000-post-multi-cluster-engine.yaml b/config/rhacm/seeds/templates/9000-post-multi-cluster-engine.yaml index 82042a6d..107595fb 100644 --- a/config/rhacm/seeds/templates/9000-post-multi-cluster-engine.yaml +++ b/config/rhacm/seeds/templates/9000-post-multi-cluster-engine.yaml @@ -16,8 +16,8 @@ spec: image: quay.io/openshift/origin-cli:latest imagePullPolicy: IfNotPresent env: - - name: HYPERSHIFT_PREVIEW - value: "{{.Values.spec.components.hypershift_preview}}" + - name: HYPERSHIFT + value: "{{.Values.spec.components.hypershift}}" command: - /bin/sh - -c @@ -25,7 +25,16 @@ spec: set -eo pipefail set -x - oc patch mce multiclusterengine --type=merge -p "{\"spec\":{\"overrides\":{\"components\":[{\"name\":\"hypershift-preview\",\"enabled\": ${HYPERSHIFT_PREVIEW}}]}}}" + oc patch mce multiclusterengine \ + --type=merge \ + -p "{\"spec\":{\"overrides\":{\"components\":[{\"name\":\"hypershift\",\"enabled\": ${HYPERSHIFT}}]}}}" + + # https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.9/html-single/clusters/index#hypershift-uninstall-operator + if [ ${HYPERSHIFT} == "false" ]; then + oc patch mce multiclusterengine \ + --type=merge \ + -p '{"spec":{"overrides":{"components":[{"name":"hypershift-local-hosting","enabled": false}]}}}' + fi restartPolicy: Never serviceAccountName: {{.Values.serviceaccount.argocd_application_controller}} diff --git a/config/rhacm/seeds/values.yaml b/config/rhacm/seeds/values.yaml index 6829a837..2d1ab102 100644 --- a/config/rhacm/seeds/values.yaml +++ b/config/rhacm/seeds/values.yaml @@ -10,4 +10,4 @@ metadata: rhacm_users_group: rhacm-users spec: components: - hypershift_preview: false + hypershift: false diff --git a/tests/prebuild/yamllint-config.yaml b/tests/prebuild/yamllint-config.yaml index be008f18..38c87f40 100644 --- a/tests/prebuild/yamllint-config.yaml +++ b/tests/prebuild/yamllint-config.yaml @@ -17,7 +17,6 @@ ignore: | config/rhacm/cloudpaks/templates/placement-cloudpaks.yaml config/rhacm/cloudpaks/templates/placement-cp-shared.yaml config/rhacm/cloudpaks/templates/placement-gitops-policy.yaml - config/rhacm/seeds/templates/0020-rhacm-hypershift-preview-roles.yaml rules: braces: