Skip to content

Commit 7f18b48

Browse files
committed
grafana
1 parent 2986eae commit 7f18b48

File tree

4 files changed

+59
-0
lines changed

4 files changed

+59
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: grafana
5+
labels:
6+
app: grafana
7+
spec:
8+
selector:
9+
app: grafana
10+
ports:
11+
- port: 3001
12+
protocol: TCP
13+
targetPort: 3001
14+
type: ClusterIP

deploy/k8s/base/grafana/grafana.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: grafana
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: grafana
10+
template:
11+
metadata:
12+
labels:
13+
app: grafana
14+
spec:
15+
containers:
16+
- name: grafana
17+
image: grafana/grafana:latest
18+
resources:
19+
requests:
20+
memory: 512Mi
21+
cpu: 100m
22+
limits:
23+
memory: 1Gi
24+
cpu: 200m
25+
ports:
26+
- containerPort: 3001
27+
protocol: TCP
28+
env:
29+
- name: GF_ADMIN_PASSWORD
30+
value: admin_password
31+
volumeMounts:
32+
- name: grafana-data
33+
mountPath: /var/lib/grafana
34+
volumes:
35+
- name: grafana-data
36+
persistentVolumeClaim:
37+
claimName: grafana-data-pvc

deploy/k8s/base/ingress/ingress.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ spec:
1616
name: ws-server
1717
port:
1818
number: 3000
19+
- path: /grafana
20+
pathType: Prefix
21+
backend:
22+
service:
23+
name: grafana
24+
port:
25+
number: 3001
1926
- path: /api
2027
pathType: Prefix
2128
backend:

deploy/k8s/overlays/devops/kustomization.yaml_template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ bases:
33
- "../../base/web"
44
- "../../base/ws-server"
55
- "../../base/score"
6+
- "../../base/grafana"
67

78
patchesStrategicMerge:
89
- "patch_server_replicas.yaml"

0 commit comments

Comments
 (0)