apiVersion: apps/v1
kind: Deployment
metadata:
  name: shipper
  namespace: shipper-system
  labels:
    app: shipper
spec:
  selector:
    matchLabels:
      app: shipper
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: shipper
      annotations:
        prometheus.io/scrape_port: '8889'
    spec:
      containers:
        - name: shipper
          image: SHIPPER_IMAGE
          imagePullPolicy: IfNotPresent
          args:
            - "-webhook-cert"
            - "/etc/webhook/certs/tls.crt"
            - "-webhook-key"
            - "/etc/webhook/certs/tls.key"
            - "-webhook-port"
            - "9443"
            - "-v"
            - "4"
            - "-logtostderr"
          resources:
            limits:
              cpu: "4"
              memory: 50Gi
            requests:
              cpu: "1"
              memory: 10Gi
          ports:
            - name: metrics
              containerPort: 8889
            - name: webhook
              containerPort: 9443
          volumeMounts:
            - mountPath: /etc/webhook/certs
              name: webhook-certs
              readOnly: true
      serviceAccountName: shipper-mgmt-cluster
      volumes:
        - name: webhook-certs
          secret:
            secretName: shipper-validating-webhook
