Skip to content

Commit b4944ea

Browse files
chore: remove legacy engines from the flow
Signed-off-by: Abhinandan Purkait <[email protected]>
1 parent 2e58733 commit b4944ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+608
-10270
lines changed

.github/workflows/go.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88

9-
- name: Set up Go 1.18.3
10-
uses: actions/setup-go@v2
9+
- name: Set up Go 1.19
10+
uses: actions/setup-go@v4
1111
with:
12-
go-version: 1.18.3
13-
id: go_3
12+
go-version: 1.19.9
13+
cache: false
1414

1515
- name: Checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717

1818
- name: Run Deps Check
1919
run: make verify-deps
@@ -23,14 +23,14 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525

26-
- name: Set up Go 1.18.3
27-
uses: actions/setup-go@v2
26+
- name: Set up Go 1.19
27+
uses: actions/setup-go@v4
2828
with:
29-
go-version: 1.18.3
30-
id: go
29+
go-version: 1.19.9
30+
cache: false
3131

3232
- name: Checkout
33-
uses: actions/checkout@v2
33+
uses: actions/checkout@v4
3434

3535
- name: Build Openebsctl
3636
run: make openebsctl

.github/workflows/golangci-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
name: lint
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1515
- name: golangci-lint
16-
uses: golangci/golangci-lint-action@v2
16+
uses: golangci/golangci-lint-action@v4
1717
with:
18-
version: v1.46.2
18+
version: v1.54

.github/workflows/release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
21-
- name: Set up Go
22-
uses: actions/setup-go@v2
21+
- name: Set up Go 1.19
22+
uses: actions/setup-go@v4
2323
with:
24-
go-version: 1.18.3
24+
go-version: 1.19.9
25+
cache: false
2526
- name: Run GoReleaser
26-
uses: goreleaser/goreleaser-action@v2
27+
uses: goreleaser/goreleaser-action@v5
2728
with:
2829
distribution: goreleaser
2930
version: latest

.github/workflows/test-coverage.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 2
16-
- uses: actions/setup-go@v2
16+
- name: Set up Go 1.19
17+
uses: actions/setup-go@v4
1718
with:
18-
go-version: '1.17.7'
19+
go-version: 1.19.9
20+
cache: false
1921
- name: Run coverage
2022
run: go test ./... --coverprofile=coverage.out --covermode=atomic
2123
- name: Upload coverage to Codecov
22-
uses: codecov/codecov-action@v2
24+
uses: codecov/codecov-action@v4

.tours/first.tour

Lines changed: 0 additions & 72 deletions
This file was deleted.

README.md

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ OpenEBSCTL is a kubectl plugin to manage OpenEBS storage components.
1818
## Project Status
1919

