feat: add pre-deployment checks#3573
Conversation
WalkthroughIntroduces a Bash pre-deployment check script for Kubernetes-based Dynamo deployments and a README documenting its usage. The script validates kubectl connectivity, default StorageClass presence, and GPU-enabled nodes, aggregates results, prints a summary, and sets exit status based on failures. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant S as pre-deployment-check.sh
participant K as kubectl
participant C as Kubernetes Cluster
U->>S: Run script
activate S
Note over S: Initialize CHECK_ORDER and CHECK_RESULTS
rect rgba(200,235,255,0.3)
S->>K: kubectl version / cluster-info
K->>C: Connect
C-->>K: Response / Error
K-->>S: Connectivity result
Note over S: Record PASS/FAIL (kubectl connectivity)
end
rect rgba(220,255,220,0.3)
S->>K: kubectl get storageclass -o json
K->>C: Query StorageClasses
C-->>K: SC list
K-->>S: SC data
Note over S: Check default SC presence / multiple defaults<br/>Provide commands if missing/multiple
end
rect rgba(255,235,200,0.3)
S->>K: kubectl get nodes -L nvidia.com/gpu.present
K->>C: Query nodes/labels
C-->>K: Node list
K-->>S: Labeled GPU node count
Note over S: Record GPU availability
end
S-->>U: Print per-check results and summary
S-->>U: Exit 0 if all PASS, else non-zero
deactivate S
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
deploy/cloud/pre-deployment/README.md (1)
33-103: Add language identifiers to fenced blocks.markdownlint is flagging the output/tips code fences because they lack language specifiers (MD040). Please tag them with something like
textorconsoleso the doc passes lint.Also applies to: 129-137
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
deploy/cloud/pre-deployment/README.md(1 hunks)deploy/cloud/pre-deployment/pre-deployment-check.sh(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Copyright Checks
deploy/cloud/pre-deployment/pre-deployment-check.sh
[error] 1-1: Copyright check failed: Invalid/Missing Header detected in deploy/cloud/pre-deployment/pre-deployment-check.sh.
🪛 markdownlint-cli2 (0.18.1)
deploy/cloud/pre-deployment/README.md
33-33: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
76-76: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
129-129: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🪛 Shellcheck (0.11.0)
deploy/cloud/pre-deployment/pre-deployment-check.sh
[warning] 97-97: provisioner appears unused. Verify use (or export if used externally).
(SC2034)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build and Test - dynamo
|
/ok to test 9f5edfc |
|
/ok to test 969fec8 |
mohammedabdulwahhab
left a comment
There was a problem hiding this comment.
LGTM, It would be interesting to run this as a pre-install hook for dynamo cloud. That way customers will have this in the critical path.
|
/ok to test 95fa843 |
|
/ok to test 95fa843 |
|
/ok to test 5096ac6 |
|
/ok to test 74c5e7e |
Overview:
This directory contains a pre-deployment check script that verifies if Kubernetes cluster meets the requirements for deploying Dynamo.
includes #3584, #3574
Sample Successful checkSample Failed checkWhere should the reviewer start?
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)