Select Git revision
api-deployment.yaml

Elise SOUVANNAVONG authored
api-deployment.yaml 2.08 KiB
{{- if .Values.api.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{.Values.name }}-api
labels:
app: api
spec:
replicas: {{ .Values.api.replicaCount }}
selector:
matchLabels:
app: api
template:
metadata:
labels:
app: api
spec:
securityContext:
runAsUser: 1001
runAsGroup: 1001
imagePullSecrets:
- name: takima-school-registry
containers:
- name: api
image: {{ .Values.api.image.repository }}:{{ .Values.api.image.tag }}
resources:
requests:
memory: "192M"
cpu: "0.2"
limits:
memory: "256M"
cpu: "1"
startupProbe:
httpGet:
path: /actuator/health
port: 8080
initialDelaySeconds: 15
periodSeconds: 3
successThreshold: 1
failureThreshold: 5
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: 8080
periodSeconds: 3
successThreshold: 1
failureThreshold: 3
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: 8080
periodSeconds: 1
successThreshold: 1
failureThreshold: 3
securityContext:
allowPrivilegeEscalation: false
ports:
- containerPort: 8080
env:
- name: DB_ENDPOINT
valueFrom:
configMapKeyRef:
name: api-config
key: DB_ENDPOINT
- name: POSTGRES_DB
valueFrom:
configMapKeyRef:
name: api-config
key: DB_NAME
- name: POSTGRES_USER