-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
feat: add EMULATED_VERSION env var and --emulated-version flag params to k8s binaries flags in hack/local-up-cluster.sh #126789
feat: add EMULATED_VERSION env var and --emulated-version flag params to k8s binaries flags in hack/local-up-cluster.sh #126789
Conversation
Hi @aaron-prindle. Thanks for your PR. I'm waiting for a kubernetes 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-sigs/prow repository. |
/ok-to-test |
@@ -632,6 +633,7 @@ EOF | |||
--etcd-servers="http://${ETCD_HOST}:${ETCD_PORT}" \ | |||
--service-cluster-ip-range="${SERVICE_CLUSTER_IP_RANGE}" \ | |||
--feature-gates="${FEATURE_GATES}" \ | |||
--emulated-version="${EMULATED_VERSION}" \ |
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.
nit: Can we use --emulated-version=kube=${EMULATED_VERSION}
to be aligned with #125742? It is defaulted to kube but consistency would be nice.
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.
Ah good catch thanks! I've updated the value for all three flag entries as recommended. Now they are:
--emulated-version=kube=${EMULATED_VERSION}
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've undone this change as there was some test failures and UX issues in my testing with the "kube=" prefix added to the flag entires. The default value for EMULATED_VERSION is "" so the value passed is kube=""
. Going to keep the initial syntax as adding logic to prepend a suffix or use single quotes is different than other env vars in the file and also the prepending logic might confuse users. With the initial approach users can set EMULATED_VERSION=1.31
OR EMULATED_VERSION=kube=1.31
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've updated the script to instead use:
EMULATED_VERSION=${EMULATED_VERSION:+kube=$EMULATED_VERSION}
This way it is consistent with #125742 and has the default values we want
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.
perfect, thanks!
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.
aside: in most other scripts we make the "public API" use KUBE_
but we should probably remain self-consistent within this script/tool
516776a
to
31499b6
Compare
/sig api-machinery |
LGTM label has been added. Git tree hash: 1cb6d75f4b43f05ca7d36598436f2caf119e06b5
|
/retest |
31499b6
to
0cc09d4
Compare
LGTM label has been added. Git tree hash: 7286740c464dc2625a64efa5c43852738f96cef6
|
cc @liggitt I'd prefer to get dims's input for local-up-cluster as kinda the main steward at this point, but this looks straight forward enough, I don't think we're trying to enable skew here with older releases that lack these flags. |
er cc @dims for FYI later at least |
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
/approve
/retest the e2e-gce failure was #126800 |
… to k8s binaries flags in hack/local-up-cluster.sh
6a59542
to
a83f0f6
Compare
a83f0f6
to
780cfa5
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aaron-prindle, BenTheElder 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 |
@aaron-prindle: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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-sigs/prow repository. I understand the commands that are listed here. |
/lgtm |
LGTM label has been added. Git tree hash: 39057e4fb2f234c8c91df68c76e136bf1c1d88d4
|
/retest |
@BenTheElder it seems like the job pull-kubernetes-local-e2e has not succeeded recently: https://prow.k8s.io/job-history/gs/kubernetes-jenkins/pr-logs/directory/pull-kubernetes-local-e2e. It's not blocking but is this something that is already tracked? |
/triage accepted |
What type of PR is this?
/kind feature
What this PR does / why we need it:
As part of kubernetes/enhancements#4330, we want to add the
--emulated-version
flag as an option (not set by default) through our test and dev infrastructure to make it easier for users and test automation to use the flag.This PR adds a new environment variable EMULATED_VERSION in hack/local-cluster-up.sh and adds the --emulated-version flag to the kubernetes binaries that support it currently:
From looking at similar PRs that update hack/local-up-cluster.sh similarly I believe no other files need to be touched other than the local-up-cluster.sh script directly:
Which issue(s) this PR fixes:
Fixes #126788
Special notes for your reviewer:
Manually tested via running hack/local-up-cluster.sh w/ and w/o EMULATED_VERSION env var set
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: