linstor: add basic snapshot functionality - #651
Conversation
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
WalkthroughThis pull request updates the linstor release configurations by adding a new dependency ( Changes
Sequence Diagram(s)sequenceDiagram
participant Deployment
participant PlungerContainer
participant PlungerScript
participant LinstorAPI
Deployment->>PlungerContainer: Launch linstor-plunger pod
PlungerContainer->>PlungerScript: Execute /scripts/plunger.sh
PlungerScript->>LinstorAPI: Retrieve resource list (filter DELETE flag)
LinstorAPI-->>PlungerScript: Return list of deletable snapshots
PlungerScript->>LinstorAPI: Execute 'linstor snapshot delete' for each snapshot
Possibly related PRs
Suggested labels
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/system/linstor/templates/plunger/configmap.yaml (1)
11-11: Remove Trailing Whitespace
Line 11 appears to have trailing spaces. Please remove them to comply with YAML linting standards.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 11-11: trailing spaces
(trailing-spaces)
packages/system/linstor/templates/plunger/plunger.yaml (1)
1-53: New Deployment for linstor-plunger Added
The Deployment configuration forlinstor-plungeris well-structured. It correctly mounts the required volumes (client TLS, linstor configuration, and the plunger script) and employs a checksum annotation to trigger pod restarts on ConfigMap updates. Moreover, the specified tolerations and service account look appropriate for isolating this functionality.Suggestion: Consider evaluating whether a more minimal container image might suffice for running just the plunger script, thereby reducing the attack surface.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
packages/core/platform/bundles/distro-full.yaml(1 hunks)packages/core/platform/bundles/paas-full.yaml(1 hunks)packages/system/linstor/templates/plunger/configmap.yaml(1 hunks)packages/system/linstor/templates/plunger/plunger.yaml(1 hunks)packages/system/linstor/templates/volumesnapshotclass.yaml(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/system/linstor/templates/volumesnapshotclass.yaml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
packages/system/linstor/templates/plunger/configmap.yaml
[error] 11-11: trailing spaces
(trailing-spaces)
🔇 Additional comments (4)
packages/system/linstor/templates/plunger/configmap.yaml (1)
1-16: New ConfigMap for Plunger Script Added
This ConfigMap introduces the basic snapshot cleanup script that uses the linstor CLI combined with jq to identify resources marked for deletion. Ensure that its behavior is validated in your test environment.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 11-11: trailing spaces
(trailing-spaces)
packages/core/platform/bundles/paas-full.yaml (2)
203-209: Update linstor Dependency
Thelinstorrelease now lists[piraeus-operator,cilium,kubeovn,cert-manager,snapshot-controller]as dependencies. This update ensures that the snapshot-controller is deployed beforehand, aligning with the new snapshot functionality.
210-214: Verify snapshot-controller Dependencies
Thesnapshot-controllerrelease depends on[cilium,kubeovn,cert-manager-issuers]. Please verify that this dependency ordering is intentional and that all required resources will be available at runtime.packages/core/platform/bundles/distro-full.yaml (1)
172-178: Update linstor Dependency in Distro Bundle
The dependency list for thelinstorrelease now includessnapshot-controlleralongside[piraeus-operator,cilium,cert-manager]. This update is consistent with the changes made in the PaaS bundle. Please ensure that the ordering is validated across deployment environments.
Signed-off-by: Andrei Kvapil kvapss@gmail.com
Summary by CodeRabbit