-
Notifications
You must be signed in to change notification settings - Fork 85
Description
Summary
Define the onepassword-connect.url
and resulting OP_CONNECT_HOST
environment variable for Operator deployments via .Values.operator.connect-url
.
The current method is not very clear; for example, the Operator should not need to set .Values.connect.tls.enabled: true
if Connect is disabled.
Use cases
For standalone Operator deployments that use Connect, setting the environment variable OP_CONNECT_HOST
via its own operator value is more clear and standardized. Setups with multiple operators and a single Connect instance could benefit from this change; or any situation where an Operator is being deployed outside of the same Kubernetes namespace as Connect.
In addition, the current https://<host>:<port>
setting might not apply to every instance, when using ports 80 or 443 :<port>
is unnecessary.
Proposed solution
_helpers.tpl
{{- define "onepassword-connect.url" -}}
{{- if .Values.operator.connect-url }}
{{ .Values.operator.connect-url }}
{{- else if .Values.connect.tls.enabled }}
https://{{ .Values.connect.host }}:{{ .Values.connect.api.httpsPort }}
{{- else }}
http://{{ .Values.connect.host }}:{{ .Values.connect.api.httpPort }}
{{- end }}
{{- end }}
This would also require an addition in the values.yaml
, possibly the health-check.yml
.
Is there a workaround to accomplish this today?
Set: .Values.connect.host
to set the OP_CONNECT_HOST variable for the Operator deployment.
If using HTTPS or an alternate port .Values.connect.tls.enabled
and .Values.connect.api.httpsPort
are also required.
References & Prior Work
N/A