Files
Kubernetes-Manifests/applications/infisical/infisical/deployment.yaml

73 lines
2.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: infisical-backend
namespace: infisical
spec:
replicas: 1
selector:
matchLabels:
app: infisical-backend
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
template:
metadata:
labels:
app: infisical-backend
spec:
# The backend runs DB migrations on startup, so wait for Postgres to be ready.
initContainers:
- name: wait-for-db
image: postgres:14-alpine
command:
- sh
- -c
- "until pg_isready -h infisical-postgres -p 5432 -U $POSTGRES_USER; do echo waiting for db; sleep 2; done"
env:
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: infisical-secrets
key: POSTGRES_USER
containers:
- name: backend
image: infisical/infisical:v0.162.6 # pinned — bump deliberately
ports:
- containerPort: 8080
# ENCRYPTION_KEY, AUTH_SECRET, DB_CONNECTION_URI, REDIS_URL (+ POSTGRES_* — ignored) come from the Secret
envFrom:
- secretRef:
name: infisical-secrets
env:
- name: NODE_ENV
value: production
- name: SITE_URL
value: https://infisical.jsme.be
- name: OTEL_TELEMETRY_COLLECTION_ENABLED
value: "false"
# Allow Core to reach the in-cluster Kubernetes API (kubernetes.default.svc,
# a private ClusterIP) for Kubernetes Auth token review. Off by default (SSRF guard).
- name: ALLOW_INTERNAL_IP_CONNECTIONS
value: "true"
readinessProbe:
httpGet:
path: /api/status
port: 8080
initialDelaySeconds: 20
periodSeconds: 10
failureThreshold: 12
livenessProbe:
httpGet:
path: /api/status
port: 8080
initialDelaySeconds: 60
periodSeconds: 20
resources:
requests:
cpu: 250m
memory: 512Mi
limits:
memory: 1Gi