k8s-manifests/rds/base/charts/layer1_port_reva/templates/deployment.yaml

67 lines
2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "layer1_port_reva.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{ include "layer1_port_reva.labels" . | indent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{ include "layer1_port_reva.labels" . | indent 6 }}
template:
metadata:
labels:
{{ include "layer1_port_reva.labels" . | indent 8 }}
spec:
initContainers:
- name: init-tokenstorage
image: busybox:1.28
command: ['sh', '-c', "until nslookup layer3-token-storage.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for layer3-token-storage; sleep 2; done"]
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: {{ template "layer1_port_reva.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- configMapRef:
name: mservice
- configMapRef:
name: proxy
- configMapRef:
name: globalenvvar
- configMapRef:
name: portrevaconfig
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /metrics
port: http
periodSeconds: 10
readinessProbe:
httpGet:
path: /metrics
port: http
periodSeconds: 10
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}