Skip to content

Commit

Permalink
update operator group
Browse files Browse the repository at this point in the history
  • Loading branch information
arckrish committed Aug 1, 2024
1 parent 7e5d299 commit a6c6851
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: openshift-operators
name: global-operators
namespace: openshift-operators
spec: {}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Namespace
metadata:
name: openshift-operators-redhat
name: global-operators
annotations:
openshift.io/node-selector: ""
labels:
Expand All @@ -11,16 +11,16 @@ metadata:
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: openshift-operators-redhat
namespace: openshift-operators-redhat
name: global-operators
namespace: openshift-operators
spec: {}

---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: elasticsearch-operator
namespace: openshift-operators-redhat
namespace: openshift-operators
spec:
channel: stable
installPlanApproval: Automatic
Expand Down
39 changes: 39 additions & 0 deletions scripts/recoverargo_oc.sh
Original file line number Diff line number Diff line change
@@ -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 "

0 comments on commit a6c6851

Please sign in to comment.