atlas-iac/infrastructure/core/ci-capacity/admission-service.yaml

82 lines
2.0 KiB
YAML

# infrastructure/core/ci-capacity/admission-service.yaml
apiVersion: v1
kind: Service
metadata:
name: ci-placement
spec:
selector:
app: ci-placement
ports:
- port: 443
targetPort: 8443
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ci-placement
spec:
replicas: 2
strategy:
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
selector:
matchLabels:
app: ci-placement
template:
metadata:
labels:
app: ci-placement
spec:
automountServiceAccountToken: false
nodeSelector:
kubernetes.io/arch: arm64
atlas.bstein.dev/spillover: "true"
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: ci-placement
topologyKey: kubernetes.io/hostname
securityContext:
runAsNonRoot: true
runAsUser: 65532
seccompProfile:
type: RuntimeDefault
containers:
- name: webhook
image: docker.io/library/python@sha256:4ce45e8acd11d49ee07aa736cd7ca2950df75033b946f3a5d9eca1cb4aae2ab7
command: [python3, -B, /app/admit.py]
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: [ALL]
resources:
requests: {cpu: 10m, memory: 24Mi}
limits: {cpu: 200m, memory: 64Mi}
readinessProbe:
httpGet: {path: /ready, scheme: HTTPS, port: 8443}
periodSeconds: 5
volumeMounts:
- {name: code, mountPath: /app, readOnly: true}
- {name: tls, mountPath: /tls, readOnly: true}
volumes:
- name: code
configMap:
name: ci-placement-code
- name: tls
secret:
secretName: ci-placement-tls
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: ci-placement
spec:
minAvailable: 1
selector:
matchLabels:
app: ci-placement