Skip to content
Snippets Groups Projects
Commit dac87166 authored by Fabian Reinartz's avatar Fabian Reinartz
Browse files

Add manifests to deploy+monitor example app

parent aefb8250
Branches
Tags
No related merge requests found
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
kind: Service
apiVersion: "v1"
metadata:
name: example-app
namespace: production
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: production
spec:
replicas: 5
template:
metadata:
labels:
app: example-app
version: 1.1.3
spec:
containers:
- name: example-app
image: quay.io/fabxc/prometheus_demo_service
ports:
- name: web
containerPort: 8080
protocol: TCP
apiVersion: v1
kind: Service
metadata:
name: prometheus-frontend
spec:
type: NodePort
ports:
- name: web
nodePort: 30100
port: 9090
protocol: TCP
targetPort: web
selector:
prometheus.coreos.com: prometheus-frontend
apiVersion: prometheus.coreos.com/v1alpha1
kind: Prometheus
metadata:
name: prometheus-frontend
labels:
prometheus: frontend
spec:
serviceMonitors:
- selector:
matchLabels:
team: frontend
\ No newline at end of file
apiVersion: prometheus.coreos.com/v1alpha1
kind: ServiceMonitor
metadata:
name: frontend
labels:
team: frontend
spec:
selector:
matchLabels:
team: frontend
scrapeInterval: 10s
endpoints:
- port: web
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment