Files
Michael CrenshawandGitHub 19ad0634c4 fix: pass env when getting param announcement (#11812) (#11815)
* fix: pass env when getting param announcement (#11812)

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

* use same method as other methods

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

* better tests

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

* make sure env var tests are meaningful

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

---------

Signed-off-by: Michael Crenshaw <[email protected]>
2023-03-22 14:55:09 -04:00

34 lines
729 B
YAML

apiVersion: argoproj.io/v1alpha1
kind: ConfigManagementPlugin
metadata:
name: kustomize
spec:
version: v1.0
init:
command: [sh, -c]
args:
- |
kustomize version
generate:
command: [sh, -c]
args:
- |
kustomize build
discover:
find:
command: [sh, -c, find . -name kustomization.yaml]
glob: "**/kustomization.yaml"
parameters:
static:
- name: test-param
string: test-value
dynamic:
command: [sh, -c]
args:
- |
# Make sure env vars are making it to the plugin.
if [ -z "$MUST_BE_SET" ]; then
exit 1
fi
echo "[{\"name\": \"dynamic-test-param\", \"string\": \"$MUST_BE_SET\"}]"