apiVersion: apps/v1
kind: Deployment
metadata:
  name: kube-rbac-proxy
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kube-rbac-proxy
  template:
    metadata:
      labels:
        app: kube-rbac-proxy
    spec:
      securityContext:
        runAsUser: 65532
      serviceAccountName: kube-rbac-proxy
      containers:
        - name: kube-rbac-proxy
          image: quay.io/brancz/kube-rbac-proxy:local
          args:
            - "--secure-listen-address=0.0.0.0:8443"
            - "--upstream=http://127.0.0.1:8081/"
            - "--config-file=/etc/kube-rbac-proxy/config-file.yaml"
            - "--logtostderr=true"
            - "--v=10"
          ports:
            - containerPort: 8443
              name: https
          volumeMounts:
            - name: config
              mountPath: /etc/kube-rbac-proxy
          securityContext:
            allowPrivilegeEscalation: false
        - name: prometheus-example-app
          image: quay.io/brancz/prometheus-example-app:v0.1.0
          args:
            - "--bind=127.0.0.1:8081"
      volumes:
        - name: config
          configMap:
            name: kube-rbac-proxy
