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

68 lines
1.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "layer2_port_service.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{ include "layer2_port_service.labels" . | indent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{ include "layer2_port_service.labels" . | indent 6 }}
template:
metadata:
labels:
{{ include "layer2_port_service.labels" . | indent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: {{ template "layer2_port_service.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- configMapRef:
name: mservice
- configMapRef:
name: proxy
- configMapRef:
name: globalenvvar
- configMapRef:
name: serviceportconfig
{{- if .Values.environment.TOKENSERVICE_STATE_SECRET }}
env:
- name: TOKENSERVICE_STATE_SECRET
value: {{ .Values.environment.TOKENSERVICE_STATE_SECRET }}
{{- end }}
ports:
- name: http
containerPort: 8080
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 }}