Skip to content
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

normalize server url before writing to config #12591

Conversation

juanvallejo
Copy link
Contributor

Related bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1393943

This patch updates $ openshift admin create-api-client-config command to normalize the specified server url before creating the client kubeconfig.

cc @openshift/cli-review

@fabianofranz
Copy link
Member

[test]

Copy link
Contributor

@enj enj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overwrite.

clusters := make(map[string]*clientcmdapi.Cluster)
clusters[clusterNick] = &clientcmdapi.Cluster{
Server: o.APIServerURL,
Server: serverNormalized,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better approach would be to overwrite o.APIServerURL so that the code below sees the new value.

@juanvallejo juanvallejo force-pushed the jvallejo/normalize-config-master-url branch from e6c1458 to 88f2338 Compare January 23, 2017 19:15
@juanvallejo
Copy link
Contributor Author

@enj thanks, review comment addressed

@juanvallejo
Copy link
Contributor Author

integration check flaked on #12558 re[test]

@fabianofranz
Copy link
Member

LGTM, @juanvallejo squash into one?

@juanvallejo juanvallejo force-pushed the jvallejo/normalize-config-master-url branch from 88f2338 to 83fbdc8 Compare January 24, 2017 14:38
@juanvallejo
Copy link
Contributor Author

@fabianofranz thanks, done!

@fabianofranz
Copy link
Member

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 83fbdc8

@juanvallejo
Copy link
Contributor Author

conformance check flaked on #10773 re[test]

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 83fbdc8

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13250/) (Base Commit: c5868ac)

@openshift-bot
Copy link
Contributor

openshift-bot commented Jan 25, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13281/) (Base Commit: c82fb7d) (Image: devenv-rhel7_5770)

@openshift-bot openshift-bot merged commit dced7f7 into openshift:master Jan 25, 2017
@juanvallejo juanvallejo deleted the jvallejo/normalize-config-master-url branch January 25, 2017 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants