Files
step3/k8s/base/api-deployment.yaml
T

92 lines
2.5 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: step3-api
spec:
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
selector:
matchLabels:
app: step3-api
template:
metadata:
labels:
app: step3-api
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: /metrics
prometheus.io/port: "5008"
spec:
containers:
- name: api
image: step3-questions:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5008
envFrom:
- configMapRef:
name: step3-runtime-config
env:
- name: MongoDB__ConnectionString
valueFrom:
secretKeyRef:
name: step3-runtime-secrets
key: mongodb-connection-string
- name: Jwt__Key
valueFrom:
secretKeyRef:
name: step3-runtime-secrets
key: jwt-key
- name: InternalPurge__Secret
valueFrom:
secretKeyRef:
name: step3-runtime-secrets
key: purge-secret
- name: Stripe__SecretKey
valueFrom:
secretKeyRef:
name: step3-runtime-secrets
key: stripe-secret-key
- name: Stripe__WebhookSecret
valueFrom:
secretKeyRef:
name: step3-runtime-secrets
key: stripe-webhook-secret
- name: Google__ClientId
valueFrom:
secretKeyRef:
name: step3-runtime-secrets
key: google-client-id
- name: Google__ClientSecret
valueFrom:
secretKeyRef:
name: step3-runtime-secrets
key: google-client-secret
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
cpu: "1"
memory: 512Mi
readinessProbe:
httpGet:
path: /readyz
port: 5008
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
livenessProbe:
httpGet:
path: /healthz
port: 5008
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 3
failureThreshold: 3