Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/topolvm/assets/03-topolvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,13 @@ spec:
mountPropagation: "Bidirectional"
- name: devices-dir
mountPath: /dev
startupProbe:
failureThreshold: 60
periodSeconds: 2
timeoutSeconds: 3
httpGet:
port: healthz
path: /healthz
- name: csi-registrar
image: "ghcr.io/topolvm/topolvm-with-sidecar:0.36.2"
command:
Expand Down Expand Up @@ -984,18 +991,29 @@ spec:
path: /readyz
port: readyz
scheme: HTTP
timeoutSeconds: 3
failureThreshold: 3
periodSeconds: 60
livenessProbe:
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 10
timeoutSeconds: 3
periodSeconds: 60
failureThreshold: 3
volumeMounts:
- name: socket-dir
mountPath: /run/topolvm
- name: certs
mountPath: /certs
startupProbe:
failureThreshold: 3
periodSeconds: 60
timeoutSeconds: 3
httpGet:
port: healthz
path: /healthz
- name: csi-provisioner
image: "ghcr.io/topolvm/topolvm-with-sidecar:0.36.2"
command:
Expand Down
38 changes: 29 additions & 9 deletions src/topolvm/generate_manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,40 @@ EOF
# Patch replicas to 1
# shellcheck disable=SC2016
yq 'select(.kind == "Deployment").spec.replicas = 1' -i "${ASSETS_DIR}/03-topolvm.yaml"

# Patch topolvm-controller manifest with longer startup delay to allow dns to start
yq 'with(select(.kind == "Deployment" and .metadata.name == "topolvm-controller").spec.template.spec.containers[] | select(.name == "topolvm-controller");
.livenessProbe.failureThreshold = 3 |
.readinessProbe.timeoutSeconds = 3 |
.readinessProbe.failureThreshold = 3 |
.readinessProbe.periodSeconds = 60 |
.startupProbe = {
"failureThreshold": 3,
"periodSeconds": 60,
"timeoutSeconds": 3,
"httpGet": {
"port": "healthz",
"path": "/healthz"}
}
)' -i "${ASSETS_DIR}/03-topolvm.yaml"
Comment thread
ggiguash marked this conversation as resolved.

# Patch topolvm-node DaemonSet with probes
# echo 'Patching topolvm-node DaemonSet with longer startup delay to allow dns to start'
yq 'with(select(.kind == "DaemonSet" and .metadata.name == "topolvm-node").spec.template.spec.containers[] | select(.name == "topolvm-node");
.startupProbe = {
"failureThreshold": 60,
"periodSeconds": 2,
"timeoutSeconds": 3,
"httpGet": {
"port": "healthz",
"path": "/healthz"
}
})' -i "${ASSETS_DIR}/03-topolvm.yaml"

# Generate kustomize
cat >"${ASSETS_DIR}/kustomization.yaml" <<'EOF'
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- 01-namespace.yaml
- 02-cert-manager.yaml
- 03-topolvm.yaml
EOF

cat >"${ASSETS_DIR}/kustomization.yaml" <<'EOF'
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- 01-namespace.yaml
- 02-cert-manager.yaml
Expand Down
Loading