-
Notifications
You must be signed in to change notification settings - Fork 59
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
[fix] add configurable port names for istio compatibility #154
Conversation
3be31ab
to
e75527f
Compare
{{ else }} | ||
name: {{ template "retool.name" . }} |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
line 346 is the fallback if .Values.workflows.worker.portName
is not set, so we should be good here?
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 mean like you do above - the conditional L343-L347 becomes one line
name: {{ .Values.workflows.worker.portName | default (template "retool.name" .) }}
LGTM
|
- protocol: TCP | ||
port: 9090 | ||
targetPort: metrics | ||
name: metrics |
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.
unused, no need to expose this.
8411bf1
to
e7ed494
Compare
{{ if .Values.codeExecutor.portName }} | ||
name: {{ .Values.codeExecutor.portName }} | ||
{{ else }} | ||
name: {{ template "retool.name" . }} | ||
- protocol: TCP | ||
port: 9090 | ||
targetPort: metrics | ||
name: metrics | ||
{{ end }} |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
{{ if .Values.codeExecutor.portName }} | ||
name: {{ .Values.codeExecutor.portName }} | ||
{{ else }} | ||
name: {{ template "retool.name" . }} | ||
protocol: TCP | ||
- containerPort: 9090 | ||
name: metrics | ||
{{ end }} |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
LGTM, the defaulting comments are not necessary but I think you could collapse the conditionals down |
The if/else is giving that default - but I ran into an issue using default with "template"... e.g. this wasn't working:
neither this
lmk if you have a different suggestion @alexlo03 ! thanks for review. |
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 haven't looked through the whole chart in this branch, but do we want to use these new port names for the corresponding Service resources? i.e. https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports. I believe a Service can be associated with a port either via port number or port name, so we don't have to, but we'd have the option now with this change. Not a big deal to skip tho.
charts/retool/values.yaml
Outdated
@@ -329,12 +329,15 @@ workflows: | |||
# Scaling this number will increase the number of workflow workers, e.g. a replicaCount of 4 | |||
# will launch 9 pods -- 1 workflow backend, 4 workflow workers, and 4 for temporal cluster | |||
replicaCount: 1 | |||
# portName: custom-port-name, e.g. http-workflows-worker; defaults to "retool.name" | |||
# metricsPortName: custom-port-name, e.g. http-workflow-worker-metrics; defaults to "metrics" |
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.
For all the defaults in our values.yaml, I think it would make sense to just pick a default port name and possibly just drop the template "retool.name" .
and | default "metrics"
dynamic fallbacks. The defaults can be static (i.e. no point to using template "retool.name"
anyway) and we can even just use the istio naming convention for them. This would remove the need for those conditionals in templates and just simplify a bit. Adding port names is a non-breaking change anyway I am pretty sure, so extremely low risk.
oh I didn't notice this comment before, but that's because |
Ah thanks @ryanartecona - will address all of it w/your feedback today! 🙏 |
gentle ping. would like to see this in before we upgrade charts. thanks 🙏 |
Closing in favor of #170 |
Addresses #144, alternate to #151
Addresses: #155, alternate to #156
(also fixes #155)