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

66 lines
1.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "layer3_token_storage.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{ include "layer3_token_storage.labels" . | indent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{ include "layer3_token_storage.labels" . | indent 6 }}
template:
metadata:
labels:
{{ include "layer3_token_storage.labels" . | indent 8 }}
spec:
initContainers:
- name: deploy
image: redis
command: [ "sh" ]
args: [ "-c", 'while [ "$(redis-cli -h $REDIS_PORT_6379_TCP_ADDR ping)" != "PONG" ]; do sleep 2; done' ]
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: {{ template "layer3_token_storage.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- configMapRef:
name: proxy
- configMapRef:
name: globalenvvar
- configMapRef:
name: layer3tokenconfig
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 }}