-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃尡 replace hardcoded kind cluster name to pickup env values #5822
Conversation
Hi @DiptoChakrabarty. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
hack/kind-install-for-capd.sh
Outdated
if [[ -z "$CAPI_KIND_CLUSTER_NAME" ]]; then | ||
NAME="capi-test" | ||
else | ||
NAME="${CAPI_KIND_CLUSTER_NAME}" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Should we drop L35-L44 so there is only a single-mode the set the cluster name (envvar vs envvar+command arg)?
@killianmuldoon opinions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely - using and env variable will make it easy to use the same value elsewhere (e.g. tilt setup) where needed. @DiptoChakrabarty could you remove the while block from L35-L44?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay sure
hack/kind-install-for-capd.sh
Outdated
esac | ||
done | ||
|
||
if [[ -z "$CAPI_KIND_CLUSTER_NAME" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know there's barely code left but we can simplify this further to:
NAME=${CAPI_KIND_CLUSTER_NAME:-"capi-test"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@DiptoChakrabarty fyi. Once #5785 is merged, we have the same issue there. But up to you if you want to already include this in the current PR. |
okay yeah I wanna work on it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@DiptoChakrabarty Please lets squash commits and remove WIP from PR title before moving forward. |
/ok-to-test @DiptoChakrabarty do you mind implementing the same mechanism in cluster-api/hack/tools/tilt-prepare/main.go Line 311 in 3231c99
|
yes sure |
40b6e59
to
d3d9596
Compare
Done |
cmd := exec.CommandContext(ctx, | ||
"kind", | ||
"load", | ||
"docker-image", | ||
"--name=capi-test", // TODO: make this configurable | ||
namecmd, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with a lint exception in this case
namecmd, | |
namecmd, //nolint:gosec |
(not sure the exception is on the right line, but you can test this locally with make lint
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes fixed it
f64117a
to
7a1a72b
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini 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 |
馃尡
What this PR does / why we need it:
Replaces code to pickup kind cluster alternate from env variables instead of hardcoding it to capi-test. If env variable is not present the default value of capi-test cluster name is taken.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #5820