Fix wrong context name for kubectl #1

Merged
salcedo merged 1 commit from hurui200320/actions-kubernetes:fix-context-name into master 2025-10-21 13:06:25 +00:00
Contributor

Today I was testing the action and got the error in this run: https://git.cleverthis.com/clevermicro/amq-adapter-python/actions/runs/630/jobs/2

error: context "clevermicro-test-1761029459-nn9igr4zoznaeuwo" does not exist

When creating a kind cluster with a name: kind create cluster -n name, the actual context will be named as kind-name. Thus, in the action, when we need to use kubctl command, the context name should be kind-${{ inputs.inputs.cluster-name }}.

This PR fixed this issue, along with the following changes:

  • add action path var to the default kind-config yaml
  • remove the --docker-email flag when adding the docker registry secret

The modified action has been used in the clevermicro's python adapter and is working fine.

Today I was testing the action and got the error in this run: https://git.cleverthis.com/clevermicro/amq-adapter-python/actions/runs/630/jobs/2 ``` error: context "clevermicro-test-1761029459-nn9igr4zoznaeuwo" does not exist ``` When creating a kind cluster with a name: `kind create cluster -n name`, the actual context will be named as `kind-name`. Thus, in the action, when we need to use kubctl command, the context name should be `kind-${{ inputs.inputs.cluster-name }}`. This PR fixed this issue, along with the following changes: + add action path var to the default kind-config yaml + remove the `--docker-email` flag when adding the docker registry secret The modified action has been used in the clevermicro's python adapter and is working fine.
salcedo merged commit e2a7e28feb into master 2025-10-21 13:06:25 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: actions/kubernetes#1
No description provided.