-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(operator): Use safe bearer token authentication to scrape operato…
…r metrics (#12164)
- Loading branch information
Showing
26 changed files
with
201 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...penshift/manifests/loki-operator-controller-manager-metrics-reader_v1_serviceaccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/instance: loki-operator-v0.5.0 | ||
app.kubernetes.io/managed-by: operator-lifecycle-manager | ||
app.kubernetes.io/name: loki-operator | ||
app.kubernetes.io/part-of: loki-operator | ||
app.kubernetes.io/version: 0.5.0 | ||
name: loki-operator-controller-manager-metrics-reader |
13 changes: 13 additions & 0 deletions
13
...mmunity-openshift/manifests/loki-operator-controller-manager-metrics-token_v1_secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
annotations: | ||
kubernetes.io/service-account.name: loki-operator-controller-manager-metrics-reader | ||
labels: | ||
app.kubernetes.io/instance: loki-operator-v0.5.0 | ||
app.kubernetes.io/managed-by: operator-lifecycle-manager | ||
app.kubernetes.io/name: loki-operator | ||
app.kubernetes.io/part-of: loki-operator | ||
app.kubernetes.io/version: 0.5.0 | ||
name: loki-operator-controller-manager-metrics-token | ||
type: kubernetes.io/service-account-token |
19 changes: 19 additions & 0 deletions
19
...ator-controller-manager-read-metrics_rbac.authorization.k8s.io_v1_clusterrolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/instance: loki-operator-v0.5.0 | ||
app.kubernetes.io/managed-by: operator-lifecycle-manager | ||
app.kubernetes.io/name: loki-operator | ||
app.kubernetes.io/part-of: loki-operator | ||
app.kubernetes.io/version: 0.5.0 | ||
name: loki-operator-controller-manager-read-metrics | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: loki-operator-metrics-reader | ||
subjects: | ||
- kind: ServiceAccount | ||
name: loki-operator-controller-manager-metrics-reader | ||
namespace: kubernetes-operators |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...ommunity/manifests/loki-operator-controller-manager-metrics-reader_v1_serviceaccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/instance: loki-operator-v0.5.0 | ||
app.kubernetes.io/managed-by: operator-lifecycle-manager | ||
app.kubernetes.io/name: loki-operator | ||
app.kubernetes.io/part-of: loki-operator | ||
app.kubernetes.io/version: 0.5.0 | ||
name: loki-operator-controller-manager-metrics-reader |
19 changes: 19 additions & 0 deletions
19
...ator-controller-manager-read-metrics_rbac.authorization.k8s.io_v1_clusterrolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/instance: loki-operator-v0.5.0 | ||
app.kubernetes.io/managed-by: operator-lifecycle-manager | ||
app.kubernetes.io/name: loki-operator | ||
app.kubernetes.io/part-of: loki-operator | ||
app.kubernetes.io/version: 0.5.0 | ||
name: loki-operator-controller-manager-read-metrics | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: loki-operator-metrics-reader | ||
subjects: | ||
- kind: ServiceAccount | ||
name: loki-operator-controller-manager-metrics-reader | ||
namespace: loki-operator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...penshift/manifests/loki-operator-controller-manager-metrics-reader_v1_serviceaccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/instance: loki-operator-0.1.0 | ||
app.kubernetes.io/managed-by: operator-lifecycle-manager | ||
app.kubernetes.io/name: loki-operator | ||
app.kubernetes.io/part-of: cluster-logging | ||
app.kubernetes.io/version: 0.1.0 | ||
name: loki-operator-controller-manager-metrics-reader |
13 changes: 13 additions & 0 deletions
13
.../bundle/openshift/manifests/loki-operator-controller-manager-metrics-token_v1_secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
annotations: | ||
kubernetes.io/service-account.name: loki-operator-controller-manager-metrics-reader | ||
labels: | ||
app.kubernetes.io/instance: loki-operator-0.1.0 | ||
app.kubernetes.io/managed-by: operator-lifecycle-manager | ||
app.kubernetes.io/name: loki-operator | ||
app.kubernetes.io/part-of: cluster-logging | ||
app.kubernetes.io/version: 0.1.0 | ||
name: loki-operator-controller-manager-metrics-token | ||
type: kubernetes.io/service-account-token |
19 changes: 19 additions & 0 deletions
19
...ator-controller-manager-read-metrics_rbac.authorization.k8s.io_v1_clusterrolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/instance: loki-operator-0.1.0 | ||
app.kubernetes.io/managed-by: operator-lifecycle-manager | ||
app.kubernetes.io/name: loki-operator | ||
app.kubernetes.io/part-of: cluster-logging | ||
app.kubernetes.io/version: 0.1.0 | ||
name: loki-operator-controller-manager-read-metrics | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: loki-operator-metrics-reader | ||
subjects: | ||
- kind: ServiceAccount | ||
name: loki-operator-controller-manager-metrics-reader | ||
namespace: openshift-operators-redhat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
operator/config/overlays/openshift/manager_metrics_secret_token.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: controller-manager-metrics-token | ||
annotations: | ||
kubernetes.io/service-account.name: loki-operator-controller-manager-metrics-reader | ||
type: kubernetes.io/service-account-token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
operator/config/rbac/auth_proxy_client_clusterrolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: controller-manager-read-metrics | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: metrics-reader | ||
subjects: | ||
- kind: ServiceAccount | ||
name: controller-manager-metrics-reader | ||
namespace: system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: controller-manager-metrics-reader | ||
namespace: system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: controller-manager | ||
namespace: system |