-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add _tplvalues.tpl and define commonLabels, podLabels, commonAnnotations and podAnnotations attributes #6638
Add _tplvalues.tpl and define commonLabels, podLabels, commonAnnotations and podAnnotations attributes #6638
Conversation
Could you provide a little more background behind this? |
Today, it's not possible to provide common information to all resources deployed by the chart. It's really usefull to be able to do that for monitoring for example. While I integrate those new information (commonLabels, podLabels, commonAnnotations and podAnnotations) seems to be really interesting to use the bitnami common chart as subchart to avoid adding complexity on the concerned chart. If we integrate basically those new information on templates with : {{- toYaml .Values.commonLabels | nindent 4 }} it's always impossible to use a multistring to set information : commonLabels:
label1: value1
label2: value2 is working, but commonLabels: |
"
label1: value1
label2: value2
" not working with the templating from bitnami {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} both possibilites are working. And the second solution is really usefull to simplify deployment with argocd |
I don't think that this is a good place for external dependencies too. |
We are usually quite hesitant to add dependencies of third-party software that is not part of the k8s core (especially when it comes to deployment). We are only providing a helm chart because it is basically the main alternative to deploying apps in K8S. That's why we are not providing i.e. any example reverse-proxy configurations. There are just too many options and we'd rather force users to configure everything on their own without influencing their selection of third-party software. |
I was hesitating before answering. I personally use (Thanks a lot for the files reformatting) |
Yes currently I simply use _tplvalues and we can imagine simply add this template to the chart. In my sense, I consider it's interesting to add the dependency to the common to avoid a rewrite of existing template and to let the possibility for future to use others powerfull objects of the dependency. |
It would be easy to add this dependency if there are other significant needs later, from now on I think the template integration directly in the chart would be simpler to manage. |
|
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. I understand the commands that are listed here. |
|
Add dependency and update values add _tplvalues and remove dependencies
3454bd1
to
a93ce84
Compare
@desaintmartin change are done, can you review |
@@ -79,6 +84,6 @@ spec: | |||
{{- end -}} | |||
{{- if .Values.ingress.tls }} | |||
tls: | |||
{{ toYaml .Values.ingress.tls | indent 4 }} | |||
{{ toYaml .Values.ingress.tls | nindent 4 }} |
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.
hehe this could have been indented as well, but honestly thanks for the work so far in streamlining good usage of newlines.
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.
with pleasure :)
Could a member trigger the CI, please? |
Oh, by the way, @ecthelion77, could you update PR name and description to refer to actual content? |
done :) |
up |
@floreks @maciaszczykm Could one of you trigger CI? |
Codecov Report
@@ Coverage Diff @@
## master #6638 +/- ##
=======================================
Coverage 42.08% 42.08%
=======================================
Files 44 44
Lines 1226 1226
Branches 161 161
=======================================
Hits 516 516
Misses 710 710 |
bump version to 5.0.5
@desaintmartin can you review again please, the chart version was bumped during waiting for worflow approval so i bumped again to version 5.0.5 |
up |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: desaintmartin, ecthelion77 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This change allows to use this helm chart with argocd for example and use multistring labels and annotations with the standardized way from bitnami