mirror of
https://gitlab.com/shouptech/flux.git
synced 2026-02-03 17:09:45 +00:00
Compare commits
8 commits
f57803dc8e
...
9d7db86243
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d7db86243 | |||
| b5eb466184 | |||
| 7420d2f054 | |||
| 3d73855758 | |||
| 3adf117732 | |||
| 5f2091c20f | |||
| 5d301021a4 | |||
| 0acf00db6b |
3 changed files with 125 additions and 0 deletions
68
workloads/grafana/grafana-deploy.yml
Normal file
68
workloads/grafana/grafana-deploy.yml
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: grafana
|
||||
namespace: grafana
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: grafana
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
spec:
|
||||
containers:
|
||||
- image: grafana/grafana:6.6.2
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: grafana
|
||||
env:
|
||||
- name: GF_SERVER_ROOT_URL
|
||||
value: https://grafana.shoup.io
|
||||
- name: GF_SERVER_DOMAIN
|
||||
value: grafana.shoup.io
|
||||
- name: GF_DATABASE_TYPE
|
||||
value: postgres
|
||||
- name: GF_DATABASE_HOST
|
||||
value: postgres:5432
|
||||
- name: GF_DATABASE_NAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres
|
||||
key: POSTGRES_USER
|
||||
- name: GF_DATABASE_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres
|
||||
key: POSTGRES_USER
|
||||
- name: GF_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres
|
||||
key: POSTGRES_PASSWORD
|
||||
resources:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "100m"
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 3000
|
||||
initialDelaySeconds: 600
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 2
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
volumeMounts:
|
||||
- name: grafana-storage
|
||||
mountPath: /var/lib/grafana
|
||||
volumes:
|
||||
- name: grafana-storage
|
||||
hostPath:
|
||||
path: /opt/grafana/pod
|
||||
type: Directory
|
||||
27
workloads/grafana/grafana-service.yml
Normal file
27
workloads/grafana/grafana-service.yml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: grafana
|
||||
namespace: grafana
|
||||
spec:
|
||||
selector:
|
||||
app: grafana
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 3000
|
||||
targetPort: 3000
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: grafana
|
||||
namespace: grafana
|
||||
spec:
|
||||
rules:
|
||||
- host: grafana.shoup.io
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: grafana
|
||||
servicePort: 3000
|
||||
path: /
|
||||
30
workloads/kube-system/coredns-config.yml
Normal file
30
workloads/kube-system/coredns-config.yml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
addonmanager.kubernetes.io/mode: EnsureExists
|
||||
k8s-app: kube-dns
|
||||
name: coredns
|
||||
namespace: kube-system
|
||||
data:
|
||||
Corefile: |
|
||||
.:53 {
|
||||
errors
|
||||
health {
|
||||
lameduck 5s
|
||||
}
|
||||
ready
|
||||
log . {
|
||||
class error
|
||||
}
|
||||
kubernetes cluster.local in-addr.arpa ip6.arpa {
|
||||
pods insecure
|
||||
fallthrough in-addr.arpa ip6.arpa
|
||||
}
|
||||
prometheus :9153
|
||||
forward . 10.30.14.1
|
||||
cache 30
|
||||
loop
|
||||
reload
|
||||
loadbalance
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue