Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 9 additions & 28 deletions bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10595,7 +10595,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/component: metrics
app.kubernetes.io/created-by: perses-operator
app.kubernetes.io/instance: metrics-reader
app.kubernetes.io/name: clusterrole
Expand All @@ -10611,7 +10611,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/component: metrics
app.kubernetes.io/created-by: perses-operator
app.kubernetes.io/instance: proxy-role
app.kubernetes.io/name: clusterrole
Expand Down Expand Up @@ -10674,7 +10674,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/component: metrics
app.kubernetes.io/created-by: perses-operator
app.kubernetes.io/instance: proxy-rolebinding
app.kubernetes.io/name: clusterrolebinding
Expand All @@ -10693,7 +10693,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/component: metrics
app.kubernetes.io/created-by: perses-operator
app.kubernetes.io/instance: controller-manager-metrics-service
app.kubernetes.io/name: service
Expand Down Expand Up @@ -10770,7 +10770,8 @@ spec:
containers:
- args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8082
- --metrics-bind-address=:8443
- --metrics-secure=true
- --leader-elect
image: docker.io/persesdev/perses-operator:v0.3.2
imagePullPolicy: Always
Expand All @@ -10785,6 +10786,9 @@ spec:
- containerPort: 9443
name: webhook-server
protocol: TCP
- containerPort: 8443
name: https
protocol: TCP
readinessProbe:
httpGet:
path: /readyz
Expand All @@ -10807,29 +10811,6 @@ spec:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
readOnly: true
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8082/
- --logtostderr=true
- --v=0
image: quay.io/brancz/kube-rbac-proxy:v0.21.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
protocol: TCP
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
serviceAccountName: perses-operator-controller-manager
terminationGracePeriodSeconds: 10
volumes:
Expand Down
2 changes: 1 addition & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ patches:
# Protect the /metrics endpoint by putting it behind auth.
# If you want your controller-manager to expose the /metrics
# endpoint w/o any authn/z, please comment the following line.
- path: manager_auth_proxy_patch.yaml
- path: manager_metrics_patch.yaml



Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This patch inject a sidecar container which is a HTTP proxy for the
# controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews.
# This patch configures the manager to serve the /metrics endpoint
# with authentication and authorization using controller-runtime's
# built-in SecureServing and FilterProvider.
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -25,31 +26,13 @@ spec:
values:
- linux
containers:
- name: kube-rbac-proxy
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
image: quay.io/brancz/kube-rbac-proxy:v0.21.0
- name: manager
args:
- "--secure-listen-address=0.0.0.0:8443"
- "--upstream=http://127.0.0.1:8082/"
- "--logtostderr=true"
- "--v=0"
- "--health-probe-bind-address=:8081"
- "--metrics-bind-address=:8443"
- "--metrics-secure=true"
- "--leader-elect"
ports:
- containerPort: 8443
protocol: TCP
name: https
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
- name: manager
args:
- "--health-probe-bind-address=:8081"
- "--metrics-bind-address=127.0.0.1:8082"
- "--leader-elect"
2 changes: 1 addition & 1 deletion config/rbac/auth_proxy_client_clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: metrics-reader
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/component: metrics
app.kubernetes.io/created-by: perses-operator
app.kubernetes.io/part-of: perses-operator
name: metrics-reader
Expand Down
2 changes: 1 addition & 1 deletion config/rbac/auth_proxy_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: proxy-role
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/component: metrics
app.kubernetes.io/created-by: perses-operator
app.kubernetes.io/part-of: perses-operator
name: proxy-role
Expand Down
2 changes: 1 addition & 1 deletion config/rbac/auth_proxy_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app.kubernetes.io/name: clusterrolebinding
app.kubernetes.io/instance: proxy-rolebinding
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/component: metrics
app.kubernetes.io/created-by: perses-operator
app.kubernetes.io/part-of: perses-operator
name: proxy-rolebinding
Expand Down
2 changes: 1 addition & 1 deletion config/rbac/auth_proxy_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
control-plane: controller-manager
app.kubernetes.io/name: service
app.kubernetes.io/instance: controller-manager-metrics-service
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/component: metrics
app.kubernetes.io/created-by: perses-operator
app.kubernetes.io/part-of: perses-operator
name: controller-manager-metrics-service
Expand Down
3 changes: 1 addition & 2 deletions config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ resources:
- leader_election_role.yaml
- leader_election_role_binding.yaml
# Comment the following 4 lines if you want to disable
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
# which protects your /metrics endpoint.
# the authn/authz protection of the /metrics endpoint.
- auth_proxy_service.yaml
- auth_proxy_role.yaml
- auth_proxy_role_binding.yaml
Expand Down
Loading
Loading