This is a Docker image which can be used as a sidecar for ArgoCD to enable tanka
support.
This plugin currently requires a jsonnetfile.json
file to be anywhere in the repository to be activated. It is yet to be determined, whether this overrides built-in jsonnet
support integrated into ArgoCD.
jsonnet-bundler
is used to install vendor
directories anywhere in the repository, so that both top-level and environment-specific vendor
directories are supported.
This plugin will vendor charts in every directory in the repository where a chartfile.yaml
is found.
Step 1: add an extra container to ArgoCD Helm release:
{
"extraContainers": [
{
"name": "tanka-cmp",
"image": "kurzdigital/argocd-tanka-plugin",
"securityContext": {
"runAsUser": 999
},
"volumeMounts": [
{
"mountPath": "/var/run/argocd",
"name": "var-files"
},
{
"mountPath": "/home/argocd/cmp-server/plugins",
"name": "plugins"
},
{
"mountPath": "/tmp",
"name": "cmp-tmp"
}
]
}
]
}
Step 2: add plugin configuration to your ArgoCD application:
spec:
source:
plugin:
env:
- name: TK_ENV
value: default
- name: EXTRA_ARGS
value: --extra-options-you-need
TK_ENV
:tanka
environment to renderEXTRA_ARGS
: any extra arguments you'd like to put on the commandline oftk
. Good candidates are top-level functions and external variables.CREDENTIALS_DIRECTORY
: if you use private Jsonnet modules, there is a good chance they are located in your non-public Git repository. You can mount your credentials ingit-credential
format with one credential per file in this directory (/credentials
by default) and they'll get imported automatically into Git's credentials store and can be used transparently.
You can re-use your tanka
$.config
object as top-level arguments in the plugin by setting EXTRA_ARGS
environment variable to
std.join(" ", ["-A %s=%s" % [x, $.config[x]] for x in std.objectFields($.config)])