-
Notifications
You must be signed in to change notification settings - Fork 39.7k
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
kubeadm v1beta1: InitConfiguration.APIEndpoint -> LocalAPIEndpoint #70761
Conversation
/priority important-soon |
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
docs can be cleaned up later.
// APIEndpoint represents the endpoint of the instance of the API server to be deployed on this node. | ||
APIEndpoint APIEndpoint | ||
// LocalAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node | ||
// In HA setups, this differ from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint |
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.
differs
or is different
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
/test pull-kubernetes-verify |
/hold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: luxas, timothysc 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 |
should this be considered as "action required" item? |
I'm fine with prefixing with Local if it helps with clarification. @timothysc @luxas @rosti @neolit123 opinions? quick thumbs up/down? |
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.
@luxas thanks for this change! It's nice to have you back!
I do think, that we should actually extend this to cover JoinConfiguration.APIEndpoint -> LocalAPIEndpoint
too. Although, that can be done in another PR.
@fabriziopandini IDK about APIEndpoints
vs LocalAPIEndpoints
. Both ways seem descriptive enough in its context.
@@ -49,7 +49,7 @@ func ValidateInitConfiguration(c *kubeadm.InitConfiguration) field.ErrorList { | |||
allErrs = append(allErrs, ValidateNodeRegistrationOptions(&c.NodeRegistration, field.NewPath("nodeRegistration"))...) | |||
allErrs = append(allErrs, ValidateBootstrapTokens(c.BootstrapTokens, field.NewPath("bootstrapTokens"))...) | |||
allErrs = append(allErrs, ValidateClusterConfiguration(&c.ClusterConfiguration)...) | |||
allErrs = append(allErrs, ValidateAPIEndpoint(&c.APIEndpoint, field.NewPath("apiEndpoint"))...) | |||
allErrs = append(allErrs, ValidateAPIEndpoint(&c.LocalAPIEndpoint, field.NewPath("apiEndpoint"))...) |
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.
The field path also needs to be changed here to localAPIEndpoint
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
/hold cancel |
3388eb9
to
b814862
Compare
@fabriziopandini will implement this, along with changing |
/test pull-kubernetes-verify |
b814862
to
b9474bd
Compare
b9474bd
to
48c273b
Compare
the verify failures could be due to golang 1.11.x. |
@neolit123 yeah I rebased and fixed that in the latest push |
/lgtm |
@luxas please squash to 2 and tests appear broken. |
/retest Review the full test history for this PR. Silence the bot with an |
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.
Is this related to
#70907 ?
// configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible | ||
// on. By default, kubeadm tries to auto-detect the IP of the default interface and use that, but in case that process | ||
// fails you may set the desired value here. | ||
LocalAPIEndpoint APIEndpoint `json:"localAPIEndpoint,omitempty"` |
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.
Was the old field shipped and persisted previously? If so, what will happen if a previously serialized config file is read and the old apiEndpoint field is discarded and the new localAPIEndpoint field is empty?
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.
yep, it was shipped as part of the previous config version v1alpha3.
if an old config YAML is read and the old field is found, it should be converted to the new field.
https://github.com/kubernetes/kubernetes/pull/70761/files#diff-628349c40af3952df65127e8449c04e2R31
kubeadm 1.13 would support both v1alpha3 and v1beta1.
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 specifically meant if v1beta1 was shipped in a previous release with this field. If another version of the config was shipped, but handles conversion, that's fine
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.
yep, v1beta1 would be shipped for the first time in 1.13.
What type of PR is this?
/kind api-change
What this PR does / why we need it:
As discussed in today's SIG meeting,
LocalAPIEndpoint
makes more sense thanAPIEndpoint
which is more generic. The value is specific to the current master being initialized, and is different from ControlPlaneEndpoint which refers to the public endpoint for all API servers. This change targets the upcoming v1beta1 Config API.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 #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
@kubernetes/sig-cluster-lifecycle-pr-reviews