Remove old manifests and replace with jsonnet build

This commit is contained in:
Frederic Branczyk
2018-04-10 10:51:00 +02:00
parent d8692794a9
commit 507617e150
127 changed files with 6332 additions and 8494 deletions

View File

@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: basic-auth
data:
password: dG9vcg== # toor
user: YWRtaW4= # admin
type: Opaque

View File

@@ -0,0 +1,22 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
k8s-apps: basic-auth-example
name: basic-auth-example
spec:
endpoints:
- basicAuth:
password:
name: basic-auth
key: password
username:
name: basic-auth
key: user
port: metrics
namespaceSelector:
matchNames:
- logging
selector:
matchLabels:
app: myapp

View File

@@ -0,0 +1,36 @@
kind: Service
apiVersion: v1
metadata:
name: example-app
labels:
tier: frontend
namespace: default
spec:
selector:
app: example-app
ports:
- name: web
protocol: TCP
port: 8080
targetPort: web
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: example-app
namespace: default
spec:
replicas: 4
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

View File

@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: prometheus-frontend
namespace: monitoring
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: alertmanager-discovery
subjects:
- kind: ServiceAccount
name: prometheus-frontend
namespace: default

View File

@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
name: alertmanager-discovery
namespace: monitoring
rules:
- apiGroups: [""]
resources:
- services
- endpoints
- pods
verbs: ["list", "watch"]

View File

@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: prometheus-frontend
namespace: default
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: prometheus-frontend
subjects:
- kind: ServiceAccount
name: prometheus-frontend
namespace: default

View File

@@ -0,0 +1,17 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
name: prometheus-frontend
namespace: default
rules:
- apiGroups: [""]
resources:
- nodes
- services
- endpoints
- pods
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources:
- configmaps
verbs: ["get"]

View File

@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus-frontend
namespace: default

View File

@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: prometheus-frontend
namespace: default
spec:
type: NodePort
ports:
- name: web
nodePort: 30100
port: 9090
protocol: TCP
targetPort: web
selector:
prometheus: frontend

View File

@@ -0,0 +1,25 @@
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: frontend
namespace: default
labels:
prometheus: frontend
spec:
serviceAccountName: prometheus-frontend
version: v1.7.1
serviceMonitorSelector:
matchLabels:
tier: frontend
resources:
requests:
# 2Gi is default, but won't schedule if you don't have a node with >2Gi
# memory. Modify based on your target and time-series count for
# production use. This value is mainly meant for demonstration/testing
# purposes.
memory: 400Mi
alerting:
alertmanagers:
- namespace: monitoring
name: alertmanager-main
port: web

View File

@@ -0,0 +1,19 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: frontend
namespace: default
labels:
tier: frontend
spec:
selector:
matchLabels:
tier: frontend
targetLabels:
- tier
endpoints:
- port: web
interval: 10s
namespaceSelector:
matchNames:
- default