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

Adding a Kanister function to create CSI VolumeSnapshot #1163

Merged
merged 46 commits into from
Jan 7, 2022

Conversation

shlokc9
Copy link
Contributor

@shlokc9 shlokc9 commented Dec 28, 2021

Change Overview

This PR consist of a new Kanister function to create CSI VolumeSnapshot along with it's documentation

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

@shlokc9 shlokc9 linked an issue Dec 28, 2021 that may be closed by this pull request
@shlokc9 shlokc9 changed the title Kanister Function: Create CSI VolumeSnapshot Adding a Kanister function to create CSI VolumeSnapshot Dec 29, 2021
Copy link
Contributor

@bathina2 bathina2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Can you add some unit tests? I'll let someone else approve.

pkg/function/create_csi_snapshot.go Outdated Show resolved Hide resolved
pkg/function/create_csi_snapshot.go Outdated Show resolved Hide resolved
pkg/function/create_csi_snapshot.go Outdated Show resolved Hide resolved
pkg/function/create_csi_snapshot.go Outdated Show resolved Hide resolved
pkg/function/create_csi_snapshot.go Show resolved Hide resolved
docs/functions.rst Outdated Show resolved Hide resolved
pkg/function/create_csi_snapshot.go Outdated Show resolved Hide resolved
pkg/function/create_csi_snapshot.go Outdated Show resolved Hide resolved
docs/functions.rst Outdated Show resolved Hide resolved
docs/functions.rst Outdated Show resolved Hide resolved
pkg/function/create_csi_snapshot.go Outdated Show resolved Hide resolved
pkg/function/create_csi_snapshot.go Outdated Show resolved Hide resolved
pkg/function/create_csi_snapshot.go Outdated Show resolved Hide resolved
docs/functions.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@viveksinghggits viveksinghggits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

docs/functions.rst Outdated Show resolved Hide resolved
helm/kanister-operator/templates/rbac.yaml Outdated Show resolved Hide resolved
pkg/function/create_csi_snapshot.go Outdated Show resolved Hide resolved
pkg/function/create_csi_snapshot.go Outdated Show resolved Hide resolved
Copy link
Contributor

@PrasadG193 PrasadG193 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shlokc9
Copy link
Contributor Author

shlokc9 commented Jan 7, 2022

backup action that runs create phase in BP:

actions:
  backup:
    outputArtifacts:
      snapshotInfo:
        keyValue:
          name: "{{ .Phases.createCSISnapshot.Output.name }}"
          pvc: "{{ .Phases.createCSISnapshot.Output.pvc }}"
          namespace: "{{ .Phases.createCSISnapshot.Output.namespace }}"
          restoreSize: "{{ .Phases.createCSISnapshot.Output.restoreSize }}"
          snapshotContent: "{{ .Phases.createCSISnapshot.Output.snapshotContent }}"
    phases:
    - func: CreateCSISnapshot
      name: createCSISnapshot
      args:
        pvc: "{{ .PVC.Name }}"
        namespace: "{{ .PVC.Namespace }}"
        snapshotClass: do-block-storage

@shlokc9 shlokc9 added the kueue label Jan 7, 2022
@mergify mergify bot merged commit 575144e into master Jan 7, 2022
@mergify mergify bot deleted the func-create-csi-snapshot branch January 7, 2022 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants