manager_auth_proxy_patch.yaml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # This patch inject a sidecar container which is a HTTP proxy for the
  2. # controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews.
  3. apiVersion: apps/v1
  4. kind: Deployment
  5. metadata:
  6. name: controller-manager
  7. namespace: system
  8. spec:
  9. template:
  10. spec:
  11. affinity:
  12. nodeAffinity:
  13. requiredDuringSchedulingIgnoredDuringExecution:
  14. nodeSelectorTerms:
  15. - matchExpressions:
  16. - key: kubernetes.io/arch
  17. operator: In
  18. values:
  19. - amd64
  20. - arm64
  21. - ppc64le
  22. - s390x
  23. - key: kubernetes.io/os
  24. operator: In
  25. values:
  26. - linux
  27. containers:
  28. - name: kube-rbac-proxy
  29. securityContext:
  30. allowPrivilegeEscalation: false
  31. capabilities:
  32. drop:
  33. - "ALL"
  34. image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1
  35. args:
  36. - "--secure-listen-address=0.0.0.0:8443"
  37. - "--upstream=http://127.0.0.1:8080/"
  38. - "--logtostderr=true"
  39. - "--v=0"
  40. ports:
  41. - containerPort: 8443
  42. protocol: TCP
  43. name: https
  44. resources:
  45. limits:
  46. cpu: 500m
  47. memory: 128Mi
  48. requests:
  49. cpu: 5m
  50. memory: 64Mi
  51. - name: manager
  52. args:
  53. - "--health-probe-bind-address=:8081"
  54. - "--metrics-bind-address=127.0.0.1:8080"
  55. - "--leader-elect"