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

[bitnami/keycloak] KEYCLOAK_HOSTNAME present even if KEYCLOAK_PROXY_HEADERS is set #30368

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

RDemarneffe
Copy link

Description of the change

When the helm proxyHeaders variable is set, the KEYCLOAK_HOSTNAME into the config map should not be set.

Benefits

Improve chart to respect the keycloak documentation.

Possible drawbacks

None

Applicable issues

Checklist

  • Chart version bumped in Chart.yaml according to semver. This is not necessary when the changes only affect README.md files.
  • Variables are documented in the values.yaml and added to the README.md using readme-generator-for-helm
  • Title of the pull request follows this pattern [bitnami/<name_of_the_chart>] Descriptive title
  • All commits signed off and in agreement of Developer Certificate of Origin (DCO)

…o the config map should not be set.

Signed-off-by: Renaud Demarneffe <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
@carrodher carrodher added verify Execute verification workflow for these changes in-progress labels Nov 9, 2024
@github-actions github-actions bot removed the triage Triage is needed label Nov 9, 2024
@github-actions github-actions bot removed the request for review from javsalgar November 9, 2024 18:48
@github-actions github-actions bot requested a review from fmulero November 9, 2024 18:48
Signed-off-by: Bitnami Containers <[email protected]>
Copy link
Collaborator

@fmulero fmulero left a comment

Choose a reason for hiding this comment

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

Thanks a lot @RDemarneffe for your contribution.

I've just left a comment. Maybe I didn't understand the issue but I think the condition you set is almost the opposite. BTW Could you provide an scenario to reproduce the issue and test your changes?

bitnami/keycloak/templates/configmap-env-vars.yaml Outdated Show resolved Hide resolved
RDemarneffe and others added 3 commits November 20, 2024 09:30
# Conflicts:
#	bitnami/keycloak/CHANGELOG.md
#	bitnami/keycloak/Chart.yaml
Signed-off-by: Renaud Demarneffe <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
Copy link
Collaborator

@fmulero fmulero left a comment

Choose a reason for hiding this comment

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

Thanks a lot @RDemarneffe for your contribution!

I reproduced the issue you mentioned in #30368 and how these changes fix it. But I have a couple of doubts below, Could you give them a glance?

@@ -35,7 +35,7 @@ data:
{{- include "common.tplvalues.render" (dict "value" $path "context" $) }}
{{- end }}
{{- end }}
{{- if and .Values.ingress.enabled .Values.ingress.hostname }}
{{- if and .Values.ingress.enabled .Values.ingress.hostname (empty .Values.proxyHeaders) }}
KEYCLOAK_HOSTNAME: |-
{{ ternary "https://" "http://" ( or .Values.ingress.tls (eq .Values.proxy "edge") (not (empty .Values.proxyHeaders)) ) -}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here proxyHeaders will be always empty, so we can remove it:

Suggested change
{{ ternary "https://" "http://" ( or .Values.ingress.tls (eq .Values.proxy "edge") (not (empty .Values.proxyHeaders)) ) -}}
{{ ternary "https://" "http://" ( or .Values.ingress.tls (eq .Values.proxy "edge") ) -}}

@@ -35,7 +35,7 @@ data:
{{- include "common.tplvalues.render" (dict "value" $path "context" $) }}
{{- end }}
{{- end }}
{{- if and .Values.ingress.enabled .Values.ingress.hostname }}
{{- if and .Values.ingress.enabled .Values.ingress.hostname (empty .Values.proxyHeaders) }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it apply to KEYCLOAK_HOSTNAME_ADMIN also?

{{- if and .Values.adminIngress.enabled .Values.adminIngress.hostname }}
KEYCLOAK_HOSTNAME_ADMIN: |-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress keycloak verify Execute verification workflow for these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bitnami/keycloak] KEYCLOAK_HOSTNAME present even if KEYCLOAK_PROXY_HEADERS is set
5 participants