-
Notifications
You must be signed in to change notification settings - Fork 60
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
prefect-server helm chart enhancement to support multi-port service #318
prefect-server helm chart enhancement to support multi-port service #318
Conversation
Hi @baisystems, thanks for the PR! Is there a reason we can't accomplish this functionality by allowing for |
Hi @jamiezieziula, there is no
If this is the case, my answer is Your proposal also agree well with your current helm chart pattern I actually like your idea and can tailor my pr to implement the The second feature of this PR is its introduction of a new field |
@baisystems thanks for the feedback! I look forward to reviewing your changes :) I like the idea of the customizability of the ingress service port! |
@jamiezieziula I pushed a new commit which implemented the |
@@ -26,6 +26,7 @@ spec: | |||
{{- if eq .Values.service.type "NodePort" }} | |||
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }} | |||
{{- end }} | |||
{{- $serviceType := .Values.service.type }} |
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.
I don't think this is neccessary?
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.
I need to define this variable to hold the value of serviceType. The variable is used inside the loop of {{- range .Values.service.extraPorts }}
to set nodePort. While inside the loop, it can't access the .Values.service.type due to context being changed. Is there better way to handle this situation?
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.
ah i see - yes i think this makes sense!
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.
You should be able to access the value with $.Values.service.type
(notice the $.
instead of just .
).
There's an example at the bottom of https://helm.sh/docs/chart_template_guide/variables.
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.
@mitchnielsen Thank you for the tip. It works. $ - this variable will always point to the root context. Great to learn this.
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.
A few minor comments - thanks!
@jamiezieziula I pushed a new commit which default the extraPorts value to []. Any other issue for this pr? |
@baisystems - can you install precommit and run it? linters are failing. |
@jamiezieziula I pushed a new commit. All the lint errors are fixed and the build is now passed. Could you please take another look? |
Hi @baisystems - thanks! All linting looks healthy now. Sorry to do this, but one last thing - see @mitchnielsen's comment above. |
@jamiezieziula I tested @mitchnielsen's suggestion, helm install succeed with it. I will push an update commit soon. |
@jamiezieziula I pushed a new commit, the 5th. Please review again. |
prefect-server helm chart enhancement to support multi-port service.
closes #314