Skip to content

Instantly share code, notes, and snippets.

@sallyom
Created September 11, 2023 16:11
Show Gist options
  • Save sallyom/39fd6aa6d3e0eef5ac467b5d49950280 to your computer and use it in GitHub Desktop.
Save sallyom/39fd6aa6d3e0eef5ac467b5d49950280 to your computer and use it in GitHub Desktop.
role,rolebinding,service-monitor
apiVersion: v1
kind: Namespace
metadata:
name: rekor-system
labels:
openshift.io/cluster-monitoring: true
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: prometheus-k8s
namespace: rekor-system
rules:
- apiGroups:
- ""
resources:
- services
- endpoints
- pods
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: prometheus-k8s
namespace: rekor-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: prometheus-k8s
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: openshift-monitoring
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app.kubernetes.io/name: rekor
name: rekor-server-monitor
namespace: rekor-system
spec:
endpoints:
- interval: 30s
port: 2112-tcp
scheme: http
selector:
matchLabels:
app.kubernetes.io/instance: scaffolding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment