github.com/argoproj/argo-cd/v3@v3.2.1/test/e2e/testdata/cmp-fileName/plugin.yaml (about)

     1  apiVersion: argoproj.io/v1alpha1
     2  kind: ConfigManagementPlugin
     3  metadata:
     4    name: cmp-fileName
     5  spec:
     6    version: v1.0
     7    generate:
     8      # The -z test is to ensure that environment variables are made available to the plugin, even if they're empty. https://serverfault.com/a/382740/462962
     9      command: [sh, -c, 'if [ -z "${ARGOCD_ENV_EMPTY+set}" ]; then echo "ARGOCD_ENV_EMPTY should have been set." && exit 1; fi; echo "{\"kind\": \"ConfigMap\", \"apiVersion\": \"v1\", \"metadata\": { \"name\": \"$ARGOCD_APP_NAME\", \"namespace\": \"$ARGOCD_APP_NAMESPACE\", \"annotations\": {\"Foo\": \"$ARGOCD_ENV_FOO\", \"KubeVersion\": \"$KUBE_VERSION\", \"KubeApiVersion\": \"$KUBE_API_VERSIONS\",\"Bar\": \"baz\"}}}"']
    10    discover:
    11      fileName: "subdir/s*.yaml"