-
Notifications
You must be signed in to change notification settings - Fork 910
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
feat/configurable ports #5540
base: master
Are you sure you want to change the base?
feat/configurable ports #5540
Changes from 4 commits
00b79f5
ded0a47
089f7a9
3636a4f
8a7db1f
9e66345
fb52530
73d8f65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,14 +130,14 @@ spec: | |
port: readyz | ||
ports: | ||
- name: readyz | ||
containerPort: 8081 | ||
containerPort: {{ .Values.readiness.port | default "8081" }} | ||
{{- if .Values.metrics.enabled }} | ||
- name: metrics | ||
containerPort: 8080 | ||
containerPort: {{ .Values.metrics.port | default "8080" }} | ||
{{- end }} | ||
{{- if .Values.webhooks.enabled }} | ||
- name: webhooks | ||
containerPort: 9443 | ||
containerPort: {{ .Values.webhooks.port | default "9443" }} | ||
{{- end }} | ||
{{- with .Values.securityContextCrossplane }} | ||
securityContext: | ||
|
@@ -174,6 +174,22 @@ spec: | |
- name: "WEBHOOK_ENABLED" | ||
value: "false" | ||
{{- end }} | ||
{{- if and .Values.webhooks.enabled .Values.webhooks.port }} | ||
- name: "WEBHOOK_PORT" | ||
value: "{{ .Values.webhooks.port }}" | ||
{{- end}} | ||
{{- if and .Values.webhooks.enabled .Values.webhooks.port }} | ||
- name: "WEBHOOK_PORT" | ||
value: "{{ .Values.webhooks.port }}" | ||
{{- end}} | ||
{{- if and .Values.metrics.enabled .Values.metrics.port }} | ||
- name: "METRICS_BIND_ADDRESS" | ||
value: ":{{ .Values.metrics.port }}" | ||
{{- end}} | ||
{{- if .Values.readiness.port }} | ||
- name: "HealthProbeBindAddress" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. HEALTH_PROBE_BIND_ADDRESS to match the env defined in command struct below ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed it, thanks |
||
value: ":{{ .Values.readiness.port }}" | ||
{{- end}} | ||
- name: "TLS_SERVER_SECRET_NAME" | ||
value: crossplane-tls-server | ||
- name: "TLS_SERVER_CERTS_DIR" | ||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -20,6 +20,6 @@ spec: | |||
release: {{ .Release.Name }} | ||||
ports: | ||||
- protocol: TCP | ||||
port: 9443 | ||||
targetPort: 9443 | ||||
port: {{ .Values.webhooks.port | default "9443" }} | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the webhook Service port here itself, can remain the same 9443, without the need for it to be configurable right ? Changing the Service port (which IMO unnecessary) would require changes in other places like
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right @ravilr, I didn't think about this before, but the service port can remain the same. I will refactor this again, but I need your input on this, as the override makes it a bit awkward:
Would you prefer
I'm unsure which one is actually less surprising when reading the code. I think I'm leaning towards the second one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The chart now hard-codes 9443 as the service port and an override was added to ensure the port is always 9443. Test case was adjusted accordingly |
||||
targetPort: {{ .Values.webhooks.port | default "9443" }} | ||||
{{- 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.
this looks repeat of above ?
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.
Thank you, removed the duplicate