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

Set KUBECONFIG for LBC's ginkgo tests #16334

Merged
merged 1 commit into from Feb 10, 2024

Conversation

rifelpet
Copy link
Member

Hoping to fix these tests: https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/e2e-kops-aws-aws-load-balancer-controller/1755828286962798592

The test failures seem to be using the wrong kubeconfig settings, potentially using the "in cluster" config of the prow job pod itself.

This explicitly sets KUBECONFIG so that the ginkgo tests will use the kops cluster's admin credentials

ref: https://kubernetes.slack.com/archives/C8MKE2G5P/p1707502477184889?thread_ts=1707242089.155659&cid=C8MKE2G5P

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 10, 2024
@@ -33,6 +33,9 @@ ZONES="eu-west-1a,eu-west-1b,eu-west-1c"

kops-up

export KUBECONFIG=$(mktemp -t kops.XXXXXXXXX)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.shellcheck.net/wiki/SC2155

Suggested change
export KUBECONFIG=$(mktemp -t kops.XXXXXXXXX)
KUBECONFIG=$(mktemp -t kops.XXXXXXXXX)
export KUBECONFIG

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to export?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe so because the ginkgo process is what is loading the client-go config and reading from the KUBECONFIG env var, not just a shell variable.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 10, 2024
@hakman
Copy link
Member

hakman commented Feb 10, 2024

/retest

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 10, 2024
@k8s-ci-robot k8s-ci-robot merged commit 99db208 into kubernetes:master Feb 10, 2024
22 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.29 milestone Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants