diff --git a/components/operators/openshift-elasticsearch/operator/base/operator-group.yaml b/components/operators/openshift-elasticsearch/operator/base/operator-group.yaml index 16fadbb4..05c560ea 100644 --- a/components/operators/openshift-elasticsearch/operator/base/operator-group.yaml +++ b/components/operators/openshift-elasticsearch/operator/base/operator-group.yaml @@ -1,6 +1,6 @@ apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: - name: openshift-operators + name: global-operators namespace: openshift-operators spec: {} diff --git a/documentation/training_and_learning/nongitops_yaml/operators/os-elastic-search.yaml b/documentation/training_and_learning/nongitops_yaml/operators/os-elastic-search.yaml index ef25578d..21d2a7be 100644 --- a/documentation/training_and_learning/nongitops_yaml/operators/os-elastic-search.yaml +++ b/documentation/training_and_learning/nongitops_yaml/operators/os-elastic-search.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Namespace metadata: - name: openshift-operators-redhat + name: global-operators annotations: openshift.io/node-selector: "" labels: @@ -11,8 +11,8 @@ metadata: apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: - name: openshift-operators-redhat - namespace: openshift-operators-redhat + name: global-operators + namespace: openshift-operators spec: {} --- @@ -20,7 +20,7 @@ apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: elasticsearch-operator - namespace: openshift-operators-redhat + namespace: openshift-operators spec: channel: stable installPlanApproval: Automatic diff --git a/scripts/recoverargo_oc.sh b/scripts/recoverargo_oc.sh new file mode 100644 index 00000000..a37fc4bd --- /dev/null +++ b/scripts/recoverargo_oc.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Check the current project +CURRENT_PROJECT=$(oc project --short=false) +if [ $? -ne 0 ]; then + echo "Failed to get the current project." + exit 1 +fi + +echo "You are currently in the project: $CURRENT_PROJECT" + +# Ask the user if they want to continue +read -p "Would you like to continue and delete resources in the current project? (yes/no): " CONTINUE + +if [ "$CONTINUE" != "yes" ]; then + echo "Operation cancelled." + exit 0 +fi + +oc delete argocd --all -n openshift-gitops +if [ $? -ne 0 ]; then + echo "Failed to delete argocd." + exit 1 +fi + +oc delete pods --all -n openshift-gitops-operator +if [ $? -ne 0 ]; then + echo "Failed to delete pods." + exit 1 +fi + +if [ $? -eq 0 ]; then + echo "Commands executed successfully." +else + echo "Failed to execute commands on the remote server." + exit 1 +fi + +echo "rerun ./bootstrap.sh "