-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Support web console image for cluster up #17575
Support web console image for cluster up #17575
Conversation
so this also depends on https://github.com/openshift/aos-cd-jobs/pull/904/files |
please add a test (or enhance an existing test) in clusterup.sh that confirms the web console is working. |
name: openshift-web-console | ||
annotations: | ||
openshift.io/display-name: OpenShift Web Console | ||
description: The API server for the OpenShift web console. |
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.
remove "API"
4503b9d
to
a9d4110
Compare
Thanks, I added a basic test for the console. |
test/extended/clusterup.sh
Outdated
function os::test::extended::clusterup::verify_console () { | ||
os::cmd::expect_success "oc login -u system:admin" | ||
os::cmd::expect_success_and_text "oc get svc -n openshift-web-console" "webconsole" | ||
os::cmd::try_until_text "oc get endpoints webconsole -o jsonpath='{ .subsets[*].ports[?(@.name==\"https\")].port }' -n openshift-web-console" "8443" $(( 10*minute )) 1 |
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.
indenting
310a478
to
089f736
Compare
/retest |
089f736
to
f6fc7e8
Compare
I believe the cluster up tests are failing because there's no |
f6fc7e8
to
2ace611
Compare
pkg/oc/bootstrap/docker/up.go
Outdated
// for the web console | ||
consoleTemplateLocations = map[string]string{ | ||
"web console server template": "install/origin-web-console/console-template.yaml", | ||
} |
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.
any reason you didn't just put this in the "internalCurrentTemplateLocations" array?
(the comments about it only being used w/ the service catalog is requested are inaccurate, you can clean them up :) )
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 now the template is only imported on 3.9+ clusters, which is why it's in a separate map. We could always import it, though.
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.
OK I see internalCurrentTemplateLocations
only installs in 3.9. I'll update.
pkg/oc/bootstrap/docker/up.go
Outdated
@@ -1040,6 +1094,10 @@ func useAnsible(v semver.Version) bool { | |||
return v.GTE(openshiftVersion36) | |||
} | |||
|
|||
func useWebConsoleTemplate(v semver.Version) bool { | |||
return v.GTE(openshiftVersion39) |
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.
you can use v.GT(openshiftVersion37) instead to avoid introducing yet another version number constant.
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.
It's not clear to me looking at the doc if that will return true for 3.7.1?
https://godoc.org/github.com/blang/semver#Version.GT
I might need to make this greater than v3.9.0-alpha.0 to avoid the extended test failures.
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.
it should return true for 3.7.1.
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.
it should return true for 3.7.1.
Cluster up will fail if it tries to use the web console image for 3.7.1 since the image doesn't exist.
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.
ok well all the "current/previous" logic is impacted by that. so it should all be updated to check for 3.9.
test/extended/clusterup.sh
Outdated
if [ "$test" == "console" ]; then | ||
cleanup_func=$("os::test::extended::clusterup::cleanup_func" "${test}") | ||
# trap "${cleanup_func}; os::test::extended::clusterup::junit_cleanup" EXIT | ||
os::test::extended::clusterup::run_test "${test}" "--loglevel=2" |
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.
pass the --version here instead of hardcoding it in your test. that way when someone removes this special case things will "just work" the way they're supposed to.
37586fa
to
fe38017
Compare
5813b35
to
d3c9541
Compare
path: /healthz | ||
port: 8443 | ||
scheme: HTTPS | ||
nodeSelector: "${{NODE_SELECTOR}}" |
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 do double curlies do?
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.
It lets you use values that aren't strings.
https://docs.openshift.org/latest/dev_guide/templates.html#writing-parameters
When using the ${{PARAMETER_NAME}} syntax only a single parameter reference is allowed and leading/trailing characters are not permitted. The resulting value will be unquoted unless, after substitution is performed, the result is not a valid json object. If the result is not a valid json value, the resulting value will be quoted and treated as a standard string.
volumes: | ||
- name: serving-cert | ||
secret: | ||
defaultMode: 420 |
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.
Not 0440?
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.
Or 0400?
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.
Yeah, I've switched it to 0400, which works.
It looks like this was copied from the TSB template. I haven't changed that one.
Still a WIP? |
7611157
to
caba0dc
Compare
@deads2k thanks, updated |
/retest |
1 similar comment
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, spadgett The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@deads2k The e2e tests were failing because there no was console image tagged with the origin commit for cluster up. I have a PR open in aos-cd-jobs to build the image for the e2e tests like the image registry container image. I added a second commit to this PR that tags origin-web-console:latest as the origin commit, for the moment anyway. @stevekuznetsov FYI |
flake #17529 /retest |
Update the web console template based on changes in openshift/origin#17575
Update the web console template based on changes in openshift/origin#17575
/test unit |
/retest |
It looks like the cluster failed to provision in the conformance gce tests /retest |
Automatic merge from submit-queue. |
Automatic merge from submit-queue. Update web console template Update the web console template based on changes in openshift/origin#17575 /assign @sdodson @deads2k fyi
Update the web console template based on changes in openshift/origin#17575
https://trello.com/c/9oaUh8xP
Install and run the web console server from a template during cluster up. Requires the proxy from #17862 to actually use the console server.
@deads2k @jwforres