-
Notifications
You must be signed in to change notification settings - Fork 431
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
Allow API server LB frontend port to be configured #1207
Closed
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What is still not 100% clear to me is the relationship between Cluster.Spec.ControlPlaneEndpoint and AzureCluster.Spec.ControlPlaneEndpoint
We set AzureCluster.Spec.ControlPlaneEndpoint in the AzureCluster controller here (to follow the CAPI provider contract): https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/master/controllers/azurecluster_controller.go#L256-L260
I had opened a discussion in CAPI a while back about moving it to Status since it's basically being used as status right now (and any user value will be overridden) kubernetes-sigs/cluster-api#3715
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.
in the CAPI cluster_controller,
Cluster.Spec.ControlPlaneEndpoint
is set to the value ofAzureCluster.Spec.ControlPlaneEndpoint
https://github.com/kubernetes-sigs/cluster-api/blob/master/controllers/cluster_controller_phases.go#L184There 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.
Hmm... I didn't realize to think from this perspective.
My original use case for this change was to provide migration compatibility when converting existing Kubernetes cluster (Giant Swarm flavor in this case) into one managed by CAPZ. The cluster is already reconciled by v1alpha3 CAPI + CAPZ CRs and there's DNS zone managed for the workload cluster.
I was also viewing the
Cluster
CR as main spec for provider independent workload cluster configuration since it also has several important network configuration fields (e.g. Service and POD CIDRs as well as API server listen port).Now I see that my understanding / interpretation on that is slightly off from the present implementation and interoperability between different controllers.
Do you think this change would still make sense in CAPZ?
As far as I was able to reason & test, this change should be fully compatible with present state, but I do understand that there's the corner case that one might not be able to configure just port because the host must be set as well and something needs to manage that. I'm not sure if that can be fixed in any way right now.
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.
Right, that's why it's confusing. I think it's a bug that providers don't honor that field, that's why I opened kubernetes-sigs/cluster-api#3715.
I think as long as it has no effect on current behaviors for those who don't set the port & for existing clusters that have the default port, it should be ok to make this change to unblock your use case. However in that case we should remove the user facing documentation since it's not really a configuration option, but more of a workaround. Also let's make sure there are solid comments in the code so we know exactly why this was done and what the expected bahavior is when we look at this code again 6 months from now.
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.
Sorry for long delays, we have been recently working on different areas so this was not high priority. Because of this controversial nature of this feature and the fact that we don't urgently need this right now, I'll take more time to consider this. I'll get back to this later. Thanks for your patience 🙂