Skip to content

converge use kubeconfig from previous invocation #47

@diafour

Description

@diafour

Overview

I've got these steps:

      - name: Deploy to stage
        uses: werf/actions/converge@v1.2.0
        with:
          kube-config-base64-data: "${{ secrets.KUBECONFIG_FOR_STAGE }}"
        env:
          WERF_NAMESPACE: web-stage

      - name: Deploy to production
        uses: werf/actions/converge@v1.2.0
        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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions