Skip to content

Commit ec08490

Browse files
committed
Cleanup "charts.platform.env.clients" template partial. Use one global
field for platform to shoreline external auth calls.
1 parent 4763230 commit ec08490

File tree

6 files changed

+31
-18
lines changed

6 files changed

+31
-18
lines changed

charts/tidepool/charts/data/templates/1-deployment.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ spec:
1919
app.kubernetes.io/name: {{ include "charts.name" . }}
2020
app.kubernetes.io/instance: {{ .Release.Name }}
2121
replicas: {{ .Values.deployment.replicas }}
22-
strategy: {}
2322
template:
2423
metadata:
2524
labels:

charts/tidepool/charts/glooingress/templates/2-http-internal-virtual-service.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22
{{- $internal := .Values.virtualServices.httpInternal }}
33
{{- $spec := .Values.virtualServices.http }}
44
{{- $port := $spec.port | default "80" }}
5-
{{ if or (not $spec.enabled) ($spec.redirect) }}
5+
# The reason for using a "disabled" field instead of the "enabled" field that
6+
# we conventionally use elsewhere is because by default an internal
7+
# VirtualService is created if the http VirtualService is not enabled or it has
8+
# an https redirect. This means there's no way to NOT have any VirtualService.
9+
# This way, we can disable all VirtualServices for a Release. The field name is
10+
# "disabled" just in case some service actually depends on the original logic
11+
# of an internal VirtualService being created. This is used for shadowed clusters
12+
# where no VirtualServices are needed.
13+
{{ if and (or (not $spec.enabled) ($spec.redirect)) (not $internal.disabled) }}
614
---
715
apiVersion: gateway.solo.io/v1
816
kind: VirtualService

charts/tidepool/charts/jellyfish/templates/1-deployment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ spec:
7373
name: server
7474
key: ServiceAuth
7575
- name: TIDEPOOL_AUTH_CLIENT_ADDRESS
76-
value: "shoreline:{{.Values.global.ports.shoreline}}"
76+
value: "{{ .Values.global.hostnames.shoreline }}:{{ .Values.global.ports.shoreline }}"
7777
- name: TIDEPOOL_SEAGULL_CLIENT_ADDRESS
78-
value: "seagull:{{.Values.global.ports.seagull}}"
78+
value: "{{ .Values.global.hostnames.seagull }}:{{ .Values.global.ports.seagull }}"
7979
- name: TIDEPOOL_PERMISSION_CLIENT_ADDRESS
80-
value: "gatekeeper:{{.Values.global.ports.gatekeeper}}"
80+
value: "{{ .Values.global.hostnames.gatekeeper }}:{{ .Values.global.ports.gatekeeper }}"
8181
image: "{{ .Values.deployment.image }}"
8282
securityContext:
8383
{{- .Values.podSecurityContext | toYaml | nindent 10 }}

charts/tidepool/charts/tidewhisperer/templates/1-deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,18 @@ spec:
6969
value: |
7070
{
7171
"auth": {
72-
"address": "http://auth:{{.Values.global.ports.auth}}",
72+
"address": "http://{{.Values.global.hostnames.shoreline}}:{{.Values.global.ports.shoreline}}",
7373
"userAgent": "Tidepool-TideWhisperer"
7474
},
75-
"gatekeeper": {"serviceSpec": {"type": "static", "hosts": ["http://gatekeeper:{{.Values.global.ports.gatekeeper}}"]}},
75+
"gatekeeper": {"serviceSpec": {"type": "static", "hosts": ["http://{{.Values.global.hostnames.gatekeeper}}:{{.Values.global.ports.gatekeeper}}"]}},
7676
"hakken": {
7777
"host": "hakken",
7878
"skipHakken": true
7979
},
80-
"seagull": {"serviceSpec": {"type": "static", "hosts": ["http://seagull:{{.Values.global.ports.seagull}}"]}},
80+
"seagull": {"serviceSpec": {"type": "static", "hosts": ["http://{{ .Values.global.hostnames.seagull }}:{{ .Values.global.ports.seagull }}"]}},
8181
"shoreline": {
8282
"name": "tide-whisperer",
83-
"serviceSpec": {"type": "static", "hosts": ["http://shoreline:{{.Values.global.ports.shoreline}}"]},
83+
"serviceSpec": {"type": "static", "hosts": ["http://{{ .Values.global.hostnames.shoreline }}:{{ .Values.global.ports.shoreline }}"]},
8484
"tokenRefreshInterval": "1h"
8585
}
8686
}

charts/tidepool/templates/_helpers.tpl

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,24 @@ Create environment variables used by all platform services.
5757

