-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make gitops-must-gather
compliant to standard must-gather structure
#21
Conversation
@reginapizza @iam-veeramalla any news about this PR merge? |
gather_gitops.sh
Outdated
# Inspecting namespace reported in ARGOCD_CLUSTER_CONFIG_NAMESPACES, openshift-gitops and openshift-gitops-operator, and namespaces containing ArgoCD instances | ||
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 | ||
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 -A -o json | jq '.items[] | " " + .metadata.namespace' -rj) openshift-gitops openshift-gitops-operator -o json \ | ||
| jq '.items | unique |.[] | .metadata.name' -r | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more thing to add: in addition to namespaces containing ArgoCD
CR, we should also include namespaces containing RolloutManager
CR, and namespaces containing Rollout
CR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
gitops-must-gather/gather_gitops.sh
Line 60 in 209fd61
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 \ |
@gmeghnag could you please sign off on your PR so it passes the DCO check that's failing? |
|
closed in favor of #23 |
What type of PR is this?
What does this PR do / why we need it:
It makes
gitops-must-gather
compliant with the structure of the standard one to be able to parse it usingomc
, i.e.:Have you updated the necessary documentation?
Which issue(s) this PR fixes:
It "fixes" #20.
Test acceptance criteria:
How to test changes / Special notes to the reviewer:
You can test it by running: