mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-16 01:06:27 +00:00
kube-prometheus: add prometheus-operator as target
This commit is contained in:
parent
09c57a17d1
commit
f82078f45f
4 changed files with 61 additions and 28 deletions
|
@ -33,28 +33,31 @@ kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: prometheus-operator
|
name: prometheus-operator
|
||||||
labels:
|
labels:
|
||||||
operator: prometheus
|
k8s-app: prometheus-operator
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
operator: prometheus
|
k8s-app: prometheus-operator
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: prometheus-operator
|
serviceAccountName: prometheus-operator
|
||||||
containers:
|
containers:
|
||||||
- name: prometheus-operator
|
- name: prometheus-operator
|
||||||
image: quay.io/coreos/prometheus-operator:v0.9.1
|
image: quay.io/coreos/prometheus-operator:v0.9.1
|
||||||
args:
|
args:
|
||||||
- "--kubelet-service=kube-system/kubelet"
|
- "--kubelet-service=kube-system/kubelet"
|
||||||
- "--config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1"
|
- "--config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1"
|
||||||
resources:
|
ports:
|
||||||
requests:
|
- name: http
|
||||||
cpu: 100m
|
containerPort: 8080
|
||||||
memory: 50Mi
|
resources:
|
||||||
limits:
|
requests:
|
||||||
cpu: 200m
|
cpu: 100m
|
||||||
memory: 300Mi
|
memory: 50Mi
|
||||||
|
limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 300Mi
|
||||||
```
|
```
|
||||||
|
|
||||||
> Make sure that the `ServiceAccount` called `prometheus-operator` exists and if using RBAC, is bound to the correct role. Read more on [RBAC when using the Prometheus Operator](../rbac.md).
|
> Make sure that the `ServiceAccount` called `prometheus-operator` exists and if using RBAC, is bound to the correct role. Read more on [RBAC when using the Prometheus Operator](../rbac.md).
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: prometheus-operator
|
||||||
|
labels:
|
||||||
|
k8s-app: prometheus-operator
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 8080
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
k8s-app: prometheus-operator
|
|
@ -3,25 +3,28 @@ kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: prometheus-operator
|
name: prometheus-operator
|
||||||
labels:
|
labels:
|
||||||
operator: prometheus
|
k8s-app: prometheus-operator
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
operator: prometheus
|
k8s-app: prometheus-operator
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: prometheus-operator
|
serviceAccountName: prometheus-operator
|
||||||
containers:
|
containers:
|
||||||
- name: prometheus-operator
|
- name: prometheus-operator
|
||||||
image: quay.io/coreos/prometheus-operator:v0.9.1
|
image: quay.io/coreos/prometheus-operator:v0.9.1
|
||||||
args:
|
args:
|
||||||
- "--kubelet-service=kube-system/kubelet"
|
- "--kubelet-service=kube-system/kubelet"
|
||||||
- "--config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1"
|
- "--config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1"
|
||||||
resources:
|
ports:
|
||||||
requests:
|
- name: http
|
||||||
cpu: 100m
|
containerPort: 8080
|
||||||
memory: 50Mi
|
resources:
|
||||||
limits:
|
requests:
|
||||||
cpu: 200m
|
cpu: 100m
|
||||||
memory: 300Mi
|
memory: 50Mi
|
||||||
|
limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 300Mi
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
apiVersion: monitoring.coreos.com/v1alpha1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: prometheus-operator
|
||||||
|
labels:
|
||||||
|
k8s-app: prometheus-operator
|
||||||
|
spec:
|
||||||
|
endpoints:
|
||||||
|
- port: http
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
k8s-app: prometheus-operator
|
Loading…
Add table
Reference in a new issue