apiVersion: apps/v1
kind: Deployment
metadata:
  name: di-webhook
  namespace: di-system
  labels:
    control-plane: di-webhook
spec:
  selector:
    matchLabels:
      control-plane: di-webhook
  replicas: 1
  template:
    metadata:
      labels:
        control-plane: di-webhook
    spec:
      containers:
      - command:
        - /di-webhook
        image: opendilab/di-webhook:v0.2.2
        imagePullPolicy: Always
        name: webhook
        securityContext:
          allowPrivilegeEscalation: false
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8081
          initialDelaySeconds: 15
          periodSeconds: 20
        readinessProbe:
          httpGet:
            path: /readyz
            port: 8081
          initialDelaySeconds: 5
          periodSeconds: 10
        resources:
          limits:
            cpu: 30m
            memory: 100Mi
          requests:
            cpu: 30m
            memory: 100Mi
      terminationGracePeriodSeconds: 10
