-
Notifications
You must be signed in to change notification settings - Fork 150
Custom brand revisions #245
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
Custom brand revisions #245
Conversation
Signed-off-by: Monis Khan <mkhan@redhat.com>
092020c to
084260c
Compare
enj
left a comment
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.
Non-comprehensive half asleep review.
jhadvig
left a comment
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.
A lot of work done, nice !
Adding a few comments to start the merge process 😄
Noticed that the new TestOperatorConfigCustomization is failing.
=== RUN TestOperatorConfigCustomization
--- FAIL: TestOperatorConfigCustomization (40.22s)
brand_customization_test.go:153: productName: test-e2e-product-name, logo: /var/logo/pic.jpg
brand_customization_test.go:91: error: customization values not on deployment, timed out waiting for the condition
4b723ed to
1e9744b
Compare
|
The following cases show how the
customization:
customLogoFile:
key: fake-logo.png
# no name providedrenders out the following conditions, conditions:
- lastTransitionTime: "2019-06-19T20:50:33Z"
status: "False"
type: ResourceSyncControllerDegraded
- lastTransitionTime: "2019-06-19T20:50:33Z"
reason: NoUnsupportedConfigOverrides
status: "True"
type: UnsupportedConfigOverridesUpgradeable
- lastTransitionTime: "2019-06-21T15:46:09Z"
message: custom logo file name and key must both be set
reason: SynchronizationError
status: "True"
type: Degraded
- lastTransitionTime: "2019-06-21T15:45:56Z"
message: custom logo file name and key must both be set
reason: SynchronizationError
status: "True"
type: Progressing
- lastTransitionTime: "2019-06-20T18:42:09Z"
message: 2 replicas ready at version 0.0.1-snapshot
status: "True"
type: Available
customization:
customLogoFile:
# no key provided
name: fake-logorenders the following conditions, status:
conditions:
- lastTransitionTime: "2019-06-19T20:50:33Z"
status: "False"
type: ResourceSyncControllerDegraded
- lastTransitionTime: "2019-06-19T20:50:33Z"
reason: NoUnsupportedConfigOverrides
status: "True"
type: UnsupportedConfigOverridesUpgradeable
- lastTransitionTime: "2019-06-21T15:48:13Z"
message: custom logo file name and key must both be set
reason: SynchronizationError
status: "True"
type: Degraded
- lastTransitionTime: "2019-06-21T15:45:56Z"
message: custom logo file name and key must both be set
reason: SynchronizationError
status: "True"
type: Progressing
- lastTransitionTime: "2019-06-20T18:42:09Z"
message: 2 replicas ready at version 0.0.1-snapshot
status: "True"
type: Availableproviding valid config, but without creating a configmap: # valid, but fake-logo configmap does not yet exist
customization:
customLogoFile:
name: fake-logo
key: fake-logo.pngrenders the following conditions, but status:
conditions:
- lastTransitionTime: "2019-06-19T20:50:33Z"
status: "False"
type: ResourceSyncControllerDegraded
- lastTransitionTime: "2019-06-19T20:50:33Z"
reason: NoUnsupportedConfigOverrides
status: "True"
type: UnsupportedConfigOverridesUpgradeable
- lastTransitionTime: "2019-06-21T15:51:13Z"
message: custom logo file fake-logo not found
reason: SynchronizationError
status: "True"
type: Degraded
- lastTransitionTime: "2019-06-21T15:45:56Z"
message: custom logo file fake-logo not found
reason: SynchronizationError
status: "True"
type: Progressing
- lastTransitionTime: "2019-06-20T18:42:09Z"
message: 2 replicas ready at version 0.0.1-snapshot
status: "True"
type: Availablelog error in this case is Providing the following and creating customization:
customProductName: Muh Clusta
customLogoFile:
name: fake-logo
key: fake-logo.pngyields the following, status:
conditions:
- lastTransitionTime: "2019-06-19T20:50:33Z"
status: "False"
type: ResourceSyncControllerDegraded
- lastTransitionTime: "2019-06-19T20:50:33Z"
reason: NoUnsupportedConfigOverrides
status: "True"
type: UnsupportedConfigOverridesUpgradeable
- lastTransitionTime: "2019-06-21T15:53:10Z"
status: "False"
type: Degraded
- lastTransitionTime: "2019-06-21T15:45:56Z"
message: Working toward version 0.0.1-snapshot
reason: SyncLoopProgressing
status: "True"
type: Progressing
- lastTransitionTime: "2019-06-20T18:42:09Z"
message: 2 replicas ready
status: "True"
type: Available
|
29e091f to
f80d913
Compare
944bdc5 to
f45852a
Compare
f45852a to
bd36557
Compare
|
/retest |
|
probably a flake /retest |
jhadvig
left a comment
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.
Just couple of small nits, that can be addressed afterwards :)
|
/lgtm |
dont error out immediately when console-config not updated
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: benjaminapetersen, jhadvig 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. |
|
/retest |
clientwrappermagic by @enjFeature:
Custom Product NameandCustom Logoto be displayed in the console via operator configuration.Requires additional RBAC to run:
oc scale deployment cluster-version-operator --replicas 0 --namespace openshift-cluster-versiondocker build -t quay.io/<you>/console-operator:latest .docker push quay.io/<you>/console-operator:latestoc apply -f manifests/04-rbac-rolebinding.yamloc apply -f manifests/03-rbac-role-ns-openshift-config.yaml- "-v=4"or higher recommended for logging)To use:
ConfigMapwith a logo image in theopenshift-confignamespace.If an image is needed, this fits the approximate dimensions:
oc create configmap my-custom-logo-file --from-file ~/Desktop/my-logo.pngExpected function:
openshift-configfor configmap changes, but does nothing with observed configmaps unless specified via the operator config.customLogoFile.nameexists in the operator config, the resource syncer will sync this configmap intoopenshift-consoleas a new configmap calledcustom-logo.custom-logoconfigmap appears in theopenshift-consolenamespace and will trigger a sync ofconsoleresources, which will cause a rollout of thedeploymentwith the logo file mounted via a volume mount./assign @jhadvig
@spadgett fyi