Skip to content

Commit

Permalink
docs: Add strategy docs (#257)
Browse files Browse the repository at this point in the history
* docs: Add strategy docs

Added a link in readme to point to strategies source code and comments in existing strategies on how to call them and what they do.

* Update pkg/strategies/import.go

Co-authored-by: Jens L. <jens@beryju.org>

---------

Co-authored-by: Jens L. <jens@beryju.org>
  • Loading branch information
leon-gorissen and BeryJu committed Apr 26, 2024
1 parent b3a62f5 commit 606aa90
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -38,6 +38,9 @@ Flags:
requires at least 1 arg(s), only received 0
```

#### Strategies
To see existing [strategies](https://github.com/BeryJu/korb/tree/main/pkg/strategies) and what they do, please check out the comments in source code of the strategy.

### Example (Moving from PVC to PVC)

```
Expand Down
3 changes: 3 additions & 0 deletions pkg/strategies/copyTwiceName.go
@@ -1,3 +1,6 @@
// flag: copy-twice-name
// Behavior: Copy the PVC to the new Storage class and with new size and a new name, delete the old PVC, and copy it back to the old name.

package strategies

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/strategies/export.go
@@ -1,3 +1,6 @@
// flag: export
// Behavior: Exports a tar archive of the pvc to your $pwd

package strategies

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/strategies/import.go
@@ -1,3 +1,6 @@
// flag: import
// Behavior: Imports a tar archive into pvc

package strategies

import (
Expand Down

0 comments on commit 606aa90

Please sign in to comment.