2020
**Alpha**. Under active development and seeking [contributions from the community](#contributing).
21-
The CLI currently supports managing `cStor`, `Jiva`, `LocalPV-LVM`, `LocalPV-ZFS` Cas-Engines.
21+
The CLI currently supports managing `LocalPV-LVM`, `LocalPV-ZFS` and `LocalPV-HostPath` Engines.
2222

2323
## Table of Contents
2424
* [Installation](#installation)
@@ -59,44 +59,33 @@ OpenEBSCTL is available on Linux, macOS and Windows platforms.
5959
- `cd openebsctl`
6060
- Run `make openebsctl`
6161

62-
## Code Walkthrough
63-
64-
1. Install [vscode](https://code.visualstudio.com/)
65-
2. Install [CodeTour plugin](https://marketplace.visualstudio.com/items?itemName=vsls-contrib.codetour) on vscode
66-
3. Open this project on vscode & press `[ctrl] + [shift] + [p]` or `[command] + [shift] + [p]` and click `CodeTour: Open The Tour File` and locate the appropriate `*.tour` file. The code walkthrough will begin. Happy Contributing!
67-
6862
## Usage
6963

7064
* ```bash
7165
$ kubectl openebs
72-
openebs is a a kubectl plugin for interacting with OpenEBS storage components such as storage(pools, volumegroups), volumes, blockdevices, pvcs.
66+
kubectl openebs is a a kubectl plugin for interacting with OpenEBS storage components such as storage(zfspools, volumegroups), volumes, pvcs.
7367
Find out more about OpenEBS on https://openebs.io/
74-
68+
7569
Usage:
76-
kubectl openebs [command] [resource] [...names] [flags]
70+
openebs [command]
7771

7872
Available Commands:
79-
completion Outputs shell completion code for the specified shell (bash or zsh)
80-
describe Provide detailed information about an OpenEBS resource
81-
get Provides fetching operations related to a Volume/Pool
82-
help Help about any command
83-
version Shows openebs kubectl plugin's version
73+
cluster-info Show component version, status and running components for each installed engine
74+
completion Outputs shell completion code for the specified shell (bash or zsh)
75+
describe Provide detailed information about an OpenEBS resource
76+
get Provides fetching operations related to a Volume/Storage
77+
help Help about any command
78+
version Shows openebs kubectl plugin's version
8479
8580
Flags:
86-
-h, --help help for openebs
87-
-n, --namespace string If present, the namespace scope for this CLI request
88-
--openebs-namespace string to read the openebs namespace from user.
89-
If not provided it is determined from components.
90-
--cas-type to specify the cas-type of the engine, for engine based filtering.
91-
ex- cstor, jiva, localpv-lvm, localpv-zfs.
92-
--debug to launch the debugging mode for cstor pvcs.
81+
-h, --help help for openebs
82+
-c, --kubeconfig string path to config file
83+
-v, --version version for openebs
9384
94-
Use "kubectl openebs command --help" for more information about a command.
85+
Use "openebs [command] --help" for more information about a command.
9586
```
9687
9788
* To know more about various engine specific commands check these:-
98-
* [cStor](docs/cstor/README.md)
99-
* [Jiva](docs/jiva/README.md)
10089
* [LocalPV-LVM](docs/localpv-lvm/README.md)
10190
* [LocalPV-ZFS](docs/localpv-zfs/README.md)
10291

cmd/clusterinfo/cluster-info.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ import (
2222
"github.com/spf13/cobra"
2323
)
2424

25-
const (
26-
clusterInfoCmdHelp = `Usage:
27-
kubectl openebs cluster-info
28-
Flags:
29-
-h, --help help for openebs get command
30-
`
31-
)
32-
3325
// NewCmdClusterInfo shows OpenEBSCTL cluster-info
3426
func NewCmdClusterInfo(rootCmd *cobra.Command) *cobra.Command {
3527
cmd := &cobra.Command{
@@ -39,6 +31,5 @@ func NewCmdClusterInfo(rootCmd *cobra.Command) *cobra.Command {
3931
util.CheckErr(clusterinfo.ShowClusterInfo(), util.Fatal)
4032
},
4133
}
42-
cmd.SetUsageTemplate(clusterInfoCmdHelp)
4334
return cmd
4435
}

cmd/completion/completion.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"os"
2222

2323
"github.com/spf13/cobra"
24-
"k8s.io/klog"
24+
"k8s.io/klog/v2"
2525
)
2626

2727
const (
@@ -49,7 +49,7 @@ func NewCmdCompletion(rootCmd *cobra.Command) *cobra.Command {
4949
cmd := &cobra.Command{
5050
Use: "completion",
5151
ValidArgs: []string{"bash", "zsh"},
52-
Args: cobra.ExactValidArgs(1),
52+
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
5353
Short: "Outputs shell completion code for the specified shell (bash or zsh)",
5454
PersistentPreRun: func(cmd *cobra.Command, args []string) {
5555
},

cmd/describe/describe.go

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,44 +20,17 @@ import (
2020
"github.com/spf13/cobra"
2121
)
2222

23-
const (
24-
volumeCommandHelpText = `Show detailed description of a specific OpenEBS resource:
25-
26-
Usage:
27-
kubectl openebs describe [volume|storage|pvc] [...names] [flags]
28-
29-
Describe a Volume:
30-
kubectl openebs describe volume [...names] [flags]
31-
32-
Describe PVCs present in the same namespace:
33-
kubectl openebs describe pvc [...names] [flags]
34-
35-
Describe a Storage :
36-
kubectl openebs describe storage [...names] [flags]
37-
38-
Flags:
39-
-h, --help help for openebs
40-
-n, --namespace string to read the namespace for the pvc.
41-
--openebs-namespace string to read the openebs namespace from user.
42-
If not provided it is determined from components.
43-
--cas-type to specify the cas-type of the engine, for engine based filtering.
44-
ex- cstor, jiva, localpv-lvm, localpv-zfs.
45-
--debug to launch the debugging mode for cstor pvcs.
46-
`
47-
)
48-
4923
// NewCmdDescribe provides options for managing OpenEBS Volume
5024
func NewCmdDescribe(rootCmd *cobra.Command) *cobra.Command {
5125
cmd := &cobra.Command{
5226
Use: "describe",
53-
ValidArgs: []string{"pool", "volume", "pvc"},
27+
ValidArgs: []string{"storage", "volume", "pvc"},
5428
Short: "Provide detailed information about an OpenEBS resource",
5529
}
5630
cmd.AddCommand(
5731
NewCmdDescribeVolume(),
5832
NewCmdDescribePVC(),
5933
NewCmdDescribeStorage(),
6034
)
61-
cmd.SetUsageTemplate(volumeCommandHelpText)
6235
return cmd
6336
}

cmd/describe/pvc.go

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,10 @@ import (
2222
"github.com/spf13/cobra"
2323
)
2424

25-
var (
26-
pvcInfoCommandHelpText = `This command fetches information and status of the various aspects
27-
of the PersistentVolumeClaims and its underlying related resources
28-
in the provided namespace. If no namespace is provided it uses default
29-
namespace for execution.
30-
31-
Usage:
32-
kubectl openebs describe pvc [...names] [flags]
33-
34-
Flags:
35-
-h, --help help for openebs
36-
-n, --namespace string to read the namespace for the pvc.
37-
--openebs-namespace string to read the openebs namespace from user.
38-
If not provided it is determined from components.
39-
--debug to launch the debugging mode for cstor pvcs.
40-
`
41-
)
42-
4325
// NewCmdDescribePVC Displays the pvc describe details
4426
func NewCmdDescribePVC() *cobra.Command {
45-
var debug bool
27+
var openebsNs string
28+
var pvNs string
4629
cmd := &cobra.Command{
4730
Use: "pvc",
4831
Aliases: []string{"pvcs", "persistentvolumeclaims", "persistentvolumeclaim"},
@@ -53,15 +36,10 @@ func NewCmdDescribePVC() *cobra.Command {
5336
pvNs = "default"
5437
}
5538
openebsNamespace, _ = cmd.Flags().GetString("openebs-namespace")
56-
if debug {
57-
util.CheckErr(persistentvolumeclaim.Debug(args, pvNs, openebsNamespace), util.Fatal)
58-
} else {
59-
util.CheckErr(persistentvolumeclaim.Describe(args, pvNs, openebsNamespace), util.Fatal)
60-
}
61-
39+
util.CheckErr(persistentvolumeclaim.Describe(args, pvNs, openebsNamespace), util.Fatal)
6240
},
6341
}
64-
cmd.SetUsageTemplate(pvcInfoCommandHelpText)
65-
cmd.Flags().BoolVar(&debug, "debug", false, "Debug cstor volume")
42+
cmd.PersistentFlags().StringVarP(&openebsNs, "openebs-namespace", "", "", "to read the openebs namespace from user.\nIf not provided it is determined from components.")
43+
cmd.PersistentFlags().StringVarP(&pvNs, "namespace", "n", "", "to read the namespace of the pvc from the user. If not provided defaults to default namespace.")
6644
return cmd
6745
}

0 commit comments

Comments
 (0)