Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env does not pass to configManagementPlugins in Argo CD v2.4.0 #9638

Closed
3 tasks done
czchen opened this issue Jun 12, 2022 · 1 comment
Closed
3 tasks done

env does not pass to configManagementPlugins in Argo CD v2.4.0 #9638

czchen opened this issue Jun 12, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@czchen
Copy link
Contributor

czchen commented Jun 12, 2022

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

When trying to upgrade from Argo v2.3.4 to v2.4.0, we found that plugin command cannot read ENV set in Application. The following is reproduce step:

To Reproduce

  • Setup an application with the following configuration:

    apiVersion: argoproj.io/v1alpha1
    kind: Application
    spec:
      source:
        plugin:
          name: my-plugin
          env:
          - name: MY_ENV_NAME
            value: my-env-value
  • Setup configManagementPlugin with the following configuration:

    configManagementPlugins:
      generate:
        command: ['sh', '-c']
        args: ['my-command "$MY_ENV_NAME"']
    • In my-command, print the first argument.
  • The output of my-command is empty string instead of my-env-value.

Expected behavior

  • Environment variable $MY_ENV_NAME shall be set to its value my-env-value defined in Application.

Screenshots

Version

argocd: v2.4.0+91aefab
  BuildDate: 2022-06-10T17:44:14Z
  GitCommit: 91aefabc5b213a258ddcfe04b8e69bb4a2dd2566
  GitTreeState: clean
  GoVersion: go1.18.3
  Compiler: gc
  Platform: linux/amd64
argocd-server: v2.4.0+91aefab

Logs

@czchen czchen added the bug Something isn't working label Jun 12, 2022
@czchen
Copy link
Contributor Author

czchen commented Jun 12, 2022

Find help in slack, https://argo-cd.readthedocs.io/en/latest/operator-manual/upgrading/2.3-2.4/#update-plugins-to-use-newly-prefixed-environment-variables

@czchen czchen closed this as completed Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant