Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry pick health probes #582

Merged
merged 2 commits into from
Dec 10, 2024
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
11 changes: 11 additions & 0 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,17 @@ This removes all the Kubernetes components associated with the chart and deletes
| agents.​ha.​node.​resources.​requests.​cpu | Cpu requests for ha node agent | `"100m"` |
| agents.​ha.​node.​resources.​requests.​memory | Memory requests for ha node agent | `"64Mi"` |
| agents.​ha.​node.​tolerations | Set tolerations, overrides global | `[]` |
| apis.​rest.​healthProbes.​liveness.​enabled | Toggle liveness probe. | `true` |
| apis.​rest.​healthProbes.​liveness.​failureThreshold | No. of failures the liveness probe will tolerate. | `1` |
| apis.​rest.​healthProbes.​liveness.​initialDelaySeconds | No. of seconds of delay before checking the liveness status. | `0` |
| apis.​rest.​healthProbes.​liveness.​periodSeconds | No. of seconds between liveness probe checks. | `30` |
| apis.​rest.​healthProbes.​liveness.​timeoutSeconds | No. of seconds of timeout tolerance. | `5` |
| apis.​rest.​healthProbes.​readiness.​agentCoreProbeFreq | Frequency for the agent-core liveness probe. | `"20s"` |
| apis.​rest.​healthProbes.​readiness.​enabled | Toggle readiness probe. | `true` |
| apis.​rest.​healthProbes.​readiness.​failureThreshold | No. of failures the readiness probe will tolerate. | `2` |
| apis.​rest.​healthProbes.​readiness.​initialDelaySeconds | No. of seconds of delay before checking the readiness status. | `0` |
| apis.​rest.​healthProbes.​readiness.​periodSeconds | No. of seconds between readiness probe checks. | `20` |
| apis.​rest.​healthProbes.​readiness.​timeoutSeconds | No. of seconds of timeout tolerance. | `5` |
| apis.​rest.​logLevel | Log level for the rest service | `"info"` |
| apis.​rest.​priorityClassName | Set PriorityClass, overrides global. If both local and global are not set, the final deployment manifest has a mayastor custom critical priority class assigned to the pod by default. Refer the `templates/_helpers.tpl` and `templates/mayastor/apis/rest/api-rest-deployment.yaml` for more details. | `""` |
| apis.​rest.​replicaCount | Number of replicas of rest | `1` |
Expand Down
23 changes: 23 additions & 0 deletions chart/templates/mayastor/apis/api-rest-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ spec:
- "--core-grpc=https://{{ .Release.Name }}-agent-core:50051"
- "--ansi-colors={{ .Values.base.logging.color }}"
- "--fmt-style={{ include "logFormat" . }}"
{{- if .Values.apis.rest.healthProbes.readiness.enabled }}
- "--core-health-freq={{ .Values.apis.rest.healthProbes.readiness.agentCoreProbeFreq }}"
{{- end }}
ports:
- containerPort: 8080
- containerPort: 8081
Expand All @@ -63,3 +66,23 @@ spec:
- name: RUST_LOG_SILENCE
value: {{ default .Values.base.logging.silenceLevel .Values.apis.rest.logSilenceLevel }}
{{- end }}
{{- if .Values.apis.rest.healthProbes.readiness.enabled }}
readinessProbe:
httpGet:
path: /ready
port: 8081
failureThreshold: {{ .Values.apis.rest.healthProbes.readiness.failureThreshold }}
initialDelaySeconds: {{ .Values.apis.rest.healthProbes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.apis.rest.healthProbes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.apis.rest.healthProbes.readiness.timeoutSeconds }}
{{- end }}
{{- if .Values.apis.rest.healthProbes.liveness.enabled }}
livenessProbe:
httpGet:
path: /live
port: 8081
failureThreshold: {{ .Values.apis.rest.healthProbes.liveness.failureThreshold }}
initialDelaySeconds: {{ .Values.apis.rest.healthProbes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.apis.rest.healthProbes.liveness.periodSeconds }}
timeoutSeconds: {{ .Values.apis.rest.healthProbes.liveness.timeoutSeconds }}
{{- end }}
25 changes: 25 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,31 @@ apis:
rest:
# -- Log level for the rest service
logLevel: info
healthProbes:
readiness:
# -- Toggle readiness probe.
enabled: true
# -- Frequency for the agent-core liveness probe.
agentCoreProbeFreq: "20s"
# -- No. of failures the readiness probe will tolerate.
failureThreshold: 2
# -- No. of seconds of delay before checking the readiness status.
initialDelaySeconds: 0
# -- No. of seconds between readiness probe checks.
periodSeconds: 20
# -- No. of seconds of timeout tolerance.
timeoutSeconds: 5
liveness:
# -- Toggle liveness probe.
enabled: true
# -- No. of failures the liveness probe will tolerate.
failureThreshold: 1
# -- No. of seconds of delay before checking the liveness status.
initialDelaySeconds: 0
# -- No. of seconds between liveness probe checks.
periodSeconds: 30
# -- No. of seconds of timeout tolerance.
timeoutSeconds: 5
# -- Number of replicas of rest
replicaCount: 1
resources:
Expand Down
2 changes: 1 addition & 1 deletion dependencies/control-plane
Submodule control-plane updated 51 files
+26 −15 Cargo.lock
+4 −1 control-plane/agents/src/bin/core/tests/event/mod.rs
+5 −1 control-plane/agents/src/bin/core/tests/pool/mod.rs
+5 −1 control-plane/agents/src/bin/core/tests/volume/garbage_collection.rs
+29 −11 control-plane/agents/src/bin/core/tests/volume/mod.rs
+20 −0 control-plane/agents/src/bin/core/volume/operations.rs
+5 −3 control-plane/csi-driver/Cargo.toml
+3 −1 control-plane/csi-driver/src/bin/controller/client.rs
+53 −59 control-plane/csi-driver/src/bin/controller/controller.rs
+7 −72 control-plane/csi-driver/src/bin/controller/server.rs
+3 −3 control-plane/csi-driver/src/bin/node/block_vol.rs
+1 −1 control-plane/csi-driver/src/bin/node/dev.rs
+97 −34 control-plane/csi-driver/src/bin/node/dev/nvmf.rs
+8 −8 control-plane/csi-driver/src/bin/node/filesystem_ops.rs
+14 −12 control-plane/csi-driver/src/bin/node/filesystem_vol.rs
+1 −0 control-plane/csi-driver/src/bin/node/main.rs
+5 −70 control-plane/csi-driver/src/bin/node/main_.rs
+11 −0 control-plane/csi-driver/src/bin/node/match_dev.rs
+162 −113 control-plane/csi-driver/src/bin/node/mount.rs
+46 −35 control-plane/csi-driver/src/bin/node/node.rs
+48 −0 control-plane/csi-driver/src/bin/node/runtime.rs
+2 −0 control-plane/csi-driver/src/lib.rs
+51 −0 control-plane/csi-driver/src/trace.rs
+2 −0 control-plane/grpc/proto/v1/volume/volume.proto
+12 −1 control-plane/grpc/src/operations/volume/traits.rs
+1 −0 control-plane/rest/Cargo.toml
+7 −0 control-plane/rest/openapi-specs/v0_api_spec.yaml
+54 −0 control-plane/rest/service/src/health/core_state.rs
+28 −0 control-plane/rest/service/src/health/handlers.rs
+4 −0 control-plane/rest/service/src/health/mod.rs
+31 −12 control-plane/rest/service/src/main.rs
+6 −2 control-plane/rest/service/src/v0/volumes.rs
+83 −2 control-plane/rest/tests/v0_test.rs
+4 −1 control-plane/stor-port/src/types/v0/transport/volume.rs
+4 −0 deployer/src/infra/rest.rs
+4 −0 deployer/src/lib.rs
+6 −1 scripts/python/test-residue-cleanup.sh
+0 −1 scripts/python/test.sh
+1 −1 shell.nix
+18 −2 tests/bdd/README.md
+20 −3 tests/bdd/common/deployer.py
+6 −0 tests/bdd/common/docker.py
+23 −5 tests/bdd/common/nvme.py
+7 −1 tests/bdd/features/csi/controller/controller.feature
+38 −0 tests/bdd/features/csi/controller/test_controller.py
+13 −0 tests/bdd/features/csi/node/node.feature
+111 −7 tests/bdd/features/csi/node/test_node.py
+12 −0 tests/bdd/features/health_probes/readiness_probe.feature
+118 −0 tests/bdd/features/health_probes/test_readiness_probe.py
+5 −1 tests/io-engine/tests/rebuild.rs
+1 −1 utils/pstor-usage/src/volumes.rs
Loading