Skip to content

Commit

Permalink
api: removing dependency on hardcoded value when onboarding consumer
Browse files Browse the repository at this point in the history
when onboarding a new consumer using API parameters are changed
the same change needs to be implement here. Now no longer need
to pass the hard coded value while onboarding a consumer.

Signed-off-by: rchikatw <[email protected]>
  • Loading branch information
rchikatw committed Oct 9, 2023
1 parent ac2c276 commit 70a107a
Show file tree
Hide file tree
Showing 847 changed files with 60,606 additions and 33,637 deletions.
2 changes: 1 addition & 1 deletion controllers/storageclassclaim_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/go-logr/logr"
snapapi "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1"
providerclient "github.com/red-hat-storage/ocs-operator/services/provider/client"
providerclient "github.com/red-hat-storage/ocs-operator/v4/services/provider/client"
corev1 "k8s.io/api/core/v1"
storagev1 "k8s.io/api/storage/v1"
"k8s.io/apimachinery/pkg/api/errors"
Expand Down
5 changes: 2 additions & 3 deletions controllers/storageclient_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/red-hat-storage/ocs-client-operator/pkg/utils"

configv1 "github.com/openshift/api/config/v1"
providerClient "github.com/red-hat-storage/ocs-operator/services/provider/client"
providerClient "github.com/red-hat-storage/ocs-operator/v4/services/provider/client"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
batchv1 "k8s.io/api/batch/v1"
Expand Down Expand Up @@ -268,9 +268,8 @@ func (s *StorageClientReconciler) onboardConsumer(instance *v1alpha1.StorageClie
}

name := fmt.Sprintf("storageconsumer-%s", clusterVersion.Spec.ClusterID)
// TODO: remove hardcoding of the capacity
response, err := externalClusterClient.OnboardConsumer(
s.ctx, instance.Spec.OnboardingTicket, name, "1T")
s.ctx, instance.Spec.OnboardingTicket, name)
if err != nil {
if st, ok := status.FromError(err); ok {
s.logGrpcErrorAndReportEvent(instance, OnboardConsumer, err, st.Code())
Expand Down
85 changes: 41 additions & 44 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,46 @@ module github.com/red-hat-storage/ocs-client-operator

go 1.18

replace k8s.io/client-go => k8s.io/client-go v0.25.2
replace (
github.com/portworx/sched-ops => github.com/portworx/sched-ops v0.20.4-openstorage-rc3 // required by Rook v1.12
k8s.io/client-go => k8s.io/client-go v0.26.4
vbom.ml/util => github.com/fvbommel/util v0.0.0-20180919145318-efcd4e0f9787
)

exclude github.com/kubernetes-incubator/external-storage v0.20.4-openstorage-rc2

require (
github.com/go-logr/logr v1.2.3
github.com/kubernetes-csi/external-snapshotter/client/v6 v6.2.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.24.1
github.com/openshift/api v3.9.1-0.20190924102528-32369d4db2ad+incompatible
github.com/onsi/gomega v1.27.1
github.com/openshift/api v0.0.0-20230217170555-ab002e9c06da
github.com/pkg/errors v0.9.1
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.58.0
github.com/red-hat-storage/ocs-operator v0.0.1-master.0.20230116143559-099b2ff54606
github.com/stretchr/testify v1.8.0
google.golang.org/grpc v1.49.0
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.63.0
github.com/red-hat-storage/ocs-operator/v4 v4.0.0-20230720152055-bdf5b8abb7c0
github.com/stretchr/testify v1.8.2
google.golang.org/grpc v1.53.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.26.1
k8s.io/apimachinery v0.26.1
k8s.io/api v0.26.4
k8s.io/apimachinery v0.26.4
k8s.io/client-go v12.0.0+incompatible
k8s.io/klog/v2 v2.80.1
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448
sigs.k8s.io/controller-runtime v0.13.1
k8s.io/klog/v2 v2.90.0
k8s.io/utils v0.0.0-20230209194617-a36077c30491
sigs.k8s.io/controller-runtime v0.14.5
)

require (
cloud.google.com/go v0.97.0 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.27 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.6.9 // indirect
Expand All @@ -55,39 +53,38 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/rogpeppe/go-internal v1.6.2 // indirect
github.com/prometheus/common v0.40.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect
golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/term v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/oauth2 v0.6.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220808145710-bf34ca4dd83a // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/genproto v0.0.0-20230320184635-7606e756e683 // indirect
google.golang.org/protobuf v1.29.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.26.0 // indirect
k8s.io/component-base v0.26.0 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
k8s.io/apiextensions-apiserver v0.26.4 // indirect
k8s.io/component-base v0.26.4 // indirect
k8s.io/kube-openapi v0.0.0-20230217203603-ff9a8e8fa21d // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit 70a107a

Please sign in to comment.