You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Gathering cluster version all the crd related to operators.coreos.com and argoproj.io
14
14
echo"gather_gitops:$LINENO] inspecting crd, clusterversion .."| tee -a ${LOGS_DIR}/gather_gitops.log
15
+
readarray -t UPSTREAM_CRDS <<(oc get crd -o name | grep -Ei "argoproj.io|operators.coreos.com")
15
16
# Getting non.existent.crd is a hack to avoid getting all available crds in the cluster in case there are no owned resources that do not contain "argoproj.io"
16
-
oc adm inspect --dest-dir=${LOGS_DIR}$(oc get crd -o name | grep -Ei "argoproj.io|operators.coreos.com")$(oc get crd non.existent.crd --ignore-not-found "${NON_ARGO_CRDS[@]}" -o name) clusterversion/version > /dev/null
oc get "${APIRESOURCE}" -n "${NAMESPACE}" -o=yaml >"${LOGS_DIR}/namespaces/${NAMESPACE}/${API_GROUP}/${API_PLURAL_NAME}.yaml"
@@ -28,10 +30,10 @@ done
28
30
29
31
# Gathering all namespaced custom resources across the cluster that are owned by gitops-operator but do not contain "argoproj.io" related customer resources
30
32
# Getting "non.existent.crd" is a hack to be sure that the output is a list of items even if it only contains zero or a single item
echo"gather_gitops:$LINENO] collecting ${APIRESOURCE} .."| tee -a ${LOGS_DIR}/gather_gitops.log
@@ -57,13 +59,16 @@ done
57
59
58
60
# Inspecting namespace reported in ARGOCD_CLUSTER_CONFIG_NAMESPACES, openshift-gitops and openshift-gitops-operator, and namespaces containing ArgoCD instances
59
61
echo"gather_gitops:$LINENO] inspecting \$ARGOCD_CLUSTER_CONFIG_NAMESPACES, openshift-gitops and openshift-gitops-operator namespaces and namespaces containing ArgoCD instances .."| tee -a ${LOGS_DIR}/gather_gitops.log
60
-
oc get ns --ignore-not-found $(oc get subs -A --ignore-not-found -o json | jq '.items[] | select(.metadata.name=="openshift-gitops-operator") | .spec.config.env[]?|select(.name=="ARGOCD_CLUSTER_CONFIG_NAMESPACES")| " " + .value | sub(","; " ")' -rj)$(oc get ArgoCD,Rollout,RolloutManager -A -o json | jq '.items[] | " " + .metadata.namespace' -rj) openshift-gitops openshift-gitops-operator -o json \
0 commit comments