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

cmd/openshift-install/create: Use library-go's IngressURI helper #4245

Merged

Conversation

wking
Copy link
Member

@wking wking commented Oct 6, 2020

Using the helper from openshift/library-go#911, so we:

  • No longer hard-code https://. It's calculated based on the route's TLS config.
  • No longer assume that the available ingress host will match the route's spec.host.
  • No longer assume that the route is admitted. Now we check the ingress conditions to confirm Admitted=True.

Generated with:

$ emacs cmd/openshift-install/create.go # everything in the diff
$ go get github.com/openshift/library-go@f360b9835cc8815eccc26cb52dafe05d3cbb3e93
go: github.com/openshift/library-go f360b9835cc8815eccc26cb52dafe05d3cbb3e93 => v0.0.0-20201006230840-f360b9835cc8
go: downloading github.com/openshift/library-go v0.0.0-20201006230840-f360b9835cc8
$ go mod tidy
...
github.com/openshift/installer/cmd/openshift-install imports
github.com/openshift/client-go/config/clientset/versioned imports
k8s.io/client-go/discovery imports
github.com/googleapis/gnostic/OpenAPIv2: module github.com/googleapis/gnostic@latest found (v0.5.1), but does not contain package github.com/googleapis/gnostic/OpenAPIv2
$ emacs go.mod  # set gnostic replacement
$ go mod tidy
$ go mod vendor
$ git add -A go.* vendor

using:

$ go version
go version go1.15.2 linux/amd64

The gnostic replacement avoids the casing change that landed in google/gnostic@896953e. We'll want to drop the replacement-pin once we bump k8s.io/client-go/discovery to a version that uses the lowercased package.

@wking wking force-pushed the library-go-route-ingress-uri branch 2 times, most recently from f2f4bf1 to 6ea5e9c Compare October 7, 2020 16:09
@wking
Copy link
Member Author

wking commented Oct 7, 2020

/retest

Prow was temporarily out of GitHub tokens, but should have them back now.

vendor/modules.txt Outdated Show resolved Hide resolved
Comment on lines -452 to +454
} else if err != nil {
}
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

any specific reason to make this change from on conditions block to 2 different ones?

Copy link
Member Author

Choose a reason for hiding this comment

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

so that the existing err handling code can catch both the "list failed" and "route not admitted" failure modes.

@openshift-ci-robot
Copy link
Contributor

@wking: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-metal-ipi 6ea5e9c link /test e2e-metal-ipi
ci/prow/e2e-aws-upgrade 6ea5e9c link /test e2e-aws-upgrade
ci/prow/e2e-aws-fips 6ea5e9c link /test e2e-aws-fips
ci/prow/e2e-aws 6ea5e9c link /test e2e-aws
ci/prow/e2e-aws-workers-rhel7 6ea5e9c link /test e2e-aws-workers-rhel7
ci/prow/e2e-libvirt 6ea5e9c link /test e2e-libvirt
ci/prow/e2e-crc 6ea5e9c link /test e2e-crc
ci/prow/e2e-ovirt 6ea5e9c link /test e2e-ovirt

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 17, 2020
@abhinavdahiya
Copy link
Contributor

@wking i think you can now rebase as #4266 bumped the library-go to the latest version

@wking wking force-pushed the library-go-route-ingress-uri branch from 6ea5e9c to ad3f7cd Compare October 22, 2020 23:22
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 22, 2020
@wking
Copy link
Member Author

wking commented Oct 22, 2020

Rebased around s #4266 with 6ea5e9c -> ad3f7cd

Using the helper from [1], so we:

* No longer hard-code https://.  It's calculated based on the route's
  TLS config.
* No longer assume that the available ingress host will match the
  route's spec.host.
* No longer assume that the route is admitted.  Now we check the
  ingress conditions to confirm Admitted=True.

Generated with:

  $ emacs cmd/openshift-install/create.go # everything in the diff
  $ go mod tidy
  $ go mod vendor
  $ git add -A go.* vendor

using:

  $ go version
  go version go1.15.2 linux/amd64

[1]: openshift/library-go#911
We know the name we're looking for, so a Get should be slightly more
efficient.  The list landed with the route logic in ff53523 (add
logs at end of install for kubeadmin, consoleURL, 2018-12-06, openshift#806)
without clear motivation.  It's possible that the intention was
shielding from the console operator renaming their route, with the:

  Route found in openshift-console namespace: ...

lines pointing us at the renamed route.  But it seems unlikely that
any such renaming would happen, and if it does, we expect the
console-operator change to fail its end-to-end testing with the
installer not finding a route with the old name.
@wking wking force-pushed the library-go-route-ingress-uri branch from ad3f7cd to eb343b1 Compare November 3, 2020 00:09
@abhinavdahiya
Copy link
Contributor

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 3, 2020
Copy link
Contributor

@staebler staebler left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, staebler

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:
  • OWNERS [abhinavdahiya,staebler]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 3, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

6 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot
Copy link
Contributor

@wking: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-ovirt eb343b1 link /test e2e-ovirt
ci/prow/e2e-crc eb343b1 link /test e2e-crc

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit a6c8c1f into openshift:master Nov 4, 2020
@wking wking deleted the library-go-route-ingress-uri branch November 4, 2020 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants