kubernetes-handbook/manifests/HPA/prometheus-operator.yaml

102 lines
2.0 KiB
YAML
Raw Normal View History

2017-11-27 19:36:05 +08:00
apiVersion: rbac.authorization.k8s.io/v1beta1
2017-12-13 23:05:05 +08:00
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
2017-11-27 19:36:05 +08:00
kind: ClusterRole
metadata:
name: prometheus-operator
rules:
- apiGroups:
- extensions
resources:
- thirdpartyresources
verbs:
2017-12-13 23:05:05 +08:00
- "*"
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- "*"
2017-11-27 19:36:05 +08:00
- 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"]
2017-12-13 23:05:05 +08:00
- apiGroups: [""]
resources:
- namespaces
verbs: ["list"]
2017-11-27 19:36:05 +08:00
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus-operator
---
2017-12-13 23:05:05 +08:00
apiVersion: extensions/v1beta1
2017-11-27 19:36:05 +08:00
kind: Deployment
metadata:
labels:
2017-12-13 23:05:05 +08:00
k8s-app: prometheus-operator
name: prometheus-operator
2017-11-27 19:36:05 +08:00
spec:
replicas: 1
template:
metadata:
labels:
2017-12-13 23:05:05 +08:00
k8s-app: prometheus-operator
2017-11-27 19:36:05 +08:00
spec:
containers:
2017-12-13 23:05:05 +08:00
- args:
- --kubelet-service=kube-system/kubelet
2018-05-04 19:53:39 +08:00
- --config-reloader-image=harbor-001.jimmysong.io/library/configmap-reload:v0.0.1
image: harbor-001.jimmysong.io/library/prometheus-operator:v0.15.0
2017-12-13 23:05:05 +08:00
name: prometheus-operator
ports:
- containerPort: 8080
name: http
resources:
limits:
cpu: 200m
memory: 100Mi
requests:
cpu: 100m
memory: 50Mi
serviceAccountName: prometheus-operator