Skip to content

Commit 1fec2a7

Browse files
authored
feat: update default support bundle spec with PVC check (#4778)
* update default spec with pvcs check * updates for skaffold dev
1 parent 84e4a74 commit 1fec2a7

File tree

5 files changed

+37
-8
lines changed

5 files changed

+37
-8
lines changed

hack/dev/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
if [ "$DEBUG_KOTSADM" = "1" ]; then
4-
/dlv --listen=:40000 --continue --headless=true --api-version=2 --accept-multiclient exec /kotsadm api
4+
/dlv --listen=:30001 --continue --headless=true --api-version=2 --accept-multiclient exec /kotsadm api
55
else
66
/kotsadm api
77
fi

hack/dev/skaffoldcache.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM golang:1.22 as deps
22

3-
RUN go install github.com/go-delve/delve/cmd/dlv@v1.7.2
3+
RUN go install github.com/go-delve/delve/cmd/dlv@v1.22.1
44

55
ENV PROJECTPATH=/go/src/github.com/replicatedhq/kots
66
WORKDIR $PROJECTPATH

kustomize/base/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ spec:
2626
ports:
2727
- name: http
2828
containerPort: 3000
29+
- name: dlv
30+
containerPort: 30001
2931
env:
3032
- name: POD_NAMESPACE
3133
valueFrom:

kustomize/base/service.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@ kind: Service
33
metadata:
44
name: kotsadm
55
labels:
6-
kots.io/kotsadm: 'true'
6+
kots.io/kotsadm: "true"
77
kots.io/backup: velero
88
app: kotsadm
99
annotations:
1010
dev.okteto.com/auto-ingress: "true"
1111
spec:
1212
type: NodePort
1313
ports:
14-
- name: http
15-
port: 3000
16-
targetPort: http
17-
nodePort: 30000
14+
- name: http
15+
port: 3000
16+
targetPort: http
17+
nodePort: 30000
18+
- name: dlv
19+
port: 30001
20+
targetPort: dlv
21+
nodePort: 30001
1822
selector:
1923
app: kotsadm

pkg/supportbundle/staticspecs/defaultspec.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ spec:
9595
selector:
9696
- app=kotsadm
9797
timeout: 10s
98+
- nodeMetrics: {}
9899

99100
analyzers:
100101
- clusterVersion:
@@ -150,4 +151,26 @@ spec:
150151
outcomes:
151152
- fail:
152153
when: "!= Healthy" # Catch all unhealthy pods. A pod is considered healthy if it has a status of Completed, or Running and all of its containers are ready.
153-
message: A Contour pod, {{ .Name }}, is unhealthy with a status of {{ .Status.Reason }}. Restarting the pod may fix the issue.
154+
message: A Contour pod, {{ .Name }}, is unhealthy with a status of {{ .Status.Reason }}. Restarting the pod may fix the issue.
155+
- nodeMetrics:
156+
checkName: kotsadm rqlite PVC usage
157+
filters:
158+
pvc:
159+
nameRegex: "kotsadm-rqlite.*"
160+
outcomes:
161+
- fail:
162+
when: "pvcUsedPercentage >= 80%"
163+
message: "kotsadm-rqlite PVC using more than 80% of storage"
164+
- pass:
165+
message: "kotsadm-rqlite PVC is using less than 80% of storage"
166+
- nodeMetrics:
167+
checkName: kotsadm minio PVC usage
168+
filters:
169+
pvc:
170+
nameRegex: "kotsadm-minio.*"
171+
outcomes:
172+
- fail:
173+
when: "pvcUsedPercentage >= 80%"
174+
message: "kotsadm-minio PVC using more than 80% of storage"
175+
- pass:
176+
message: "kotsadm-minio PVC is using less than 80% of storage"

0 commit comments

Comments
 (0)