diff --git a/advanced-cluster-management/README.md b/advanced-cluster-management/README.md index 1d7f8ef1..9c522896 100644 --- a/advanced-cluster-management/README.md +++ b/advanced-cluster-management/README.md @@ -6,14 +6,14 @@ Do not use the `base` directory directly, as you will need to patch the `channel The current *overlays* available are for the following channels: -* [release-2.11](operator/overlays/release-2.11) -* [release-2.10](operator/overlays/release-2.10) -* [release-2.9](operator/overlays/release-2.9) -* [release-2.8](operator/overlays/release-2.8) -* [release-2.7](operator/overlays/release-2.7) -* [release-2.6](operator/overlays/release-2.6) -* [release-2.5](operator/overlays/release-2.5) * [release-2.4](operator/overlays/release-2.4) +* [release-2.5](operator/overlays/release-2.5) +* [release-2.6](operator/overlays/release-2.6) +* [release-2.7](operator/overlays/release-2.7) +* [release-2.8](operator/overlays/release-2.8) +* [release-2.9](operator/overlays/release-2.9) +* [release-2.10](operator/overlays/release-2.10) +* [release-2.11](operator/overlays/release-2.11) ## Usage diff --git a/advanced-cluster-management/operator/base/operator-group.yaml b/advanced-cluster-management/operator/base/operator-group.yaml index c1f18175..491bd93d 100644 --- a/advanced-cluster-management/operator/base/operator-group.yaml +++ b/advanced-cluster-management/operator/base/operator-group.yaml @@ -1,7 +1,7 @@ apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: - name: advanced-cluster-management-group + name: advanced-cluster-management namespace: open-cluster-management spec: targetNamespaces: diff --git a/advanced-cluster-management/remove-acm.sh b/advanced-cluster-management/remove-acm.sh index 53c0c83a..a7c9aa12 100755 --- a/advanced-cluster-management/remove-acm.sh +++ b/advanced-cluster-management/remove-acm.sh @@ -12,14 +12,35 @@ KUBECTL=oc # Force delete klusterlet echo "attempt to delete klusterlet" -${KUBECTL} delete klusterlet klusterlet --timeout=60s -${KUBECTL} delete namespace "${KLUSTERLET_NAMESPACE}" --wait=false +"${KUBECTL}" delete klusterlet klusterlet --timeout=60s +"${KUBECTL}" delete namespace "${KLUSTERLET_NAMESPACE}" --wait=false echo "force removing klusterlet" -${KUBECTL} patch klusterlet klusterlet --type="json" -p '[{"op": "remove", "path":"/metadata/finalizers"}]' +"${KUBECTL}" patch klusterlet klusterlet --type="json" -p '[{"op": "remove", "path":"/metadata/finalizers"}]' echo "removing klusterlet crd" -${KUBECTL} delete crd klusterlets.operator.open-cluster-management.io --timeout=30s +"${KUBECTL}" delete crd klusterlets.operator.open-cluster-management.io --timeout=30s + +# managedclustermutators.admission.cluster.open-cluster-management.io + +# force delete all validating webhook configuration +# oc get validatingwebhookconfigurations -o name | egrep 'cluster-management.io|multicluster' +component_vwc=( + managedclustersetbindingv1beta1validators.admission.cluster.open-cluster-management.io + managedclustersetbindingvalidators.admission.cluster.open-cluster-management.io + managedclustervalidators.admission.cluster.open-cluster-management.io + manifestworkvalidators.admission.work.open-cluster-management.io + multiclusterengines.multicluster.openshift.io + multiclusterhub-operator-validating-webhook + multicluster-observability-operator +) + +for vwc in "${component_vwc[@]}" +do + echo "delete validatingwebhookconfigurations ${vwc} resources..." + "${KUBECTL}" delete validatingwebhookconfigurations "${vwc}" +done # Force delete all component CRDs if they still exist +# oc get crd -o name | grep cluster-management.io component_crds=( baremetalassets.inventory.open-cluster-management.io channels.apps.open-cluster-management.io @@ -43,6 +64,7 @@ component_crds=( placementbindings.policy.open-cluster-management.io placementrules.apps.open-cluster-management.io policies.policy.open-cluster-management.io + searches.search.open-cluster-management.io searchcustomizations.search.open-cluster-management.io searchoperators.search.open-cluster-management.io submarinerconfigs.submarineraddon.open-cluster-management.io @@ -52,14 +74,15 @@ component_crds=( for crd in "${component_crds[@]}"; do echo "force delete all CustomResourceDefinition ${crd} resources..." - for resource in $(${KUBECTL} get "${crd}" -o name -n "${OPERATOR_NAMESPACE}"); do + for resource in $("${KUBECTL}" get "${crd}" -o name -n "${OPERATOR_NAMESPACE}") + do echo "attempt to delete ${crd} resource ${resource}..." - ${KUBECTL} delete "${resource}" -n "${OPERATOR_NAMESPACE}" --timeout=30s + "${KUBECTL}" delete "${resource}" -n "${OPERATOR_NAMESPACE}" --timeout=30s echo "force remove ${crd} resource ${resource}..." - ${KUBECTL} patch "${resource}" -n "${OPERATOR_NAMESPACE}" --type="json" -p '[{"op": "remove", "path":"/metadata/finalizers"}]' + "${KUBECTL}" patch "${resource}" -n "${OPERATOR_NAMESPACE}" --type="json" -p '[{"op": "remove", "path":"/metadata/finalizers"}]' done echo "force delete all CustomResourceDefinition ${crd} resources..." - ${KUBECTL} delete crd "${crd}" + "${KUBECTL}" delete crd "${crd}" done -${KUBECTL} delete namespace "${OPERATOR_NAMESPACE}" +"${KUBECTL}" delete namespace "${OPERATOR_NAMESPACE}"