apiVersion: apps/v1
kind: Deployment
metadata:
  name: rbac-query-proxy
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rbac-query-proxy
  template:
    metadata:
      labels:
        app: rbac-query-proxy
    spec:
      serviceAccountName: rbac-query-proxy
      containers:
      - name: rbac-query-proxy
        image: blue0/rbac-query-proxy:latest
        args:
        - "--listen-address=0.0.0.0:8443"
        - "--metrics-server=https://observability-observatorium-observatorium-api.open-cluster-management-observability.svc.cluster.local:8080"
        ports:
        - containerPort: 8443
          name: https
        volumeMounts:
        - name: certs
          mountPath: /var/rbac_proxy/serving_certs
        - name: ca-certs
          mountPath: /var/rbac_proxy/ca
        - name: client-certs
          mountPath: /var/rbac_proxy/certs
      volumes:
      - name: certs
        secret:
          secretName: rbac-proxy-certs
      - name: ca-certs
        secret:
          secretName: observability-server-certs
      - name: client-certs
        secret:
          secretName: observability-grafana-certs