apiVersion: apps/v1
kind: Deployment
metadata:
  name: sandbox-operator
  namespace: sandbox
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sandbox
      component: sandbox-operator
  template:
    metadata:
      labels:
        app: sandbox
        component: sandbox-operator
    spec:
      serviceAccountName: sandbox-operator
      containers:
      - name: operator
        image: quay.io/enmasse/sandbox-operator:latest
        imagePullPolicy: Always
        ports:
          - name: http
            protocol: TCP
            containerPort: 8080
        env:
        - name: ENMASSE_SANDBOX_EXPIRATION_TIME
          valueFrom:
            configMapKeyRef:
              name: sandbox-config
              key: expirationTime
        - name: ENMASSE_SANDBOX_MAXTENANTS
          valueFrom:
            configMapKeyRef:
              name: sandbox-config
              key: maxTenants
        - name: ENMASSE_SANDBOX_CERT_ISSUER
          valueFrom:
            configMapKeyRef:
              name: sandbox-config
              key: certIssuer
