60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: apiservice
|
|
labels:
|
|
app.kubernetes.io/name: apiservice
|
|
app.kubernetes.io/part-of: zerospace
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: apiservice
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: apiservice
|
|
app.kubernetes.io/name: apiservice
|
|
app.kubernetes.io/part-of: zerospace
|
|
spec:
|
|
containers:
|
|
- name: apiservice
|
|
image: zerospace-apiservice:latest
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
env:
|
|
- name: ASPNETCORE_ENVIRONMENT
|
|
value: Production
|
|
- name: ConnectionStrings__zerospacedb
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-secret
|
|
key: connection-string
|
|
- name: OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES
|
|
value: "true"
|
|
- name: OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES
|
|
value: "true"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /alive
|
|
port: 8080
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8080
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
timeoutSeconds: 5
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|