-
Notifications
You must be signed in to change notification settings - Fork 54
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
ci: fix backup related test cases fail on talos #2226
Conversation
Signed-off-by: Yang Chiu <[email protected]>
WalkthroughThe pull request modifies Kubernetes deployment configurations for MinIO and NFS backup stores in the Longhorn test environment. The key changes involve replacing Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
manager/integration/deploy/backupstores/minio-backupstore.yaml (1)
Line range hint
1-40
: Consider using a secure secret management systemWhile the secret configuration is functional, storing sensitive data (certificates, keys) directly in YAML files, even when base64 encoded, is not ideal from a security perspective.
Consider:
- Using a secure secret management system (e.g., HashiCorp Vault, AWS Secrets Manager)
- Implementing dynamic secret injection
- Documenting that this configuration is for testing purposes only
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
manager/integration/deploy/backupstores/minio-backupstore.yaml
(1 hunks)manager/integration/deploy/backupstores/nfs-backupstore.yaml
(1 hunks)
🔇 Additional comments (3)
manager/integration/deploy/backupstores/nfs-backupstore.yaml (1)
17-26
: LGTM! Node affinity configuration improves compatibility with Talos
The replacement of nodeSelector with nodeAffinity is a good change that improves compatibility with Talos Kubernetes clusters while maintaining functionality on traditional clusters. The configuration properly handles both cases where the control-plane label value is "true" or empty.
manager/integration/deploy/backupstores/minio-backupstore.yaml (2)
44-53
: LGTM! Consistent node affinity configuration
The nodeAffinity configuration matches the NFS backupstore, maintaining consistency across both backup store deployments. This change properly handles both traditional Kubernetes and Talos clusters.
Line range hint 1-53
: Verify other backup store configurations
Let's check if there are any other backup store configurations that might need similar updates for Talos compatibility.
✅ Verification successful
Backup store configurations are consistently updated
Based on the search results, I can confirm that:
-
There are two backup store configurations in the codebase:
manager/integration/deploy/backupstores/minio-backupstore.yaml
manager/integration/deploy/backupstores/nfs-backupstore.yaml
-
Both configurations have been updated with the same node affinity rules that support Talos compatibility:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: In
values:
- "true"
The changes are consistent across both backup store configurations, ensuring proper Talos compatibility throughout the codebase.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for other backup store configurations that might need similar updates
echo "Searching for other backup store configurations..."
fd -e yaml -e yml | xargs rg -l "nodeSelector.*control-plane"
echo "Searching for other potential secret configurations..."
fd -e yaml -e yml | xargs rg -l "kind: Secret.*minio-secret"
Length of output: 356
Script:
#!/bin/bash
# Let's try a different approach to search for backup store configurations and node affinity rules
# Search for yaml files containing backup store configurations
echo "=== Searching for backup store yaml files ==="
fd backupstore
# Search for node affinity or nodeSelector patterns
echo -e "\n=== Searching for node affinity patterns ==="
rg -A 5 "nodeAffinity|nodeSelector" --type yaml
# Search for minio-related configurations
echo -e "\n=== Searching for minio configurations ==="
rg -l "minio|AWS_" --type yaml
Length of output: 3116
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Which issue(s) this PR fixes:
Issue longhorn/longhorn#10063
What this PR does / why we need it:
fix backup related test cases fail on talos
Special notes for your reviewer:
Additional documentation or context
Summary by CodeRabbit
New Features
minio-secret
created in thelonghorn-system
namespace for sensitive data management.Bug Fixes
longhorn-test-minio
andlonghorn-test-nfs
deployments.