diff --git a/go.mod b/go.mod index 03271506..f1ca7d63 100644 --- a/go.mod +++ b/go.mod @@ -86,6 +86,7 @@ require ( github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/selinux v1.10.0 // indirect + github.com/pierrre/gotestcover v0.0.0-20160517101806-924dca7d15f0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect diff --git a/go.sum b/go.sum index e07c970c..e28a4942 100644 --- a/go.sum +++ b/go.sum @@ -372,6 +372,8 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/selinux v1.10.0 h1:rAiKF8hTcgLI3w0DHm6i0ylVVcOrlgR1kK99DRLDhyU= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrre/gotestcover v0.0.0-20160517101806-924dca7d15f0 h1:i5VIxp6QB8oWZ8IkK8zrDgeT6ORGIUeiN+61iETwJbI= +github.com/pierrre/gotestcover v0.0.0-20160517101806-924dca7d15f0/go.mod h1:4xpMLz7RBWyB+ElzHu8Llua96TRCB3YwX+l5EP1wmHk= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= diff --git a/pkg/messages/messages_en.go b/pkg/messages/messages_en.go index f72f9fd0..520f994b 100644 --- a/pkg/messages/messages_en.go +++ b/pkg/messages/messages_en.go @@ -311,6 +311,18 @@ var messagesEn = map[string]Message{ Type: codes.FailedPrecondition, Action: "Please check if there is any error in POD describe related with volume attach", }, + SubnetIDListNotFound: { + Code: SubnetIDListNotFound, + Description: "Cluster subnet list 'vpc_subnet_ids' is not defined", + Type: codes.FailedPrecondition, + Action: "Please check if this configmap 'ibm-cloud-provider-data' really exists and if the property 'vpc_subnet_ids' contains any subnet entries. Run the command 'kubectl get configmap ibm-cloud-provider-data -n kube-system -o yaml'", + }, + SubnetFindFailed: { + Code: SubnetFindFailed, + Description: "A subnet with the specified zone '%s' and available cluster subnet list '%s' could not be found.", + Type: codes.FailedPrecondition, + Action: "Please check if the property 'vpc_subnet_ids' contains valid subnetIds. Please check 'kubectl get configmap ibm-cloud-provider-data -n kube-system -o yaml'.Please check 'BackendError' tag for more details", + }, } // InitMessages ... diff --git a/pkg/messages/reason_code.go b/pkg/messages/reason_code.go index f0f6b3e6..b0f4cfb9 100644 --- a/pkg/messages/reason_code.go +++ b/pkg/messages/reason_code.go @@ -161,4 +161,10 @@ const ( // VolumePathNotMounted ... VolumePathNotMounted = "VolumePathNotMounted" + + // SubnetIDListNotFound ... + SubnetIDListNotFound = "SubnetIDListNotFound" + + // SubnetFindFailed ... + SubnetFindFailed = "SubnetFindFailed" )