-
Notifications
You must be signed in to change notification settings - Fork 127
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 remote_cluster_resources_only=true and support redirect_uris for openshift oauthclient #295
support remote_cluster_resources_only=true and support redirect_uris for openshift oauthclient #295
Conversation
…for openshift oauth client refactor the way we determine if it is an OpenShift cluster (for easier testing and maintainence)
another test is to see the OAuthClient is not created in any case when auth.strategy is not openshift: full install:
remote cluster resources only:
|
kiali-server/templates/_helpers.tpl
Outdated
{{/* | ||
Determine if on OpenShift (when debugging the chart for OpenShift use-cases, set "simulateOpenShift") | ||
*/}} | ||
{{- define "kiali-server.isOpenShift" -}} | ||
{{- if .Values.simulateOpenShift -}} | ||
true | ||
{{- else }} | ||
{{- .Capabilities.APIVersions.Has "operator.openshift.io/v1" -}} | ||
{{- end -}} | ||
{{- end }} |
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.
Instead of having another simulateOpenShift
variable, we could just make isOpenShift
(or maybe something like platform: openshift
?) a variable and we only do the .Capabilities.APIVersions.Has "operator.openshift.io/v1"
check if it's not defined?
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.
See latest commit.
There really isn't any other option for "platform" .. it's either OpenShift or it's not. So I just made it look for "isOpenShift" and only do the .Capabilities check if its not defined.
I updated the test procedures in earlier comments to now use --set isOpenShift=true"
and --set isOpenShift=false
... you can omit the --set isOpenShift=false
since this will work without having to tell "helm template" that (because the .Capabilities will always return false anyway with "helm template").
this refactor the way we determine if it is an OpenShift cluster (for easier testing and maintenance)
part of kiali/kiali#7861
To test quickly run this 4-part command:
and see that only some resources are created when remote_cluster_resources_only is true:
Notice things like the ingress/route, service, and deployment are not installed when we just want the remote cluster resources created.