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/kibana] template server.publicBaseUrl in all variants #30807

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

Conversation

jplitza
Copy link
Contributor

@jplitza jplitza commented Dec 5, 2024

Description of the change

Previously, if .Values.extraConfiguration."server.publicBaseUrl" was specified (with a dot in the key), that key was inserted into the configmap twice, causing Kibana to error out.

Furthermore, since the introduction of the fallback to the ingress hostname, this setting couldn't be templated anymore (which was possible before).

This commit allows the templating as well as specifying it with the dot notation.

Benefits

Upgrades from old chart versions that specified the dotted extraConfiguration won't break the deployment.

Also, templating the publicBaseUrl is possible again.

Possible drawbacks

None.

Applicable issues

  • fixes #

Additional information

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)

Previously, if .Values.extraConfiguration."server.publicBaseUrl" was
specified (with a dot in the key), that key was inserted into the
configmap twice, causing Kibana to error out.

Furthermore, since the introduction of the fallback to the ingress
hostname, this setting couldn't be templated anymore (which was possible
before).

This commit allows the templating as well as specifying it with the dot
notation.

Signed-off-by: Jan-Philipp Litza <[email protected]>
@github-actions github-actions bot added kibana triage Triage is needed labels Dec 5, 2024
@github-actions github-actions bot requested a review from carrodher December 5, 2024 17:00
Signed-off-by: Bitnami Containers <[email protected]>
@carrodher carrodher added verify Execute verification workflow for these changes in-progress labels Dec 6, 2024
@github-actions github-actions bot removed the triage Triage is needed label Dec 6, 2024
@github-actions github-actions bot removed the request for review from carrodher December 6, 2024 08:30
@github-actions github-actions bot requested a review from gongomgra December 6, 2024 08:30
Signed-off-by: Bitnami Containers <[email protected]>
Copy link

This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution.

@github-actions github-actions bot added the stale 15 days without activity label Dec 22, 2024
Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Pull Request. Do not hesitate to reopen it later if necessary.

@bitnami-bot bitnami-bot added stale 15 days without activity and removed stale 15 days without activity labels Dec 28, 2024
@jplitza
Copy link
Contributor Author

jplitza commented Jan 9, 2025

Wow, auto-closing due to staleness over the holidays... thanks.

@carrodher @gongomgra Do you have the permissions to "reopen" this PR, as suggested? Because I don't.

@carrodher carrodher reopened this Jan 9, 2025
@github-actions github-actions bot added triage Triage is needed and removed solved labels Jan 9, 2025
@github-actions github-actions bot requested a review from carrodher January 9, 2025 15:48
Signed-off-by: Carlos Rodríguez Hernández <[email protected]>
@carrodher carrodher removed the stale 15 days without activity label Jan 9, 2025
@carrodher carrodher removed the triage Triage is needed label Jan 9, 2025
@carrodher carrodher removed their assignment Jan 9, 2025
@carrodher carrodher removed their request for review January 9, 2025 15:49
Signed-off-by: Bitnami Containers <[email protected]>
Copy link
Contributor

@gongomgra gongomgra left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! I have added a couple of comments to your changes.

bitnami/kibana/templates/configmap.yaml Outdated Show resolved Hide resolved
{{- if or .Values.configuration.server.publicBaseUrl .Values.ingress.enabled }}
server.publicBaseUrl: {{ default .Values.ingress.hostname .Values.configuration.server.publicBaseUrl }}
{{- if or .Values.configuration.server.publicBaseUrl ( get .Values.configuration "server.publicBaseUrl" ) .Values.ingress.enabled }}
server.publicBaseUrl: {{ include "common.tplvalues.render" ( dict "value" ( or .Values.configuration.server.publicBaseUrl ( get .Values.configuration "server.publicBaseUrl" ) .Values.ingress.hostname ) "context" $ ) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we should accept "server.publicBaseUrl" as a valid value. We would have to accept it (or even add it) for all other parameters in our charts. Can you provide us with more details on why do you need that format to be available? My understanding is that the format of the current values.yaml file is simple enough.

## @param configuration [object] Kibana configuration
##
configuration:
  server:
    basePath: ""
    host: "0.0.0.0"
    publicBaseUrl: ""
    rewriteBasePath: false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, this was supposed to be get .Values.extraConfiguration "server.publicBaseUrl"

I added that because before #28543, that would have been what you set. For example, this is what we had in the values.yaml of our umbrella chart (which broke when updating to 11.2.16 or later):

kibana:
  extraConfiguration:
    server.publicBaseUrl: http{{ .Values.ingress.tls | ternary "s" "" }}://{{ .Values.ingress.hostname }}

@carrodher
Copy link
Member

Thank you for initiating this pull request. We appreciate your effort. This is just a friendly reminder that signing your commits is important. Your signature certifies that you either authored the patch or have the necessary rights to contribute to the changes. You can find detailed information on how to do this in the “Sign your work” section of our contributing guidelines.

Feel free to reach out if you have any questions or need assistance with the signing process.

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

Successfully merging this pull request may close these issues.

4 participants