Fix example-app manifests

This commit is contained in:
Fabian Reinartz
2016-11-02 10:17:56 -07:00
parent cd4941eba4
commit 043131a77c
6 changed files with 11 additions and 55 deletions

View File

@@ -13,8 +13,8 @@ kctl() {
kctl apply -f manifests/prometheus-operator.yaml kctl apply -f manifests/prometheus-operator.yaml
# Wait for TPRs to be ready. # Wait for TPRs to be ready.
until kctl get servicemonitor; do sleep 0.1; done until kctl get servicemonitor; do sleep 1; done
until kctl get prometheus; do sleep 0.1; done until kctl get prometheus; do sleep 1; done
kctl apply -f manifests/exporters kctl apply -f manifests/exporters
kctl apply -f manifests/grafana kctl apply -f manifests/grafana

View File

@@ -1,39 +0,0 @@
kind: Service
apiVersion: "v1"
metadata:
name: example-app
namespace: development
labels:
tier: frontend
team: frontend
annotations:
prometheus.io/scrape: 'true'
spec:
selector:
app: example-app
ports:
- name: web
protocol: TCP
port: 8080
targetPort: web
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: example-app
namespace: development
spec:
replicas: 3
template:
metadata:
labels:
app: example-app
version: 1.2.0
spec:
containers:
- name: example-app
image: quay.io/fabxc/prometheus_demo_service
ports:
- name: web
containerPort: 8080
protocol: TCP

View File

@@ -1,11 +1,9 @@
kind: Service kind: Service
apiVersion: "v1" apiVersion: v1
metadata: metadata:
name: example-app name: example-app
namespace: production
labels: labels:
tier: frontend tier: frontend
team: frontend
annotations: annotations:
prometheus.io/scrape: 'true' prometheus.io/scrape: 'true'
spec: spec:
@@ -21,9 +19,8 @@ apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
name: example-app name: example-app
namespace: production
spec: spec:
replicas: 5 replicas: 4
template: template:
metadata: metadata:
labels: labels:

View File

@@ -2,7 +2,6 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: prometheus-frontend name: prometheus-frontend
namespace: default
spec: spec:
type: NodePort type: NodePort
ports: ports:
@@ -12,5 +11,4 @@ spec:
protocol: TCP protocol: TCP
targetPort: web targetPort: web
selector: selector:
prometheus.coreos.com/type: prometheus prometheus: prometheus-frontend
prometheus.coreos.com/name: prometheus-frontend

View File

@@ -1,4 +1,4 @@
apiVersion: prometheus.coreos.com/v1alpha1 apiVersion: monitoring.coreos.com/v1alpha1
kind: Prometheus kind: Prometheus
metadata: metadata:
name: prometheus-frontend name: prometheus-frontend
@@ -6,7 +6,8 @@ metadata:
labels: labels:
prometheus: frontend prometheus: frontend
spec: spec:
version: v1.3.0
serviceMonitors: serviceMonitors:
- selector: - selector:
matchLabels: matchLabels:
team: frontend tier: frontend

View File

@@ -1,14 +1,13 @@
apiVersion: prometheus.coreos.com/v1alpha1 apiVersion: monitoring.coreos.com/v1alpha1
kind: ServiceMonitor kind: ServiceMonitor
metadata: metadata:
name: frontend name: frontend
namespace: default
labels: labels:
team: frontend tier: frontend
spec: spec:
selector: selector:
matchLabels: matchLabels:
team: frontend tier: frontend
endpoints: endpoints:
- port: web - port: web
interval: 10s interval: 10s