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

converge use kubeconfig from previous invocation #47

Open
diafour opened this issue Dec 1, 2021 · 0 comments
Open

converge use kubeconfig from previous invocation #47

diafour opened this issue Dec 1, 2021 · 0 comments

Comments

@diafour
Copy link

diafour commented Dec 1, 2021

Overview

I've got these steps:

      - name: Deploy to stage
        uses: werf/actions/[email protected]
        with:
          kube-config-base64-data: "${{ secrets.KUBECONFIG_FOR_STAGE }}"
        env:
          WERF_NAMESPACE: web-stage

      - name: Deploy to production
        uses: werf/actions/[email protected]
        with:
          kube-config-base64-data: "${{ secrets.KUBECONFIG_FOR_PROD }}"
        env:
          WERF_NAMESPACE: web-production

Non-relevant envs and options are omitted.

Expected behavior

'Deploy to production' step should fail if KUBECONFIG_FOR_PROD secret is not set for the repository.

Actual behavior

'Deploy to production' step uses secrets.KUBECONFIG_FOR_STAGE if KUBECONFIG_FOR_PROD is not set. web-production namespace is created in the stage cluster.

Possible ways to fix

  • Additional option kube-context to use specified context from kube-config.
  • Add cleanup to remove created kube-config at workflow finish.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant