Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1986061: Monitor openshift-network-diagnostics namespace #1190

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions bindata/network-diagnostics/000-ns.yaml
Expand Up @@ -2,6 +2,8 @@ apiVersion: v1
kind: Namespace
metadata:
name: openshift-network-diagnostics
labels:
openshift.io/cluster-monitoring: "true"
annotations:
openshift.io/node-selector: "" #override default node selector
workload.openshift.io/allowed: "management"
12 changes: 11 additions & 1 deletion bindata/network-diagnostics/001-rbac.yaml
Expand Up @@ -84,7 +84,17 @@ rules:
- apiGroups: ['controlplane.operator.openshift.io']
resources: ['podnetworkconnectivitychecks/status']
verbs: ['update']

- apiGroups: ["authorization.k8s.io"]
resources:
- subjectaccessreviews
verbs:
- create
- apiGroups: ["authentication.k8s.io"]
resources:
- tokenreviews
verbs:
- create

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
35 changes: 35 additions & 0 deletions bindata/network-diagnostics/network-check-source.yaml
Expand Up @@ -66,6 +66,8 @@ metadata:
namespace: openshift-network-diagnostics
annotations:
include.release.openshift.io/self-managed-high-availability: "true"
labels:
app: network-check-source
spec:
clusterIP: None
ports:
Expand Down Expand Up @@ -99,3 +101,36 @@ spec:
selector:
matchLabels:
app: network-check-source

---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: prometheus-k8s
namespace: openshift-network-diagnostics
rules:
- apiGroups:
- ""
resources:
- services
- endpoints
- pods
verbs:
- get
- list
- watch

---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: prometheus-k8s
namespace: openshift-network-diagnostics
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: prometheus-k8s
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: openshift-monitoring