Home

Awesome

argocd-lovely-plugin

An Argo CD plugin that behaves in a way we wish Argo CD behaved. This is only aimed at using Argo CD for GitOps - we do not use the UI for creating or modifying applications.

Headline features

Why?

Supports

argocd-lovely-plugin does not support jsonnet as we do not use jsonnet, and haven't seen the need to use it. We don't know how it would best fit into the structure.

Plain yaml

All the yaml in the directory and all subdirectories will be used as part of the application only if it is not a kustomize or helm chart. .hidden yaml files are not included.

Supported Argo CD Versions

We aim to match the Argo CD supported versions by testing against the Argo CD N and N -1 versions of Argo CD. You can see the current versions of Argo CD that we test against by looking in the CI bootstrap directory in this repo.

Installing

We offer many pre-built container options. We only support the use of these containers, the binaries provided are for convenience:

Installing as an Argo CD Sidecar Plugin

We recommend you install as an Argo CD CMP Sidecar Plugin. Argo CD's documentation has steps on how to achieve this, or you can see our Kustomization example. You can also observe how we install Lovely for our CI tests in the CI bootstrap directory in this repo.

argocd-lovely-plugin has no discovery rules, so will not run by default. You must reference the plugin by name in your application spec. For example:

apiVersion: argoproj.io/v1alpha1
kind: Application
...
spec:
  source:
    plugin:
      name: argocd-lovely-plugin-v1.0
...

For more information, please refer to the Argo CD Documentation on discovery.

Environment variables

argocd-lovely-plugin is configured through environment variables and parameters. These can be set in both the sidecar and in the application itself.

If you are passing the configuration in as application environment variables in Argo CD 2.4 or higher you must not put the ARGOCD_ENV_ prefix on them, as Argo CD does that for you.

Otherwise argocd-lovely-plugin will accept either form of all of the variables, with or without ARGOCD_ENV_, with the ARGOCD_ENV_ version taking precedence if you set both of them.

argocd-lovely-plugin is designed for minimal configuration and to do the right thing. The following environment variables can be used to change some behaviour.

See this for more details on how to configure it using parameters and a list of parameters.

Kustomize

You can use the helm chart inflation generator of kustomize this way. See the test for an example of this. If you do this none of the helm environment variables will have any effect as you can set those in your kustomization.yaml instead. There is no way to merge/patch your values.yaml with lovely only (you should run a preprocessor for that). Despite this, that is the recommended way to use helm and kustomize together. LOVELY_HELM_NAME will also have no effect here.

ARGOCD_ENV_ support

All argocd-lovely-plugin environment variables may be prefixed with ARGOCD_ENV_ for Argo CD 2.4 compatibility. If you are deranged and define both the ARGOCD_ENV_ version will be used. When you put an environment variable into an application in 2.4 or later it will automatically get prefixed with ARGOCD_ENV_ so you must use the non prefixed variable name there.

What can I do with it?

Have a look at the examples directory for a list of examples of how you can use this to make nice git repos for your applications. This also refers to the test directory, which contains a number of examples that also serve as CI/CD tests for this plugin.

What doesn't it do?

This is not a templating tool, there are plenty of choices out there to that stuff. It just brings together external tools.

There is not yet support for accessing private helm repos.

How does it work?

For more details on what lovely does read this

Debugging lovely's behaviour locally

You can download argocd-lovely-plugin binary and run it in an application directory. Errors will go to stderr, and the rendered yaml will appear on stdout.

Videos

If you prefer to watch videos of things rather than read words, we have compiled some demos.