Files
deploy/examples/plugins/helm/plugin.yaml
T
5918367282 feat: parameterized config management plugins (#9135) (#9216)
* feat: parameterized CMPs

Signed-off-by: Michael Crenshaw <[email protected]>

* values types for parameters

Signed-off-by: Michael Crenshaw <[email protected]>

* Add types for CMP announcement

Signed-off-by: zachaller <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>

* Reorg

Signed-off-by: zachaller <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>

* finish type

Signed-off-by: zachaller <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>

* First pass at working GetParametersAnnouncement

Signed-off-by: zachaller <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>

* Typos

Signed-off-by: zachaller <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>

* Make all fields optional

Signed-off-by: zachaller <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>

* Make sure response makes it to repo server

Signed-off-by: zachaller <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>

* Refactor for testing

Signed-off-by: zachaller <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>

* lint

Signed-off-by: Michael Crenshaw <[email protected]>

* send build env to param announcement gen

Signed-off-by: Michael Crenshaw <[email protected]>

* test parameter announcement

Signed-off-by: Michael Crenshaw <[email protected]>

* tests

Signed-off-by: Michael Crenshaw <[email protected]>

* environ tests

Signed-off-by: Michael Crenshaw <[email protected]>

* Rename workdir to app dir

Signed-off-by: zachaller <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>

* handle empty command, start ui work (#11)

* Add types for CMP announcement

Signed-off-by: zachaller <[email protected]>

* Reorg

Signed-off-by: zachaller <[email protected]>

* finish type

Signed-off-by: zachaller <[email protected]>

* First pass at working GetParametersAnnouncement

Signed-off-by: zachaller <[email protected]>

* Typos

Signed-off-by: zachaller <[email protected]>

* Make all fields optional

Signed-off-by: zachaller <[email protected]>

* Make sure response makes it to repo server

Signed-off-by: zachaller <[email protected]>

* Refactor for testing

Signed-off-by: zachaller <[email protected]>

* values types for parameters

Signed-off-by: Michael Crenshaw <[email protected]>

* lint

Signed-off-by: Michael Crenshaw <[email protected]>

* send build env to param announcement gen

Signed-off-by: Michael Crenshaw <[email protected]>

* test parameter announcement

* tests

Signed-off-by: Michael Crenshaw <[email protected]>

* environ tests

Signed-off-by: Michael Crenshaw <[email protected]>

* Rename workdir to app dir

Signed-off-by: zachaller <[email protected]>

* handle empty command, start ui work

Signed-off-by: Michael Crenshaw <[email protected]>

* fix order

Signed-off-by: Michael Crenshaw <[email protected]>

* fix map merging, make params read-only

Signed-off-by: Michael Crenshaw <[email protected]>

Co-authored-by: zachaller <[email protected]>

* Add helm PoC example plugin

Signed-off-by: zachaller <[email protected]>

* example as kustomize overlay

Signed-off-by: Michael Crenshaw <[email protected]>

* Parameterized cmps docs (#12)

* use printf instead of echo

Signed-off-by: Michael Crenshaw <[email protected]>

* docs

Signed-off-by: Michael Crenshaw <[email protected]>

* test for temp dir cleanup

Signed-off-by: Michael Crenshaw <[email protected]>

* handle empty params

Signed-off-by: Michael Crenshaw <[email protected]>

* handle empty values

Signed-off-by: Michael Crenshaw <[email protected]>

* consolidate types

Signed-off-by: Michael Crenshaw <[email protected]>

* fix tests

Signed-off-by: Michael Crenshaw <[email protected]>

* docs

Signed-off-by: Michael Crenshaw <[email protected]>

* docs

Signed-off-by: Michael Crenshaw <[email protected]>

* remove duplicate info

Signed-off-by: Michael Crenshaw <[email protected]>

* add warning about param announcements vs param values

Signed-off-by: Michael Crenshaw <[email protected]>

* tests (#13)

Signed-off-by: Michael Crenshaw <[email protected]>

* tests

Signed-off-by: Michael Crenshaw <[email protected]>

* fix types

Signed-off-by: Michael Crenshaw <[email protected]>

* fix test

Signed-off-by: Michael Crenshaw <[email protected]>

* fix codegen

Signed-off-by: Michael Crenshaw <[email protected]>

* fix codegen

Signed-off-by: Michael Crenshaw <[email protected]>

* revert test hack

Signed-off-by: Michael Crenshaw <[email protected]>

* docs correction

Signed-off-by: Michael Crenshaw <[email protected]>

* fix indentation

Signed-off-by: Michael Crenshaw <[email protected]>

* fix spacing

Signed-off-by: CI <[email protected]>

* move util function to util file and add test

Signed-off-by: CI <[email protected]>

* wrap error

Signed-off-by: CI <[email protected]>

* correct version number

Signed-off-by: CI <[email protected]>

* document necessity of collectionType param

Signed-off-by: CI <[email protected]>

* remove part of error message that's not useful (dir name is now randomized)

Signed-off-by: CI <[email protected]>

* fix things so that they are not broken

Signed-off-by: CI <[email protected]>

* don't close file before caller gets a chance to use it

Signed-off-by: CI <[email protected]>

* codegen

Signed-off-by: Michael Crenshaw <[email protected]>

* fix test

Signed-off-by: Michael Crenshaw <[email protected]>

* comments

Signed-off-by: Michael Crenshaw <[email protected]>

* fix test

Signed-off-by: Michael Crenshaw <[email protected]>

* DON'T PANIC

Signed-off-by: Michael Crenshaw <[email protected]>

Signed-off-by: Michael Crenshaw <[email protected]>
Signed-off-by: zachaller <[email protected]>
Signed-off-by: CI <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: zachaller <[email protected]>
2022-11-29 13:08:32 -05:00

18 lines
422 B
YAML

apiVersion: argoproj.io/v1alpha1
kind: ConfigManagementPlugin
metadata:
name: simple-helm-cmp
spec:
version: v1.0
generate:
command: [sh, /var/run/argocd/helm-plugin/generate.sh]
discover:
fileName: "./values.yaml"
parameters:
static:
- name: values-files
title: VALUES FILES
collectionType: array
dynamic:
command: [sh, /var/run/argocd/helm-plugin/get-parameters.sh]