Support TLS Server Name overrides in kubeconfig file#82056
Support TLS Server Name overrides in kubeconfig file#82056surki wants to merge 6 commits intokubernetes:masterfrom
Conversation
|
Welcome @surki! |
|
Hi @surki. 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. DetailsInstructions 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. |
|
/assign @smarterclayton |
|
/ok-to-test |
|
/priority important-longterm |
Signed-off-by: Suresh Kumar Ponnusamy <[email protected]>
And update RecommendedClusterOverrideFlags/BindClusterFlags
467069a to
00e5e81
Compare
|
/retest |
|
@liggitt I rebased the changes to latest master, all tests are passing. |
|
Thought of a couple more issues. You can override the server name on the CLI with When overriding the server on the CLI, I would expect the server verify name to be overridden as well. This is similar to how overriding the insecure or CA settings on the CLI overrides all the trust settings (insecure/ca-file/ca-data) together: kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/client_config.go Lines 452 to 461 in 8577711 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: surki The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test pull-kubernetes-integration |
@liggitt Done |
|
@liggitt Can you PTAL? |
this will slip to 1.18. I can take a look after next week. |
|
@liggitt can you PTAL? |
| mergedClusterInfo.CertificateAuthorityData = config.overrides.ClusterInfo.CertificateAuthorityData | ||
| } | ||
|
|
||
| if config.overrides.ClusterInfo.TLSServerName != "" { |
There was a problem hiding this comment.
| if config.overrides.ClusterInfo.TLSServerName != "" { | |
| if config.overrides.ClusterInfo.TLSServerName != "" || config.overrides.ClusterInfo.Server != "" { |
since tls server name defaults to server, I would expect setting Server and TLSServerName in the overrides to be paired. for example, if I have a kubeconfig that has this:
tlsServerName: https://example.com
server: https://1.2.3.4
and I override --server https://foo.com, I would expect foo.com to be used to verify the server unless I also override --tls-server-name https://example.com
| @@ -121,6 +125,9 @@ func (o *createClusterOptions) modifyCluster(existingCluster clientcmdapi.Cluste | |||
| if o.server.Provided() { | |||
| modifiedCluster.Server = o.server.Value() | |||
There was a problem hiding this comment.
should specifying a server name clear TLSServerName, similar to how insecureSkipTLSVerify and CA interact?
|
Hello again @liggitt! |
|
closing in favor of #88769 which resolved the outstanding comments in a second commit /close |
|
@liggitt: Closed this PR. DetailsIn response to this:
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. |
Signed-off-by: Suresh Kumar Ponnusamy [email protected]
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #80596
Special notes for your reviewer:
Does this PR introduce a user-facing change?: