chore: bootstrap infra-k8 scaffold
This commit is contained in:
commit
aeee20cb7f
14 files changed
+1256
No files matched your search
@@ -0,0 +1,118 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: api
|
||||
namespace: fch26-onemanarmy
|
||||
labels:
|
||||
app.kubernetes.io/name: api
|
||||
app.kubernetes.io/component: backend
|
||||
app.kubernetes.io/part-of: pulsecast
|
||||
spec:
|
||||
# Scenario state and the SSE hub live in memory. One replica is intentional.
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 2
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: api
|
||||
app.kubernetes.io/component: backend
|
||||
app.kubernetes.io/part-of: pulsecast
|
||||
spec:
|
||||
automountServiceAccountToken: false
|
||||
imagePullSecrets:
|
||||
- name: gitea-regcred
|
||||
securityContext:
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: api
|
||||
image: git.noelsabia.dev/noelsabia/pulsecast-api:gate1
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: api-config
|
||||
- configMapRef:
|
||||
name: pulsecast-shared
|
||||
env:
|
||||
- name: HOME
|
||||
value: /tmp
|
||||
# Created by the human; see docs/deploy.md. Never commit real credentials.
|
||||
- name: CONTROL_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: control-auth
|
||||
key: CONTROL_USER
|
||||
- name: CONTROL_PASS
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: control-auth
|
||||
key: CONTROL_PASS
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 256Mi
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /api/healthz
|
||||
port: http
|
||||
periodSeconds: 2
|
||||
failureThreshold: 30
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/healthz
|
||||
port: http
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /api/readyz
|
||||
port: http
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 2
|
||||
# SSE clients reconnect with retry: 3000; give them a moment on shutdown.
|
||||
terminationGracePeriodSeconds: 20
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: api
|
||||
namespace: fch26-onemanarmy
|
||||
labels:
|
||||
app.kubernetes.io/name: api
|
||||
app.kubernetes.io/part-of: pulsecast
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app.kubernetes.io/name: api
|
||||
ports:
|
||||
- name: http
|
||||
port: 8080
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
Reference in new issue
Block a user