5858
{{ define "charts.platform.env.clients" }}
5959
- name: TIDEPOOL_AUTH_CLIENT_ADDRESS
60-
value: http://{{.Values.global.hostnames.auth}}:{{.Values.global.ports.auth}}
60+
value: "http://{{ .Values.global.hostnames.auth }}:{{ .Values.global.ports.auth }}"
6161
- name: TIDEPOOL_AUTH_CLIENT_EXTERNAL_ADDRESS
62-
value: "http://{{ include "hostname.internal" .}}"
62+
value: "http://{{ .Values.global.hostnames.shoreline }}:{{ .Values.global.ports.shoreline }}"
6363
- name: TIDEPOOL_AUTH_CLIENT_EXTERNAL_SERVER_SESSION_TOKEN_SECRET
6464
valueFrom:
6565
secretKeyRef:
6666
name: server
6767
key: ServiceAuth
68+
- name: TIDEPOOL_AUTH_CLIENT_EXTERNAL_PATH_PREFIX
69+
value: {{ .Values.global.platformExternalAuthPathPrefix | quote }}
6870
- name: TIDEPOOL_BLOB_CLIENT_ADDRESS
69-
value: http://{{.Values.global.hostnames.blob}}:{{.Values.global.ports.blob}}
71+
value: "http://{{ .Values.global.hostnames.blob }}:{{ .Values.global.ports.blob }}"
7072
- name: TIDEPOOL_DATA_CLIENT_ADDRESS
71-
value: http://{{.Values.global.hostnames.data}}:{{.Values.global.ports.data}}
73+
value: "http://{{ .Values.global.hostnames.data }}:{{ .Values.global.ports.data }}"
7274
- name: TIDEPOOL_DATA_SOURCE_CLIENT_ADDRESS
73-
value: http://{{.Values.global.hostnames.data}}:{{.Values.global.ports.data}}
75+
value: "http://{{ .Values.global.hostnames.data }}:{{ .Values.global.ports.data }}"
7476
- name: TIDEPOOL_DEVICES_CLIENT_ADDRESS
75-
value: {{.Values.global.hostnames.devices}}:{{.Values.global.ports.devices_grpc}}
77+
value: "http://{{ .Values.global.hostnames.devices }}:{{ .Values.global.ports.devices_grpc }}"
7678
- name: TIDEPOOL_DEXCOM_CLIENT_ADDRESS
7779
valueFrom:
7880
configMapKeyRef:
@@ -86,11 +88,11 @@ Create environment variables used by all platform services.
8688
- name: TIDEPOOL_METRIC_CLIENT_ADDRESS
8789
value: "http://{{ include "hostname.internal" .}}"
8890
- name: TIDEPOOL_PERMISSION_CLIENT_ADDRESS
89-
value: http://{{.Values.global.hostnames.gatekeeper}}:{{.Values.global.ports.gatekeeper}}
91+
value: "http://{{ .Values.global.hostnames.gatekeeper }}:{{ .Values.global.ports.gatekeeper }}"
9092
- name: TIDEPOOL_CONFIRMATION_CLIENT_ADDRESS
91-
value: "http://{{.Values.global.hostnames.hydrophone}}:{{.Values.global.ports.hydrophone}}"
93+
value: "http://{{ .Values.global.hostnames.hydrophone }}:{{ .Values.global.ports.hydrophone }}"
9294
- name: TIDEPOOL_TASK_CLIENT_ADDRESS
93-
value: http://{{.Values.global.hostnames.task}}:{{.Values.global.ports.task}}
95+
value: "http://{{ .Values.global.hostnames.task }}:{{ .Values.global.ports.task }}"
9496
- name: TIDEPOOL_USER_CLIENT_ADDRESS
9597
value: "http://{{ include "hostname.internal" .}}"
9698
- name: TIDEPOOL_CLINIC_CLIENT_ADDRESS

charts/tidepool/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ global:
5656
linkerdsupport:
5757
# -- whether to include linkerdsupport subchart with Linkerd service profiles
5858
enabled: true
59+
# -- for a shadowed cluster only, what URL path prefix should platform services add (if any) when calling out to shoreline
60+
platformExternalAuthPathPrefix: ''
5961
# -- service hostnames
6062
hostnames:
6163
# -- auth service hostname
@@ -76,6 +78,8 @@ global:
7678
internal: "internal"
7779
# -- metric service hostname
7880
metric: "highwater"
81+
# -- seagull service hostname
82+
seagull: "seagull"
7983
# -- shoreline service hostname
8084
shoreline: "shoreline"
8185
# -- task service hostname

0 commit comments

Comments
 (0)