Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jille/argocd-templatize
Templatize finds ./*.json and ./*.yaml and passes them through text/template with the environment variables
https://github.com/jille/argocd-templatize
argocd argocd-plugin kubernetes kustomize
Last synced: 17 days ago
JSON representation
Templatize finds ./*.json and ./*.yaml and passes them through text/template with the environment variables
- Host: GitHub
- URL: https://github.com/jille/argocd-templatize
- Owner: Jille
- License: bsd-2-clause
- Created: 2021-09-11T14:27:58.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-11T14:45:32.000Z (about 3 years ago)
- Last Synced: 2024-10-11T11:04:41.944Z (about 1 month ago)
- Topics: argocd, argocd-plugin, kubernetes, kustomize
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# argocd-templatize
Templatize finds `./*.json` and `./*.yaml` and passes them through [text/template](https://pkg.go.dev/text/template) with the environment variables named `TPZ_*`.
`TPZ_SOME_THING` is available as `{{.SomeThing}}` in the template.
Its intended usage is as a custom plugin for argocd, to be able to use cluster specific variables in your YAML.
You can install this into [ArgoCD](https://argoproj.github.io/argo-cd/) with the following Kustomization: https://github.com/Jille/argocd-templatize/blob/master/kustomization.yaml
Now you can enable templatize in your `Application`:
```diff
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
project: default
source:
repoURL: ssh://[email protected]:/Jille/configuration.git
+ plugin:
+ name: templatize
+ env:
+ - name: TPZ_CLUSTER
+ value: prod
````TPZ_CLUSTER` will now be available as `{{.Cluster}}` in your YAML. You can use all functionality of [text/template](https://pkg.go.dev/text/template).