-
Notifications
You must be signed in to change notification settings - Fork 66
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
improve custom template handling #48
Conversation
Hi, I could find any problem in the current implementation. How are you customizing the template (what you configure and where) and what were you expecting as a result? |
Hi, for me neither of the following As for the actual changes to the haproxy template i do the following
|
Hi, regarding the template I can successfully change it with these two changes:
I think that these two changes would be benefit for the functionality:
Other than that, regarding the issues you're trying to fix:
|
Hi, thank you for all the details, i'm going to do a few tests with helm and the insight you gave me Regarding the suggestions
|
@jcmoraisjr i made some tests and i agree with your proposed solution
However i'd still change |
This cannot be changed due to backward compatibility, but there isn't any problem to create another key with a distinct behavior, maybe a |
pushed a commit that includes this new key and keeps backwards compatibility, let me know if that works for you |
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.
thanks! here are a few update suggestions.
haproxy-ingress/README.md
Outdated
@@ -109,6 +109,7 @@ Parameter | Description | Default | |||
`controller.extraContainers` | extra containers that to the haproxy-ingress-controller | `[]` | |||
`controller.initContainers` | extra containers that can initialize the haproxy-ingress-controller | `[]` | |||
`controller.template` | custom template for haproxy-ingress-controller | `{}` | |||
`controller.templateFile` | custom haproxy template path for haproxy-ingress-controller | `{}` |
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 in the last column
@@ -1,4 +1,4 @@ | |||
{{- if .Values.controller.template -}} | |||
{{- if or .Values.controller.template .Values.controller.templateFile -}} |
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.
missing this same logic in the _podtemplate.yaml
, look for controller.template
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.
indeed, added
{{ .Values.controller.template | indent 4 }} | ||
{{/* .Files.Get "haproxy.tmpl" | indent 4 */}} | ||
{{- 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.
these trimleft configs broke the yaml parser, here is a config suggestion that worked for me:
haproxy.tmpl: |
{{- if .Values.controller.templateFile }}
{{- .Files.Get .Values.controller.templateFile | nindent 4 }}
{{- else }}
{{- .Values.controller.template | nindent 4 }}
{{- 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.
fixed
Lgtm thanks! Merging now. |
Add a new `templateFile` option that references a file instead of copy/pasting the template into the values chart.
Add a new
templateFile
option that references a file instead of copy/pasting the template into the values chart.