apiVersion: apps/v1
kind: Deployment
metadata:
  name: control-api-apiserver
  namespace: control-api-apiserver
  labels:
    app: control-api-apiserver
spec:
  selector:
    matchLabels:
      app: control-api-apiserver
  replicas: 1
  template:
    metadata:
      labels:
        app: control-api-apiserver
    spec:
      serviceAccountName: control-api-apiserver
      containers:
      - name: apiserver
        image: ghcr.io/appuio/control-api:latest
        ports:
        - containerPort: 9443
        args:
        - "api"
        - "--cert-dir=/apiserver.local.config/certificates"
        - "--secure-port=9443"
        - "--feature-gates=APIPriorityAndFairness=false"
        - "--cluster-roles=control-api:organization-viewer,control-api:organization-admin"
        - "--username-prefix=appuio#"
        volumeMounts:
        - name: apiserver-certs
          mountPath: /apiserver.local.config/certificates
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
          limits:
            cpu: 300m
            memory: 200Mi
      volumes:
      - name: apiserver-certs
        emptyDir: {}
