apiVersion: apps/v1
kind: Deployment
metadata:
  name: tugger-deployment
  labels:
    app: tugger
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tugger
  template:
    metadata:
      labels:
        app: tugger
    spec:
      containers:
      - name: tugger
        image: jainishshah17/tugger:0.1.7
        imagePullPolicy: Always
        env:
          - name: DOCKER_REGISTRY_URL
            value: "jainishshah17"
          - name: REGISTRY_SECRET_NAME
            value: 'regsecret'
          - name: WHITELIST_NAMESPACES
            value: "kube-system,default"
          - name: WHITELIST_REGISTRIES
            value: "jainishshah17"
          - name: WEBHOOK_URL
            value: "${WEBHOOK_URL}"
        ports:
          - containerPort: 443
            name: https
        volumeMounts:
        - name: tls
          mountPath: /etc/admission-controller/tls
        resources: {}
      volumes:
        - name: tls
          secret:
            secretName: tugger-certs
