---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tesoro-admission-controller
  labels:
    app: tesoro-admission-controller
spec:
  selector:
    matchLabels:
      app: tesoro-admission-controller
  template:
    metadata:
      labels:
        app: tesoro-admission-controller
    spec:
      containers:
        - name: tesoro
          image: kapicorp/tesoro
          imagePullPolicy: Always
          ports:
            - containerPort: 443
              name: tesoro-api
            - containerPort: 9095
              name: metrics
          args:
            - --port=443
            - --cert-file=/certs/cert.pem
            - --key-file=/certs/priv.key
          volumeMounts:
            - name: tesoro-secrets
              mountPath: /certs
              readOnly: true
      volumes:
        - name: tesoro-secrets
          secret:
            secretName: tesoro-admission-controller-secret



