1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/config/manifest/deployment.yaml

148 lines
4.1 KiB
YAML
Raw Normal View History

2020-06-05 13:42:53 -07:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: kyverno
# do not remove
app.kubernetes.io/name: kyverno
name: kyverno
2020-06-05 13:42:53 -07:00
spec:
selector:
matchLabels:
app: kyverno
# do not remove
app.kubernetes.io/name: kyverno
2020-06-05 13:42:53 -07:00
replicas: 1
template:
metadata:
labels:
app: kyverno
# do not remove
app.kubernetes.io/name: kyverno
2020-06-05 13:42:53 -07:00
spec:
volumes:
- name: sigstore
emptyDir: {}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- kyverno
topologyKey: "kubernetes.io/hostname"
2020-06-05 13:42:53 -07:00
serviceAccountName: kyverno-service-account
2020-10-22 11:26:22 -07:00
securityContext:
runAsNonRoot: true
2020-06-05 13:42:53 -07:00
initContainers:
- name: kyverno-pre
image: ghcr.io/kyverno/kyvernopre:latest
imagePullPolicy: Always
resources:
limits:
cpu: 100m
memory: 256Mi
requests:
cpu: 10m
memory: 64Mi
2020-10-22 11:26:22 -07:00
securityContext:
runAsNonRoot: true
privileged: false
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
env:
- name: METRICS_CONFIG
value: kyverno-metrics
- name: KYVERNO_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
2020-06-05 13:42:53 -07:00
containers:
- name: kyverno
image: ghcr.io/kyverno/kyverno:latest
imagePullPolicy: Always
2020-06-05 13:42:53 -07:00
args:
# customize webhook timeout
#- "--webhookTimeout=4"
# enable profiling
# - "--profile"
# configure the workers for generate controller
# - --genWorkers=20
- "-v=2"
- --autogenInternals=false
2020-06-05 13:42:53 -07:00
ports:
2020-10-22 11:26:22 -07:00
- containerPort: 9443
name: https
protocol: TCP
- containerPort: 8000
name: metrics-port
protocol: TCP
2020-06-05 13:42:53 -07:00
env:
- name: INIT_CONFIG
value: kyverno
- name: METRICS_CONFIG
value: kyverno-metrics
- name: KYVERNO_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: KYVERNO_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: KYVERNO_SVC
value: kyverno-svc
- name: TUF_ROOT
value: /.sigstore
2020-10-22 11:26:22 -07:00
securityContext:
runAsNonRoot: true
privileged: false
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
2020-06-05 13:42:53 -07:00
resources:
requests:
memory: 128Mi
cpu: 100m
2020-06-05 13:42:53 -07:00
limits:
memory: 384Mi
2020-06-05 13:42:53 -07:00
livenessProbe:
httpGet:
path: /health/liveness
2020-10-22 12:48:04 -07:00
port: 9443
2020-06-05 13:42:53 -07:00
scheme: HTTPS
initialDelaySeconds: 15
periodSeconds: 30
2020-06-05 13:42:53 -07:00
timeoutSeconds: 5
failureThreshold: 2
2020-06-05 13:42:53 -07:00
successThreshold: 1
readinessProbe:
httpGet:
path: /health/readiness
2020-10-22 12:48:04 -07:00
port: 9443
2020-06-05 13:42:53 -07:00
scheme: HTTPS
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 4
successThreshold: 1
# Failing to provide a writable $TUF_ROOT can cause TUF client initialization to panic
volumeMounts:
- mountPath: /.sigstore
name: sigstore
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 40%
maxSurge: 1