Change the method to get the ApiServer hostname #855
Change the method to get the ApiServer hostname #855openshift-merge-robot merged 2 commits intoopenshift:masterfrom
Conversation
Change the method to get the ApiServer hostname
|
Hi @garbagego. Thanks for your PR. I'm waiting for a openshift 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. |
| hostname = strings.Replace(hostname, "https://", "", 1) | ||
| hostname = hostname[0:strings.LastIndex(hostname, ":")] | ||
| hostname_arr := strings.Split(hostname, ":") | ||
| hostname = hostname_arr[0] |
There was a problem hiding this comment.
docs say:
// apiServerURL is a valid URI with scheme(http/https), address and
// port. apiServerURL can be used by components like the web console
// to tell users where to find the Kubernetes API.
APIServerURL string `json:"apiServerURL"`
I.e. we are supposed to always have a port. This merely looks like missing validation.
There was a problem hiding this comment.
@sttts yes based on Doc it seems missing validation. But why we need to provide port if we are using https scheme with default port 443 ? Is there any dependency or constraints which is forcing to provide ports ?
There was a problem hiding this comment.
Am fine with this fix here. But I would like to see a counterpart PR fixing the API doc before merging this.
There was a problem hiding this comment.
@sttts Thanks
Is this the right doc line which needs to modify?
openshift/api#646
There was a problem hiding this comment.
yes, file is right. Left a comment.
|
Tagged openshift/api#646. Please bump the dependencies when it has merged. |
|
/test |
|
@garbagego: Cannot trigger testing until a trusted user reviews the PR and leaves an 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. |
|
/lgtm |
|
/ok-to-test |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: garbagego, sttts The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
The kube-apiserver operator is going to degraded state while changing ApiServer URL in Infrastructure config.
Note: If there is no port specified
Ref:
https://github.com/openshift/cluster-kube-apiserver-operator/blob/master/pkg/operator/certrotationcontroller/externalloadbalancer.go#L24
I0511 16:20:50.553418 1 servicehostname.go:40] syncing servicenetwork hostnames: [172.30.0.1 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local openshift openshift.default openshift.default.svc openshift.default.svc.cluster.local]
I0511 16:20:50.553446 1 panic.go:679] Finished waiting for CertRotation
I0511 16:20:50.553456 1 panic.go:679] Shutting down CertRotation
panic: runtime error: slice bounds out of range [:-1]
goroutine 271 [running]:
github.com/openshift/cluster-kube-apiserver-operator/pkg/operator/certrotationcontroller.(*CertRotationController).syncExternalLoadBalancerHostnames(0xc000a980a0, 0x0, 0x0)
github.com/openshift/cluster-kube-apiserver-operator@/pkg/operator/certrotationcontroller/externalloadbalancer.go:24 +0x295