Skip to content

Commit 84798e4

Browse files
committed
Kubernetes: Add namespace and labels to homarr resources, implement readiness and liveness probes, and update service type to ClusterIP
Signed-off-by: NotHarshhaa <[email protected]>
1 parent 0bea466 commit 84798e4

File tree

1 file changed

+48
-5
lines changed

1 file changed

+48
-5
lines changed

Diff for: dashboards/homarr/homarr.yml

+48-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ apiVersion: v1
22
kind: PersistentVolumeClaim
33
metadata:
44
name: homarr-configs
5+
namespace: homarr
6+
labels:
7+
app: homarr
58
spec:
69
accessModes:
710
- ReadWriteMany
@@ -13,6 +16,9 @@ apiVersion: v1
1316
kind: PersistentVolumeClaim
1417
metadata:
1518
name: homarr-icons
19+
namespace: homarr
20+
labels:
21+
app: homarr
1622
spec:
1723
accessModes:
1824
- ReadWriteMany
@@ -24,6 +30,9 @@ apiVersion: v1
2430
kind: PersistentVolumeClaim
2531
metadata:
2632
name: homarr-data
33+
namespace: homarr
34+
labels:
35+
app: homarr
2736
spec:
2837
accessModes:
2938
- ReadWriteOnce
@@ -35,6 +44,9 @@ apiVersion: apps/v1
3544
kind: Deployment
3645
metadata:
3746
name: homarr
47+
namespace: homarr
48+
labels:
49+
app: homarr
3850
spec:
3951
replicas: 1
4052
selector:
@@ -50,16 +62,35 @@ spec:
5062
image: ghcr.io/ajnart/homarr:0.14.4
5163
ports:
5264
- containerPort: 7575
53-
env:
54-
- name: PASSWORD
55-
value: mypassword
65+
envFrom:
66+
- secretRef:
67+
name: homarr-secret
68+
resources:
69+
requests:
70+
memory: "256Mi"
71+
cpu: "250m"
72+
limits:
73+
memory: "512Mi"
74+
cpu: "500m"
5675
volumeMounts:
5776
- mountPath: /data
5877
name: homarr-data
5978
- mountPath: /app/data/configs
6079
name: homarr-configs
6180
- mountPath: /app/public/icons
6281
name: homarr-icons
82+
readinessProbe:
83+
httpGet:
84+
path: /
85+
port: 7575
86+
initialDelaySeconds: 5
87+
periodSeconds: 10
88+
livenessProbe:
89+
httpGet:
90+
path: /
91+
port: 7575
92+
initialDelaySeconds: 10
93+
periodSeconds: 20
6394
volumes:
6495
- name: homarr-configs
6596
persistentVolumeClaim:
@@ -75,10 +106,22 @@ apiVersion: v1
75106
kind: Service
76107
metadata:
77108
name: homarr
109+
namespace: homarr
110+
labels:
111+
app: homarr
78112
spec:
79113
ports:
80114
- port: 7575
81-
nodePort: 30008
115+
targetPort: 7575
82116
selector:
83117
app: homarr
84-
type: NodePort
118+
type: ClusterIP
119+
---
120+
apiVersion: v1
121+
kind: Secret
122+
metadata:
123+
name: homarr-secret
124+
namespace: homarr
125+
type: Opaque
126+
data:
127+
PASSWORD: bXlwYXNzd29yZA== # Base64 encoded value of "mypassword"

0 commit comments

Comments
 (0)