gitops_bootstrap: userinfo ConfigMap discovery + cascade cleanup on destroy#62
gitops_bootstrap: userinfo ConfigMap discovery + cascade cleanup on destroy#62prakhar1985 wants to merge 3 commits intomainfrom
Conversation
Uncomment the demo.redhat.com/userinfo ConfigMap discovery block so GitOps deployments can report user-facing data (URLs, credentials) back to Babylon via agnosticd_user_info. Supports both global data and per-user data via users_json.
|
@prakhar1985 Why do you want to re-enable this now? Has it been tested against CIs that deploy workloads where we need this data? The last time I spoke to Judd about this, he said it was disabled because it wasn't being used and wasn't well tested. If that has changed, please confirm that this has been validated and is functional. |
|
Tested via CI: https://catalog.demo.redhat.com/catalog?search=showroom+embed&item=babylon-catalog-dev%2Ftests.showroom-embed-test.dev The showroom-embed-test catalog uses the Without this change, any catalog that uses |
…p_applications list
wkulhanek
left a comment
There was a problem hiding this comment.
One comment on config map.
Also needs merge conflicts removed, please.
| # ansible.builtin.debug: | ||
| # msg: "{{ lookup('agnosticd_user_data', '*') }}" | ||
|
|
||
| - name: Retrieve ConfigMaps with the demo.redhat.com/userinfo label |
There was a problem hiding this comment.
Do we need some logic to wait until all the Application(Set)s are in Synced and Ready state? Wouldn't this otherwise run and never find the ConfigMap because it would be way too quick to check?
What's in this PR
Two independent improvements to
ocp4_workload_gitops_bootstrap, both needed for multi-tenant shared cluster labs.1. Userinfo ConfigMap discovery
Enables the bootstrap role to read a
demo.redhat.com/userinfo-labeled ConfigMap created by GitOps and report its data back to Babylon viaagnosticd_user_info. This allows GitOps deployments to surface lab URLs, credentials, and other user-facing data without requiring a separate Ansible step.How it works:
demo.redhat.com/userinfoanywhere on the clusterdata.users_jsonare imported as per-user data2. Cascade cleanup on destroy (
resources-finalizer+remove_workload.yml)Problem:
remove_workload.ymlwas not implemented (msg: "Not implemented"), leaving bootstrap Applications and all their child Applications/resources on the cluster after destroy.Fix:
resources-finalizer.argocd.argoproj.ioto the bootstrap Application templateremove_workload.ymlto delete the bootstrap Application and wait for ArgoCD to cascadeHow cascade works:
No custom ArgoCD cleanup code needed anywhere else. ArgoCD handles it all via the finalizer chain.
Destroy order in AgnosticV:
Test plan
ocp4_workload_gitops_bootstrapwith a tenant GitOps repo that creates ademo.redhat.com/userinfoConfigMap — verify user data flows to Babylonbootstrap-tenant-{guid}and all child Applications/resources are cleaned up automatically