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

chore(cvc): refactor cvc controller to use cstorvolumeconfig #23

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/cvc-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ package main
import (
"os"

cvc "github.com/openebs/cstor-operators/pkg/controllers/cstorvolumeclaim"
cvc "github.com/openebs/cstor-operators/pkg/controllers/cstorvolumeconfig"
"k8s.io/klog"
)

func main() {
if err := cvc.Start(); err != nil {
klog.Errorf("Failed to start cstorvolumeclaim controller:{%s}", err.Error())
klog.Errorf("Failed to start cstorvolumeconfig controller:{%s}", err.Error())
os.Exit(1)
}
os.Exit(0)
Expand Down
12 changes: 6 additions & 6 deletions deploy/crds/volumes-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
# name must match the spec fields below, and be in the form: <plural>.<group>
name: cstorvolumeclaims.cstor.openebs.io
name: cstorvolumeconfigs.cstor.openebs.io
spec:
# group name to use for REST API: /apis/<group>/<version>
group: cstor.openebs.io
Expand All @@ -49,14 +49,14 @@ spec:
scope: Namespaced
names:
# kind is normally the CamelCased singular type. Your resource manifests use this.
kind: CStorVolumeClaim
kind: CStorVolumeConfig
# plural name to be used in the URL: /apis/<group>/<version>/<plural>
plural: cstorvolumeclaims
plural: cstorvolumeconfigs
# singular name to be used as an alias on the CLI and for display
singular: cstorvolumeclaim
singular: cstorvolumeconfig
# shortNames allow shorter string to match your resource on the CLI
shortNames:
- cstorvolumeclaim
- cstorvolumeconfig
- cvc
additionalPrinterColumns:
- JSONPath: .status.phase
Expand Down Expand Up @@ -127,7 +127,7 @@ spec:
name: Used
description: The amount of space that is "logically" consumed by this dataset
type: string
- JSONPath: .status.capacity.totalAllocated
- JSONPath: .status.capacity.total
name: Allocated
description: The amount of disk space consumed by a dataset and all its descendents
type: string
Expand Down
2 changes: 1 addition & 1 deletion deploy/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ rules:
resources: [ "castemplates", "runtasks"]
verbs: ["*" ]
- apiGroups: ["*"]
resources: ["cstorvolumereplicas", "cstorvolumes", "cstorvolumeclaims", "cstorvolumepolicies"]
resources: ["cstorvolumereplicas", "cstorvolumes", "cstorvolumeconfigs", "cstorvolumepolicies"]
verbs: ["*" ]
- apiGroups: ["*"]
resources: ["cstorpoolinstances", "cstorpoolinstances/finalizers"]
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.13
require (
github.com/evanphx/json-patch v4.5.0+incompatible // indirect
github.com/imdario/mergo v0.3.8 // indirect
github.com/openebs/api v0.0.0-20200326054827-2ee96e0c8a89
github.com/openebs/api v0.0.0-20200331103231-b4be54796806
github.com/openebs/maya v0.0.0-20200226142318-6daf5f0486e8
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v0.0.5
Expand All @@ -25,7 +25,6 @@ require (

replace (
k8s.io/api => k8s.io/api v0.17.3

k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.17.3

k8s.io/apimachinery => k8s.io/apimachinery v0.17.4-beta.0
Expand Down
15 changes: 2 additions & 13 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -397,23 +397,12 @@ github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zM
github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
github.com/opencontainers/runtime-spec v1.0.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/selinux v1.3.1-0.20190929122143-5215b1806f52/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs=
github.com/openebs/api v0.0.0-20200304155919-9ac1d4814a3f h1:EY8TgLsbAGhq4qhnoDb+6iTN/Hx1DrDw/kuJ0n+pZZg=
github.com/openebs/api v0.0.0-20200304155919-9ac1d4814a3f/go.mod h1:Mj6izkLZT0jNKLs9u1CnbgNoP9BEgY/mgVI7Mc3/Hwc=
github.com/openebs/api v0.0.0-20200311104100-f6a5bd72fae3 h1:30wuJe3AEcwYsq3w6t0k0SHhjreXN2EnqUvuP6Lwa0I=
github.com/openebs/api v0.0.0-20200311104100-f6a5bd72fae3/go.mod h1:Mj6izkLZT0jNKLs9u1CnbgNoP9BEgY/mgVI7Mc3/Hwc=
github.com/openebs/api v0.0.0-20200316115502-9a4c0b1367c3 h1:/R2zYRJ0N9knT71TGXZHRJQIwj1RS/JWlQD8SB7vdnI=
github.com/openebs/api v0.0.0-20200316115502-9a4c0b1367c3/go.mod h1:Mj6izkLZT0jNKLs9u1CnbgNoP9BEgY/mgVI7Mc3/Hwc=
github.com/openebs/api v0.0.0-20200319152258-4190ca81ae69 h1:KRLrzRLf7oBnVSMDRCaSt0i+XwW7ucQ0sziey1CZAXw=
github.com/openebs/api v0.0.0-20200319152258-4190ca81ae69/go.mod h1:Mj6izkLZT0jNKLs9u1CnbgNoP9BEgY/mgVI7Mc3/Hwc=
github.com/openebs/api v0.0.0-20200319173602-da787ed9fcbf h1:QGAdLxow+WVfxTOxeli3RdzWp9SPRJl1GzNS/M8mOow=
github.com/openebs/api v0.0.0-20200319173602-da787ed9fcbf/go.mod h1:Mj6izkLZT0jNKLs9u1CnbgNoP9BEgY/mgVI7Mc3/Hwc=
github.com/openebs/api v0.0.0-20200323064123-2d2469b66b89 h1:pSg7KAxeRvDuWZpUCIkuKBYpV2z75eSGzU/YXwGyo8U=
github.com/openebs/api v0.0.0-20200323064123-2d2469b66b89/go.mod h1:Mj6izkLZT0jNKLs9u1CnbgNoP9BEgY/mgVI7Mc3/Hwc=
github.com/openebs/api v0.0.0-20200326054827-2ee96e0c8a89 h1:h2JDrM+wq9nEXeK9kACN3zjUyVxmfcCvLfWnfo1I6+E=
github.com/openebs/api v0.0.0-20200326054827-2ee96e0c8a89/go.mod h1:Mj6izkLZT0jNKLs9u1CnbgNoP9BEgY/mgVI7Mc3/Hwc=
github.com/openebs/api v0.0.0-20200331103231-b4be54796806 h1:vfpQYikhVkFMUocB6wmut42EC4/ecLHJCNfj/6bgMPw=
github.com/openebs/api v0.0.0-20200331103231-b4be54796806/go.mod h1:Mj6izkLZT0jNKLs9u1CnbgNoP9BEgY/mgVI7Mc3/Hwc=
github.com/openebs/maya v0.0.0-20200226142318-6daf5f0486e8 h1:ud86nr1TRU9fB3IeBzymBqYjaha/GjgjHCTeFTKeT8A=
github.com/openebs/maya v0.0.0-20200226142318-6daf5f0486e8/go.mod h1:QQY9cOHKQwZ73qbv6O//UYUBLNV2S0MRDIfG7t5KOCk=
github.com/openebs/maya v0.0.0-20200305100821-7118ad163bb4 h1:beXxZA3gQlP+r1mtNKfmdVjhs6NA5O3IXpNMoMoQXSY=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pelletier/go-toml v1.1.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
Expand Down
1 change: 0 additions & 1 deletion pkg/controllers/cstorvolumeclaim/volume_operations_test.go

This file was deleted.

Loading