79 lines
3.5 KiB
YAML
79 lines
3.5 KiB
YAML
{{- if .Values.proxy.testnet.enabled}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "helpers.fullname" . }}-proxy
|
|
namespace: {{ include "helpers.namespace" . | quote }}
|
|
labels: {{ include "helpers.labels.testnet.proxy" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.proxy.testnet.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "helpers.proxy.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "helpers.proxy.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
serviceAccountName: proxy-sa
|
|
containers:
|
|
- name: proxy-mainnet
|
|
image: "{{ .Values.proxy.testnet.image.repository }}:{{ .Values.proxy.testnet.image.tag }}"
|
|
imagePullPolicy: {{ .Values.proxy.testnet.image.pullPolicy }}
|
|
resources:
|
|
{{- toYaml .Values.proxy.testnet.resources | nindent 12 }}
|
|
env:
|
|
- name: API_URL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: {{ include "helpers.fullname" . }}-cm
|
|
key: API_URL
|
|
- name: PROXY_TESTNET_URL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: {{ include "helpers.fullname" . }}-cm
|
|
key: PROXY_TESTNET_URL
|
|
- name: FRONT_URL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: {{ include "helpers.fullname" . }}-cm
|
|
key: FRONT_URL
|
|
{{- range $key, $val := .Values.proxy.testnet.env }}
|
|
- name: {{ $key }}
|
|
value: {{ $val | quote }}
|
|
{{- end }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 8001
|
|
protocol: TCP
|
|
{{- if .Values.proxy.testnet.livenessProbe.enabled }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: {{ .Values.proxy.testnet.livenessProbe.path }}
|
|
port: {{ .Values.proxy.testnet.livenessProbe.port }}
|
|
scheme: HTTP
|
|
initialDelaySeconds: {{ .Values.proxy.testnet.livenessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.proxy.testnet.livenessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.proxy.testnet.livenessProbe.timeoutSeconds }}
|
|
failureThreshold: {{ .Values.proxy.testnet.livenessProbe.failureThreshold }}
|
|
successThreshold: {{ .Values.proxy.testnet.livenessProbe.successThreshold }}
|
|
{{- end }}
|
|
{{- if .Values.proxy.testnet.readinessProbe.enabled }}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: {{ .Values.proxy.testnet.readinessProbe.path }}
|
|
port: {{ .Values.proxy.testnet.readinessProbe.port }}
|
|
scheme: HTTP
|
|
initialDelaySeconds: {{ .Values.proxy.testnet.readinessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.proxy.testnet.readinessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.proxy.testnet.readinessProbe.timeoutSeconds }}
|
|
failureThreshold: {{ .Values.proxy.testnet.readinessProbe.failureThreshold }}
|
|
successThreshold: {{ .Values.proxy.testnet.readinessProbe.successThreshold }}
|
|
{{- end }}
|
|
{{- if .Values.proxy.testnet.containerSecurityContext.enabled }}
|
|
securityContext: {{- omit .Values.proxy.testnet.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.proxy.testnet.podSecurityContext.enabled }}
|
|
securityContext: {{- omit .Values.proxy.testnet.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }} |