{"id":17260587,"url":"https://github.com/chengfang/multi-source-cmp","last_synced_at":"2026-01-05T19:41:14.221Z","repository":{"id":235056706,"uuid":"789978061","full_name":"chengfang/multi-source-cmp","owner":"chengfang","description":"Argo CD multi-source applications using CMP (configuration management plugin)","archived":false,"fork":false,"pushed_at":"2024-04-25T02:47:59.000Z","size":200,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T11:18:28.279Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chengfang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-22T03:13:04.000Z","updated_at":"2024-04-25T02:48:02.000Z","dependencies_parsed_at":"2024-12-04T08:25:38.667Z","dependency_job_id":"8b31039c-c33e-4d5f-ab85-2961d4ef4129","html_url":"https://github.com/chengfang/multi-source-cmp","commit_stats":null,"previous_names":["chengfang/multi-source-cmp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chengfang%2Fmulti-source-cmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chengfang%2Fmulti-source-cmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chengfang%2Fmulti-source-cmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chengfang%2Fmulti-source-cmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chengfang","download_url":"https://codeload.github.com/chengfang/multi-source-cmp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245632361,"owners_count":20647189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T07:48:43.901Z","updated_at":"2026-01-05T19:41:14.159Z","avatar_url":"https://github.com/chengfang.png","language":null,"readme":"# Argo CD multi-source applications with CMP (config management plugin)\n\nThis repo contains some Argo CD applications to demonstrate how to configure \nmulti-source apps to work with CMP.\n\n## Project structure\n* CMP plugin config files\n  * the config map that defines the CMP plugin: `cmp/cmp-plugin-config.yaml`\n  * the patch file for argocd-repo-server: `cmp/argocd-repo-server-patch.yaml`\n```bash\n└── cmp\n    ├── argocd-repo-server-patch.yaml\n    └── cmp-plugin-config.yaml\n```\n\n* user application files, including CMP marker files for plugin discovery. `source1`\n  and `source2` can serve as the source individually for single-source Argo CD\n  application, or jointly for multi-source Argo CD application.\n\n```bash\n├── apps\n│   ├── source1\n│   │   └── cmp-plugin-config.env\n│   └── source2\n│       └── tomcat2.yaml \n```\n\n* Argo CD application manifest files, including both single-source and multi-source\n  applications.\n\n```bash\n├── argo-apps\n│   ├── multi-source-app-with-discover.yaml\n│   └── single-source-app.yaml\n```\n\n## Install CMP as side-car container in argocd-repo-server\n```bash\n# switch to argocd namespace for convenience\nkubectl config set-context --current --namespace argocd\n\n# apply the CMP plugin config as a config map\nkubectl apply -f cmp/cmp-plugin-config.yaml\n\n# apply the patch to argocd-repo-server\nkubectl patch deployments/argocd-repo-server --patch-file cmp/argocd-repo-server-patch.yaml\n\n# verify CMP plugin and argocd-repo-server\nkubectl get cm cmp-plugin-config\nkubectl get deploy | fgrep argocd-repo-server\n```\n\n## Deploy a single-source Argo CD application with CMP\n```bash\n# apply the Argo CD application manifest\nkubectl apply -f argo-apps/single-source-app.yaml\n\n# verify application is deployed, and the configmap resource is generated by the CMP plugin.\n# The configmap name is based on the value in the file located in `source1`, and the\n# Argo CD application name.\nkubectl get cm source1-single-source-app\nkubectl get app single-source-app\n\n# clean up\nkubectl delete app single-source-app\nkubectl delete cm source1-single-source-app\n```\n## Deploy a multi-source Argo CD application with CMP\n```bash\n# apply the Argo CD application manifest\nkubectl apply -f argo-apps/multi-source-app-with-discover.yaml\n\n# verify application is deployed, and the configmap resource is generated by the CMP plugin.\n# The configmap name is based on the value in the file located in `source1`, and the\n# Argo CD application name.\n# This multi-source application also includes a tomcat deployment.\nkubectl get cm source1-multi-source-app-with-discover\nkubectl get app multi-source-app-with-discover\nkubectl get pod\n\n# clean up\nkubectl delete app multi-source-app-with-discover\nkubectl delete cm source1-multi-source-app-with-discover\n```\nThe screenshot from Argo CD UI shows the Argo CD application `multi-source-app-with-discover`\nis healthy and synced up correctly. It contains both the config map `source1-multi-source-app-with-discover`\ngenerated by the CMP plugin, and the tomcat deployment from the 2nd application source.\n\n![](screenshot-multi-source-app.png)\n\n## Limitations of using CMP in multi-source application\n\nA single-source Argo CD application can be configured to use a certain CMP in either of\nthe following 2 ways:\n* Include a `discover` mechanism in the CMP configuration, typically via some marker files.\n* specify a `plugin` element in the Argo CD application spec `source` section to\n  denote the association between the CMP and application source. This `plugin`\n  element may also include environment variables and parameters that will be passed\n  to the CMP.\n\nFor multi-source applications using CMP, only the first option, i.e., `discover`\nmechanism is supported. Each individual source under the `sources` field in a \nmulti-source application does not allow a `plugin` field, as would a regular\nsingle-source application.\n\nAs demonstrated in this project, application-specific parameters and variables\ncan still be passed to CMP runtime via files in application source.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchengfang%2Fmulti-source-cmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchengfang%2Fmulti-source-cmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchengfang%2Fmulti-source-cmp/lists"}