apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubenab-deployment
  labels:
    app: kubenab
spec:
  selector:
    matchLabels:
      app: "kubenab"
  replicas: 1
  template:
    metadata:
      labels:
        app: "kubenab"
    spec:
      priorityClassName: system-cluster-critical
      containers:
      - name: kubenab
        image: docker.bintray.io/kubexray:0.3.3
        imagePullPolicy: Always
        env:
          - name: DOCKER_REGISTRY_URL
            value: "kubenab"
          - name: REGISTRY_SECRET_NAME
            value: 'regsecret'
          - name: WHITELIST_NAMESPACES
            value: "kube-system,default"
          - name: WHITELIST_REGISTRIES
            value: "kubenab"
          - name: REPLACE_REGISTRY_URL
            value: "true"
        ports:
          - containerPort: 443
            name: https
        volumeMounts:
        - name: tls
          mountPath: /etc/admission-controller/tls
        resources: {}
      volumes:
        - name: tls
          secret:
            secretName: kubenab-certs
