Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/sonarqube] allow overriding app fullname #20561

Closed
wants to merge 2 commits into from

Conversation

usmonster
Copy link
Contributor

Is this a new chart

No.

What this PR does / why we need it:

Allows to override the fullname used in various places. Today, a helper template function determines the format of the name, and it can't be overridden. This is inconvenient and unwanted in many cases (e.g. when tooling maps the app name to a hostname—I want sonarqube.example.org, but today I can only get sonarqube-sonarqube.example.org). It's generally better to allow the fullname to be explicitly overridden if so desired.

Special notes for your reviewer:

This has a similar, but subtly different effect as adding the nameOverride value. I hesitated to instead implement behavior that would reuse name as the fullname (e.g. introduce a useNameAsFullname boolean value), but I decided on an approach that allows these values to be overridden independently.

Also, since the nameOverride is already undocumented (I assume intentionally?), I likewise opted to leave this new value undocumented.

Checklist

  • DCO signed
  • Chart Version bumped
  • Variables are documented in the README.md
  • Title of the PR starts with chart name (e.g. [stable/mychartname])

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: usmonster
To complete the pull request process, please assign rjkernick
You can assign the PR to them by writing /assign @rjkernick in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@helm-bot helm-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 5, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @usmonster. Thanks for your PR.

I'm waiting for a helm member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 5, 2020
Signed-off-by: Usman Akeju <akeju00+github@gmail.com>
@helm-bot helm-bot added the Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). label Feb 5, 2020
@usmonster
Copy link
Contributor Author

/assign @rjkernick

{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- if .Values.fullnameOverride -}}
{{- printf "%s" .Values.fullnameOverride | trunc 63 -}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess I could get rid of the printf here...

@rjkernick
Copy link
Collaborator

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 12, 2020
Signed-off-by: Usman Akeju <akeju00+github@gmail.com>
@usmonster
Copy link
Contributor Author

Ping @rjkernick for lgtm/approval 🙏

@davidkarlsen
Copy link
Member

This chart has been deprecated and moved: #21007

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). ok-to-test size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants