quorate/vendor/workloads/tier-o-canary/deployment.yaml

91 lines
2.6 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: tier-o-canary
namespace: tier-o-canary
labels:
app.kubernetes.io/name: tier-o-canary
app.kubernetes.io/instance: tier-o-canary
app.kubernetes.io/component: canary
spec:
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
selector:
matchLabels:
app.kubernetes.io/name: tier-o-canary
app.kubernetes.io/instance: tier-o-canary
template:
metadata:
labels:
app.kubernetes.io/name: tier-o-canary
app.kubernetes.io/instance: tier-o-canary
app.kubernetes.io/component: canary
spec:
runtimeClassName: gvisor
automountServiceAccountToken: false
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
fsGroup: 65532
seccompProfile:
type: RuntimeDefault
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/name: tier-o-canary
app.kubernetes.io/instance: tier-o-canary
topologyKey: kubernetes.io/hostname
containers:
- name: nginx
image: cgr.dev/chainguard/nginx@sha256:0b4de0f60ae2295fdc852564d178b5473109baf9fc826fa5eb38a59f930e218e
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
protocol: TCP
resources:
requests:
cpu: 25m
memory: 32Mi
limits:
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
readinessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 1
periodSeconds: 5
livenessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 5
periodSeconds: 15
volumeMounts:
- name: nginx-conf
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
readOnly: true
- name: tmp
mountPath: /tmp
volumes:
- name: nginx-conf
configMap:
name: tier-o-canary
items:
- key: nginx.conf
path: nginx.conf
- name: tmp
emptyDir: {}