66 lines
2.3 KiB
YAML
66 lines
2.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: proxy-checker
|
|
namespace: proxy-pool
|
|
labels: {app.kubernetes.io/name: proxy-checker, app.kubernetes.io/part-of: proxy-pool}
|
|
spec:
|
|
replicas: 1
|
|
minReadySeconds: 5
|
|
revisionHistoryLimit: 3
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate: {maxUnavailable: 1, maxSurge: 1}
|
|
selector:
|
|
matchLabels: {app.kubernetes.io/name: proxy-checker}
|
|
template:
|
|
metadata:
|
|
labels: {app.kubernetes.io/name: proxy-checker, app.kubernetes.io/part-of: proxy-pool}
|
|
annotations: {prometheus.io/scrape: "true", prometheus.io/port: "9090", prometheus.io/path: /metrics}
|
|
spec:
|
|
serviceAccountName: proxy-pool
|
|
automountServiceAccountToken: false
|
|
terminationGracePeriodSeconds: 45
|
|
securityContext: {runAsNonRoot: true, seccompProfile: {type: RuntimeDefault}}
|
|
topologySpreadConstraints:
|
|
- maxSkew: 1
|
|
topologyKey: kubernetes.io/hostname
|
|
whenUnsatisfiable: ScheduleAnyway
|
|
labelSelector: {matchLabels: {app.kubernetes.io/name: proxy-checker}}
|
|
containers:
|
|
- name: checker
|
|
image: REGISTRY/proxy-pool:VERSION
|
|
imagePullPolicy: IfNotPresent
|
|
command: [proxy-checker]
|
|
env:
|
|
- {name: PROXY_POOL_CONFIG, value: /etc/proxy-pool/config.yaml}
|
|
envFrom:
|
|
- secretRef: {name: proxy-pool-secrets}
|
|
ports:
|
|
- {name: metrics, containerPort: 9090}
|
|
readinessProbe:
|
|
httpGet: {path: /readyz, port: metrics}
|
|
periodSeconds: 5
|
|
timeoutSeconds: 2
|
|
livenessProbe:
|
|
httpGet: {path: /livez, port: metrics}
|
|
periodSeconds: 10
|
|
timeoutSeconds: 2
|
|
lifecycle:
|
|
preStop: {exec: {command: [sh, -c, "sleep 3"]}}
|
|
resources:
|
|
requests: {cpu: "1", memory: 512Mi}
|
|
limits: {cpu: "2", memory: 1Gi}
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
capabilities: {drop: [ALL]}
|
|
volumeMounts:
|
|
- {name: config, mountPath: /etc/proxy-pool, readOnly: true}
|
|
- {name: tmp, mountPath: /tmp}
|
|
volumes:
|
|
- name: config
|
|
configMap: {name: proxy-pool-config}
|
|
- name: tmp
|
|
emptyDir: {sizeLimit: 64Mi}
|