102 lines
2.0 KiB
YAML
102 lines
2.0 KiB
YAML
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: prometheus-operator
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: prometheus-operator
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: prometheus-operator
|
|
namespace: default
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: prometheus-operator
|
|
rules:
|
|
- apiGroups:
|
|
- extensions
|
|
resources:
|
|
- thirdpartyresources
|
|
verbs:
|
|
- "*"
|
|
- apiGroups:
|
|
- apiextensions.k8s.io
|
|
resources:
|
|
- customresourcedefinitions
|
|
verbs:
|
|
- "*"
|
|
- apiGroups:
|
|
- monitoring.coreos.com
|
|
resources:
|
|
- alertmanagers
|
|
- prometheuses
|
|
- servicemonitors
|
|
verbs:
|
|
- "*"
|
|
- apiGroups:
|
|
- apps
|
|
resources:
|
|
- statefulsets
|
|
verbs: ["*"]
|
|
- apiGroups: [""]
|
|
resources:
|
|
- configmaps
|
|
- secrets
|
|
verbs: ["*"]
|
|
- apiGroups: [""]
|
|
resources:
|
|
- pods
|
|
verbs: ["list", "delete"]
|
|
- apiGroups: [""]
|
|
resources:
|
|
- services
|
|
- endpoints
|
|
verbs: ["get", "create", "update"]
|
|
- apiGroups: [""]
|
|
resources:
|
|
- nodes
|
|
verbs: ["list", "watch"]
|
|
- apiGroups: [""]
|
|
resources:
|
|
- namespaces
|
|
verbs: ["list"]
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: prometheus-operator
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
k8s-app: prometheus-operator
|
|
name: prometheus-operator
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
k8s-app: prometheus-operator
|
|
spec:
|
|
containers:
|
|
- args:
|
|
- --kubelet-service=kube-system/kubelet
|
|
- --config-reloader-image=harbor-001.jimmysong.io/library/configmap-reload:v0.0.1
|
|
image: harbor-001.jimmysong.io/library/prometheus-operator:v0.15.0
|
|
name: prometheus-operator
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
resources:
|
|
limits:
|
|
cpu: 200m
|
|
memory: 100Mi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 50Mi
|
|
serviceAccountName: prometheus-operator
|