Skip to content

Commit b4f99b5

Browse files
committed
Kubernetes: Refactor dashy configuration with consistent namespace and labels, enhance resource management, and improve probe settings
Signed-off-by: NotHarshhaa <[email protected]>
1 parent c1474ba commit b4f99b5

File tree

1 file changed

+39
-2
lines changed

1 file changed

+39
-2
lines changed

Diff for: dashboards/dashy/dashy.yml

+39-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
21
apiVersion: v1
32
kind: PersistentVolumeClaim
43
metadata:
54
name: dashy
5+
namespace: dashy-namespace
6+
labels:
7+
app: dashy
68
spec:
79
accessModes:
810
- ReadWriteMany
@@ -14,6 +16,9 @@ apiVersion: apps/v1
1416
kind: Deployment
1517
metadata:
1618
name: dashy
19+
namespace: dashy-namespace
20+
labels:
21+
app: dashy
1722
spec:
1823
replicas: 1
1924
selector:
@@ -32,16 +37,37 @@ spec:
3237
volumeMounts:
3338
- mountPath: /app/public/
3439
name: dashy
40+
resources:
41+
requests:
42+
memory: "256Mi"
43+
cpu: "250m"
44+
limits:
45+
memory: "512Mi"
46+
cpu: "500m"
47+
readinessProbe:
48+
httpGet:
49+
path: /
50+
port: 80
51+
initialDelaySeconds: 5
52+
periodSeconds: 10
53+
livenessProbe:
54+
httpGet:
55+
path: /
56+
port: 80
57+
initialDelaySeconds: 10
58+
periodSeconds: 15
3559
volumes:
3660
- name: dashy
3761
persistentVolumeClaim:
3862
claimName: dashy
3963
---
40-
# A Single-use pod to create the content of /app/public in the PV
4164
apiVersion: v1
4265
kind: Pod
4366
metadata:
4467
name: dashy-seeder
68+
namespace: dashy-namespace
69+
labels:
70+
app: dashy
4571
spec:
4672
restartPolicy: OnFailure
4773
containers:
@@ -52,6 +78,13 @@ spec:
5278
volumeMounts:
5379
- mountPath: /mnt/public
5480
name: dashy-seeder
81+
resources:
82+
requests:
83+
memory: "128Mi"
84+
cpu: "100m"
85+
limits:
86+
memory: "256Mi"
87+
cpu: "200m"
5588
volumes:
5689
- name: dashy-seeder
5790
persistentVolumeClaim:
@@ -61,10 +94,14 @@ apiVersion: v1
6194
kind: Service
6295
metadata:
6396
name: dashy
97+
namespace: dashy-namespace
98+
labels:
99+
app: dashy
64100
spec:
65101
ports:
66102
- port: 80
67103
nodePort: 30004
104+
targetPort: 80
68105
selector:
69106
app: dashy
70107
type: NodePort

0 commit comments

Comments
 (0)