Skip to content
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

Add data private deployment #300

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions charts/tidepool/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: keycloak
repository: file://../keycloak
version: 0.4.2
digest: sha256:bea169e688dc10efdcf259b8c30ee2f90e0ca6e519464bd957f9e1be0a5b8564
generated: "2024-06-25T11:24:28.447782+03:00"
version: 0.4.3
digest: sha256:9e8e11d23104da89789675b1676fe7299309fb7eeae7a22c0a2ba6ab169c3fa2
generated: "2024-11-13T11:22:02.195889+02:00"
82 changes: 82 additions & 0 deletions charts/tidepool/charts/data/templates/1-deployment-private.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: data-private
{{ include "charts.labels.standard" .}}
name: data-private
namespace: {{.Release.Namespace}}
annotations:
secret.reloader.stakater.com/reload: "server,{{ .Values.mongo.secretName }},data"
{{ if .Values.deployment.annotations }}
{{- .Values.deployment.annotations | toYaml | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
app: data-private
app.kubernetes.io/name: {{ include "charts.name" . }}-private
app.kubernetes.io/instance: {{ .Release.Name }}
replicas: {{ .Values.deployment.replicas }}
strategy: {}
template:
metadata:
labels:
app: data-private
app.kubernetes.io/name: {{ include "charts.name" . }}-private
app.kubernetes.io/instance: {{ .Release.Name }}
{{ if .Values.podAnnotations }}
annotations:
{{- .Values.podAnnotations | toYaml | nindent 8 }}
{{- end }}
spec:
initContainers:
{{ include "charts.init.shoreline" .}}
{{ if .Values.initContainers }}
{{- with .Values.initContainers }}
{{toYaml . | indent 6}}{{- end }}
{{- end }}
containers:
- env:
{{ include "charts.platform.env.mongo" .}}
{{ include "charts.platform.env.misc" .}}
{{ include "charts.platform.env.clients" .}}
{{ include "charts.kafka.common" .}}
{{ include "charts.kafka.cloudevents.client" (dict "Values" .Values "Release" .Release "client" "data") }}
- name: TIDEPOOL_DATA_SERVICE_SECRET
valueFrom:
secretKeyRef:
name: data
key: ServiceAuth
- name: TIDEPOOL_DATA_SERVICE_SERVER_ADDRESS
value: :{{ .Values.global.ports.data_private }}
- name: TIDEPOOL_DEPRECATED_DATA_STORE_DATABASE
value: data
- name: TIDEPOOL_SYNC_TASK_STORE_DATABASE
value: data
image: "{{ .Values.deployment.image }}"
securityContext:
{{- .Values.podSecurityContext | toYaml | nindent 10 }}
{{ template "charts.platform.probes" .Values.global.ports.data_private }}
name: data-private
ports:
- containerPort: {{.Values.global.ports.data_private}}
name: "http"
resources:
{{- toYaml .Values.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.securityContext | nindent 8 }}
restartPolicy: Always
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
18 changes: 18 additions & 0 deletions charts/tidepool/charts/data/templates/2-service-private.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
apiVersion: v1
kind: Service
metadata:
labels:
app: data-private
{{ include "charts.labels.standard" .}}
name: data-private
namespace: {{.Release.Namespace}}
spec:
ports:
- name: "http"
port: {{.Values.global.ports.data_private}}
targetPort: "http"
selector:
app: data-private
app.kubernetes.io/name: {{ include "charts.name" . }}-private
app.kubernetes.io/instance: {{ .Release.Name }}
12 changes: 12 additions & 0 deletions charts/tidepool/charts/data/templates/3-upstream-private.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{ if .Values.global.glooingress.enabled }}
apiVersion: gloo.solo.io/v1
kind: Upstream
metadata:
name: data-private
namespace: {{ .Release.Namespace }}
spec:
kube:
serviceName: data-private
serviceNamespace: {{ .Release.Namespace }}
servicePort: {{ .Values.global.ports.data_private }}
{{- end }}
7 changes: 5 additions & 2 deletions charts/tidepool/charts/data/templates/4-routetable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,9 @@ spec:
prefix: /v1/partners/
routeAction:
single:
upstream:
name: data
kube:
ref:
name: data-private
namespace: {{ .Release.Namespace }}
port: {{ .Values.global.ports.data_private }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/tidepool/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ global:
blob: 9225
# -- data service internal port
data: 9220
# -- data private service internal port
data_private: 9221
# -- image service internal port
image: 9226
# -- mailer service internal port
Expand Down