111 lines
3.0 KiB
YAML
111 lines
3.0 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: zuul-scheduler
|
|
labels:
|
|
app.kubernetes.io/name: "zuul"
|
|
app.kubernetes.io/part-of: "zuul"
|
|
app.kubernetes.io/component: "zuul-scheduler"
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: "zuul"
|
|
app.kubernetes.io/part-of: "zuul"
|
|
app.kubernetes.io/component: "zuul-scheduler"
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: "zuul"
|
|
app.kubernetes.io/part-of: "zuul"
|
|
app.kubernetes.io/component: "zuul-scheduler"
|
|
spec:
|
|
affinity:
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchExpressions:
|
|
- key: "app.kubernetes.io/name"
|
|
operator: In
|
|
values:
|
|
- "zuul"
|
|
- key: "app.kubernetes.io/component"
|
|
operator: In
|
|
values:
|
|
- "zuul-scheduler"
|
|
topologyKey: "kubernetes.io/hostname"
|
|
|
|
containers:
|
|
- name: "zuul"
|
|
image: "zuul/zuul-scheduler"
|
|
args: ["/usr/local/bin/zuul-scheduler", "-f", "-d"]
|
|
|
|
ports:
|
|
- containerPort: 9091
|
|
name: "prometheus"
|
|
protocol: "TCP"
|
|
|
|
readinessProbe:
|
|
httpGet:
|
|
path: "/health/ready"
|
|
port: "prometheus"
|
|
failureThreshold: 20
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: "/health/live"
|
|
port: "prometheus"
|
|
initialDelaySeconds: 120
|
|
failureThreshold: 10
|
|
periodSeconds: 5
|
|
timeoutSeconds: 5
|
|
|
|
resources:
|
|
limits:
|
|
cpu: "2"
|
|
memory: "2G"
|
|
requests:
|
|
cpu: "100m"
|
|
memory: "200Mi"
|
|
|
|
securityContext:
|
|
runAsUser: 10001
|
|
runAsGroup: 10001
|
|
|
|
volumeMounts:
|
|
- name: "zuul-config"
|
|
mountPath: "/etc/zuul"
|
|
readOnly: true
|
|
- name: "zookeeper-client-tls"
|
|
mountPath: "/tls/client"
|
|
readOnly: true
|
|
- name: "zuul-config-data"
|
|
mountPath: "/etc/zuul-config"
|
|
- name: "zuul-var-lib"
|
|
mountPath: "/var/lib/zuul"
|
|
- name: "zuul-var-run"
|
|
mountPath: "/var/run/zuul"
|
|
|
|
serviceAccountName: "zuul"
|
|
volumes:
|
|
- name: "zuul-config"
|
|
secret:
|
|
secretName: "zuul-config"
|
|
|
|
- name: "zookeeper-client-tls"
|
|
secret:
|
|
secretName: "zookeeper-client-tls"
|
|
|
|
- name: "zuul-config-data"
|
|
persistentVolumeClaim:
|
|
claimName: "zuul-config"
|
|
|
|
- name: "zuul-var-lib"
|
|
emptyDir: {}
|
|
|
|
- name: "zuul-var-run"
|
|
emptyDir: {}
|