-
Notifications
You must be signed in to change notification settings - Fork 344
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
Include the Log Out option when a custom menu is used #867
Conversation
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
@jkandasa would you be able to give this one a try ? Image: |
@jpkrohling I tested this operator(quay.io/jpkroehling/jaeger-operator:644-Add-Logout). I can see the jaeger operator:
CR Files used: apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
name: jaegerqe
namespace: jkandasa
spec:
strategy: allInOne
allInOne:
image: 'registry.redhat.io/distributed-tracing/jaeger-all-in-one-rhel7:1.13'
options:
log-level: debug
query:
base-path: /jaeger
ui:
options:
dependencies:
menuEnabled: false
tracking:
gaID: UA-000000-2
menu:
- label: About Jaeger
items:
- label: Documentation
url: 'https://www.jaegertracing.io/docs/latest'
storage:
options:
memory:
max-traces: 100000 When I add the option (security: none) on CR, Log Out options is not displayed.
|
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.
LGTM
@pavolloffay would you be able to review this one? |
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.
LGTM.
I haven't tested if it works.
json.Unmarshal([]byte(menuStr), &menuArray) | ||
logout := map[string]interface{}{ | ||
"label": "Log Out", | ||
"url": "/oauth/sign_in", |
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.
sign_in
for log out?
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.
Yes :)
|
||
// SkipLogout tells the operator to not automatically add a "Log Out" menu option to the custom Jaeger configuration | ||
// +optional | ||
SkipLogout *bool `json:"skipLogout,omitempty"` |
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.
does it need to be a pointer? We probably want the default to be false.
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.
For all new properties, we probably want a tri-state value: nil
(not set), true
, false
. This way, the property doesn't get persisted as part of the CR, and we can have different defaults depending on the platform.
As @jkandasa tested that it works as intended, I'm merging this. |
Closes #644 by automatically adding a "Log Out" option when one seems to be missing. Note that this is only relevant when the OAuth Proxy is being used, which is currently the case only for OpenShift deployments.
Signed-off-by: Juraci Paixão Kröhling [email protected]