Skip to content

kurzdigital/argocd-tanka-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

argocd-tanka-plugin

This is a Docker image which can be used as a sidecar for ArgoCD to enable tanka support.

Requirements

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.

vendor support

jsonnet-bundler is used to install vendor directories anywhere in the repository, so that both top-level and environment-specific vendor directories are supported.

Helm Charts support

This plugin will vendor charts in every directory in the repository where a chartfile.yaml is found.

Usage

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

Environment variables

  • TK_ENV: tanka environment to render
  • EXTRA_ARGS: any extra arguments you'd like to put on the commandline of tk. 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 in git-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.

Tips and tricks

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)])

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published