Skip to content
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

Replace configs appset with a helm template generator #862

Merged
merged 31 commits into from
Mar 27, 2024
Merged

Conversation

tomklapiscak
Copy link
Contributor

@tomklapiscak tomklapiscak commented Mar 27, 2024

This PR forms part of the work for https://jsw.ibm.com/browse/MASCORE-2082 to replace the use of the configs ApplicationSet with a Helm template-based generator. This was necessary for a couple of reasons:

  • a bug in ArgoCD causes PostDelete hooks to not work for Applications generated directly by ApplicationSets
  • the fact that ArgoCD does not honour syncwave annotations for applications generated by ApplicationSets (see slack thread for details)

In order to implement the Helm-template-based Application generator, I was forced to merge all of our MAS config files (MongoCfg, SLSCfg, etc etc) into a single list in a single file in gitops-envs. (ibm-mas-suite-configs.yaml, example)

This PR replaces all of the individual CLI functions for setting up MAS configs in their own files with a single function gitops-mas-config capable of maintaining the list in this single file. All configuration types (mongo, sls, etc) with any scope (system, app, ws, wsapp) can be upserted or removed idempotently by this single script. All of the associated Tekton tasks have also been updated to use this new function.

This PR also introduces the new clone_and_lock_target_git_repo and save_and_unlock_target_git_repo functions in gitops-utils that guard against merge conflicts that can happen when multiple instanves of the function for the same MAS instance are run in parallel. These functions are generic and will be suitable for use in other functions if we ever need to change them to update a single, shared config file in gitops-envs.

Associated PRs:

Related Issues:

Testing:

image

  • Resulting ArgoCD MAS instance-root app (unhealthy ma application unrelated to these changes, the relevant apps are highlighted):

image

image

(these have now all been replaced by the unified gitops-mas-config function)
IMPORTANT: revert this commit prior to merging into gitops branch
IMPORTANT: revert this commit prior to merging into gitops branch
(temporary measure until we get rid of the python yq that is overridden by the gitops functions)
…ig against the same file using a git branch as a lock
@tomklapiscak tomklapiscak marked this pull request as ready for review March 27, 2024 13:42
@whitfiea whitfiea merged commit f0b3115 into gitops Mar 27, 2024
2 checks passed
@whitfiea whitfiea deleted the mascore2082 branch March 27, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants