diff --git a/go.mod b/go.mod index 02497783..3423678d 100644 --- a/go.mod +++ b/go.mod @@ -22,8 +22,8 @@ require ( github.com/sirupsen/logrus v1.8.1 github.com/spf13/cobra v1.4.0 github.com/spf13/pflag v1.0.5 - github.com/spotinst/spotinst-sdk-go v1.114.0 - github.com/stretchr/testify v1.7.1 + github.com/spotinst/spotinst-sdk-go v1.129.0 + github.com/stretchr/testify v1.7.2 github.com/theckman/yacspin v0.13.12 golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect diff --git a/go.sum b/go.sum index 6fe3aaec..8459e3cf 100644 --- a/go.sum +++ b/go.sum @@ -303,8 +303,8 @@ github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spotinst/spotinst-sdk-go v1.114.0 h1:k9UZ3QZ9ocwCNwh+G+RI37kTPNSr7z4RTNZATeol2Mk= -github.com/spotinst/spotinst-sdk-go v1.114.0/go.mod h1:3RwemuVqsntSGsNoLxlJkdnjwEfMIRYR31ywV8uz6M4= +github.com/spotinst/spotinst-sdk-go v1.129.0 h1:1HuySAZ0LuBTmPWGa2I1c6CHx8j+mnrf7B475F2Ub9o= +github.com/spotinst/spotinst-sdk-go v1.129.0/go.mod h1:C6mrT7+mqOgPyabacjyYTvilu8Xm96mvTvrZQhj99WI= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -313,8 +313,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/theckman/yacspin v0.13.12 h1:CdZ57+n0U6JMuh2xqjnjRq5Haj6v1ner2djtLQRzJr4= github.com/theckman/yacspin v0.13.12/go.mod h1:Rd2+oG2LmQi5f3zC3yeZAOl245z8QOvrH4OPOJNZxLg= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -678,8 +678,8 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= -gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= +gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -691,8 +691,9 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/ocean.go b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/ocean.go index 06d12633..64aeb51f 100644 --- a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/ocean.go +++ b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/ocean.go @@ -4,6 +4,7 @@ import ( "github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws" "github.com/spotinst/spotinst-sdk-go/service/ocean/providers/azure" "github.com/spotinst/spotinst-sdk-go/service/ocean/providers/gcp" + "github.com/spotinst/spotinst-sdk-go/service/ocean/spark" "github.com/spotinst/spotinst-sdk-go/spotinst" "github.com/spotinst/spotinst-sdk-go/spotinst/client" "github.com/spotinst/spotinst-sdk-go/spotinst/session" @@ -16,6 +17,7 @@ type Service interface { CloudProviderAWS() aws.Service CloudProviderGCP() gcp.Service CloudProviderAzure() azure.Service + Spark() spark.Service } type ServiceOp struct { @@ -51,3 +53,9 @@ func (s *ServiceOp) CloudProviderAzure() azure.Service { Client: s.Client, } } + +func (s *ServiceOp) Spark() spark.Service { + return &spark.ServiceOp{ + Client: s.Client, + } +} diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/cluster.go b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/cluster.go index b8920a92..050e7393 100644 --- a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/cluster.go +++ b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/cluster.go @@ -293,6 +293,8 @@ type RollSpec struct { Comment *string `json:"comment,omitempty"` Status *string `json:"status,omitempty"` BatchSizePercentage *int `json:"batchSizePercentage,omitempty"` + BatchMinHealthyPercentage *int `json:"batchMinHealthyPercentage,omitempty"` + RespectPDB *bool `json:"respectPdb,omitempty"` DisableLaunchSpecAutoScaling *bool `json:"disableLaunchSpecAutoScaling,omitempty"` LaunchSpecIDs []string `json:"launchSpecIds,omitempty"` InstanceIDs []string `json:"instanceIds,omitempty"` @@ -372,6 +374,126 @@ type GetLogEventsOutput struct { Events []*LogEvent `json:"events,omitempty"` } +type ClusterAggregatedCostInput struct { + OceanId *string `json:"oceanId,omitempty"` + StartTime *string `json:"startTime,omitempty"` + EndTime *string `json:"endTime,omitempty"` + GroupBy *string `json:"groupBy,omitempty"` + Filter *AggregatedFilter `json:"filter,omitempty"` +} + +type AggregatedFilter struct { + Scope *string `json:"scope,omitempty"` + Conditions *Conditions `json:"conditions,omitempty"` +} + +type Conditions struct { + AnyMatch []*AllMatch `json:"anyMatch,omitempty"` +} + +type AllMatch struct { + AllMatches []*AllMatchInner `json:"allMatch,omitempty"` +} + +type AllMatchInner struct { + Type *string `json:"type,omitempty"` + Key *string `json:"key,omitempty"` + Operator *string `json:"operator,omitempty"` + Value *string `json:"value,omitempty"` +} + +type ClusterAggregatedCostOutput struct { + AggregatedClusterCosts []*AggregatedClusterCost `json:"aggregatedClusterCosts,omitempty"` +} + +type AggregatedClusterCost struct { + Result *Result `json:"result,omitempty"` +} + +type Result struct { + TotalForDuration *TotalForDuration `json:"totalForDuration,omitempty"` +} + +type TotalForDuration struct { + Summary *Summary `json:"summary,omitempty"` + StartTime *string `json:"startTime,omitempty"` + EndTime *string `json:"endTime,omitempty"` + DetailedCosts *DetailedCosts `json:"detailedCosts,omitempty"` +} + +type DetailedCosts struct { + Aggregations map[string]Property `json:"aggregations,omitempty"` + GroupedBy *string `json:"groupedBy,omitempty"` +} + +type Property struct { + Resources []AggregatedCostResource `json:"resources,omitempty"` + Summary *Summary `json:"summary,omitempty"` +} + +type Summary struct { + Compute *AggregatedCompute `json:"compute,omitempty"` + Storage *AggregatedStorage `json:"storage,omitempty"` + Total *float64 `json:"total,omitempty"` +} + +type AggregatedCostResource struct { + Compute *AggregatedCompute `json:"compute,omitempty"` + Storage *AggregatedStorage `json:"storage,omitempty"` + MetaData *MetaData `json:"metaData,omitempty"` + Total *float64 `json:"total,omitempty"` +} + +type AggregatedCompute struct { + Headroom *Headroom `json:"headroom,omitempty"` + Total *float64 `json:"total,omitempty"` + Workloads *Workloads `json:"workloads,omitempty"` +} + +type AggregatedStorage struct { + Block *Block `json:"block,omitempty"` + File *File `json:"file,omitempty"` + Total *float64 `json:"total,omitempty"` +} + +type MetaData struct { + Name *string `json:"name,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Type *string `json:"type,omitempty"` + CustomType *string `json:"customType,omitempty"` +} + +type Headroom struct { + Total *float64 `json:"total,omitempty"` +} + +type Workloads struct { + Total *float64 `json:"total,omitempty"` +} + +type Block struct { + EbsPv *EbsPv `json:"ebsPv,omitempty"` + NonPv *NonPv `json:"nonPv,omitempty"` + Total *float64 `json:"total,omitempty"` +} + +type File struct { + EfsPv *EfsPv `json:"efsPv,omitempty"` + Total *float64 `json:"total,omitempty"` +} + +type EbsPv struct { + Total *float64 `json:"total,omitempty"` +} + +type NonPv struct { + Total *float64 `json:"total,omitempty"` +} + +type EfsPv struct { + Total *float64 `json:"total,omitempty"` +} + func clusterFromJSON(in []byte) (*Cluster, error) { b := new(Cluster) if err := json.Unmarshal(in, b); err != nil { @@ -512,6 +634,45 @@ func logEventsFromHttpResponse(resp *http.Response) ([]*LogEvent, error) { return logEventsFromJSON(body) } +func clusterAggregatedCostFromJSON(in []byte) (*AggregatedClusterCost, error) { + b := new(AggregatedClusterCost) + if err := json.Unmarshal(in, b); err != nil { + return nil, err + } + + return b, nil +} + +func clusterAggregatedCostsFromJSON(in []byte) ([]*AggregatedClusterCost, error) { + var rw client.Response + if err := json.Unmarshal(in, &rw); err != nil { + return nil, err + } + out := make([]*AggregatedClusterCost, len(rw.Response.Items)) + + if len(out) == 0 { + return out, nil + } + for i, rb := range rw.Response.Items { + b, err := clusterAggregatedCostFromJSON(rb) + if err != nil { + return nil, err + } + out[i] = b + } + + return out, nil +} + +func clusterAggregatedCostsFromHttpResponse(resp *http.Response) ([]*AggregatedClusterCost, error) { + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, err + } + + return clusterAggregatedCostsFromJSON(body) +} + func (s *ServiceOp) ListClusters(ctx context.Context, input *ListClustersInput) (*ListClustersOutput, error) { r := client.NewRequest(http.MethodGet, "/ocean/aws/k8s/cluster") resp, err := client.RequireOK(s.Client.Do(ctx, r)) @@ -834,6 +995,35 @@ func (s *ServiceOp) Roll(ctx context.Context, input *RollClusterInput) (*RollClu return output, nil } +func (s *ServiceOp) GetClusterAggregatedCosts(ctx context.Context, input *ClusterAggregatedCostInput) (*ClusterAggregatedCostOutput, error) { + path, err := uritemplates.Expand("/ocean/aws/k8s/cluster/{oceanId}/aggregatedCosts", uritemplates.Values{ + "oceanId": spotinst.StringValue(input.OceanId), + }) + if err != nil { + return nil, err + } + + // We do not need the ID anymore so let's drop it. + input.OceanId = nil + + r := client.NewRequest(http.MethodPost, path) + + r.Obj = input + + resp, err := client.RequireOK(s.Client.Do(ctx, r)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + costs, err := clusterAggregatedCostsFromHttpResponse(resp) + if err != nil { + return nil, err + } + + return &ClusterAggregatedCostOutput{costs}, nil +} + // region Cluster func (o Cluster) MarshalJSON() ([]byte, error) { @@ -1514,6 +1704,20 @@ func (o *RollSpec) SetBatchSizePercentage(v *int) *RollSpec { return o } +func (o *RollSpec) SetBatchMinHealthyPercentage(v *int) *RollSpec { + if o.BatchMinHealthyPercentage = v; o.BatchMinHealthyPercentage == nil { + o.nullFields = append(o.nullFields, "BatchMinHealthyPercentage") + } + return o +} + +func (o *RollSpec) SetRespectPDB(v *bool) *RollSpec { + if o.RespectPDB = v; o.RespectPDB == nil { + o.nullFields = append(o.nullFields, "RespectPDB") + } + return o +} + func (o *RollSpec) SetDisableLaunchSpecAutoScaling(v *bool) *RollSpec { if o.DisableLaunchSpecAutoScaling = v; o.DisableLaunchSpecAutoScaling == nil { o.nullFields = append(o.nullFields, "DisableLaunchSpecAutoScaling") diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/cluster_ecs.go b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/cluster_ecs.go index 59d511ff..a2cfb18b 100644 --- a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/cluster_ecs.go +++ b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/cluster_ecs.go @@ -23,6 +23,7 @@ type ECSCluster struct { AutoScaler *ECSAutoScaler `json:"autoScaler,omitempty"` Strategy *ECSStrategy `json:"strategy,omitempty"` Scheduling *ECSScheduling `json:"scheduling,omitempty"` + Logging *ECSLogging `json:"logging,omitempty"` // Read-only fields. CreatedAt *time.Time `json:"createdAt,omitempty"` @@ -63,6 +64,27 @@ type ECSScheduling struct { nullFields []string } +type ECSLogging struct { + Export *ECSExport `json:"export,omitempty"` + + forceSendFields []string + nullFields []string +} + +type ECSExport struct { + S3 *ECSS3 `json:"s3,omitempty"` + + forceSendFields []string + nullFields []string +} + +type ECSS3 struct { + ID *string `json:"id,omitempty"` + + forceSendFields []string + nullFields []string +} + type ECSShutdownHours struct { IsEnabled *bool `json:"isEnabled,omitempty"` TimeWindows []string `json:"timeWindows,omitempty"` @@ -118,6 +140,7 @@ type ECSLaunchSpecification struct { EBSOptimized *bool `json:"ebsOptimized,omitempty"` BlockDeviceMappings []*ECSBlockDeviceMapping `json:"blockDeviceMappings,omitempty"` InstanceMetadataOptions *ECSInstanceMetadataOptions `json:"instanceMetadataOptions,omitempty"` + UseAsTemplateOnly *bool `json:"useAsTemplateOnly,omitempty"` forceSendFields []string nullFields []string @@ -222,11 +245,12 @@ type ECSRollClusterOutput struct { } type ECSRoll struct { - ClusterID *string `json:"clusterId,omitempty"` - Comment *string `json:"comment,omitempty"` - BatchSizePercentage *int `json:"batchSizePercentage,omitempty"` - LaunchSpecIDs []string `json:"launchSpecIds,omitempty"` - InstanceIDs []string `json:"instanceIds,omitempty"` + ClusterID *string `json:"clusterId,omitempty"` + Comment *string `json:"comment,omitempty"` + BatchSizePercentage *int `json:"batchSizePercentage,omitempty"` + BatchMinHealthyPercentage *int `json:"batchMinHealthyPercentage,omitempty"` + LaunchSpecIDs []string `json:"launchSpecIds,omitempty"` + InstanceIDs []string `json:"instanceIds,omitempty"` forceSendFields []string nullFields []string @@ -576,6 +600,64 @@ func (o *ECSCluster) SetScheduling(v *ECSScheduling) *ECSCluster { return o } +func (o *ECSCluster) SetLogging(v *ECSLogging) *ECSCluster { + if o.Logging = v; o.Logging == nil { + o.nullFields = append(o.nullFields, "Logging") + } + return o +} + +// endregion + +// region Logging + +func (o ECSLogging) MarshalJSON() ([]byte, error) { + type noMethod ECSLogging + raw := noMethod(o) + return jsonutil.MarshalJSON(raw, o.forceSendFields, o.nullFields) +} + +func (o *ECSLogging) SetExport(v *ECSExport) *ECSLogging { + if o.Export = v; o.Export == nil { + o.nullFields = append(o.nullFields, "Export") + } + return o +} + +// endregion + +// region Export + +func (o ECSExport) MarshalJSON() ([]byte, error) { + type noMethod ECSExport + raw := noMethod(o) + return jsonutil.MarshalJSON(raw, o.forceSendFields, o.nullFields) +} + +func (o *ECSExport) SetS3(v *ECSS3) *ECSExport { + if o.S3 = v; o.S3 == nil { + o.nullFields = append(o.nullFields, "S3") + } + return o +} + +// endregion + +// region S3 + +func (o ECSS3) MarshalJSON() ([]byte, error) { + type noMethod ECSS3 + raw := noMethod(o) + return jsonutil.MarshalJSON(raw, o.forceSendFields, o.nullFields) +} + +func (o *ECSS3) SetId(v *string) *ECSS3 { + if o.ID = v; o.ID == nil { + o.nullFields = append(o.nullFields, "ID") + } + return o +} + // endregion // region Scheduling @@ -835,6 +917,13 @@ func (o *ECSLaunchSpecification) SetInstanceMetadataOptions(v *ECSInstanceMetada return o } +func (o *ECSLaunchSpecification) SetUseAsTemplateOnly(v *bool) *ECSLaunchSpecification { + if o.UseAsTemplateOnly = v; o.UseAsTemplateOnly == nil { + o.nullFields = append(o.nullFields, "UseAsTemplateOnly") + } + return o +} + // endregion // region ECSOptimizeImages @@ -1045,6 +1134,13 @@ func (o *ECSRoll) SetBatchSizePercentage(v *int) *ECSRoll { return o } +func (o *ECSRoll) SetBatchMinHealthyPercentage(v *int) *ECSRoll { + if o.BatchMinHealthyPercentage = v; o.BatchMinHealthyPercentage == nil { + o.nullFields = append(o.nullFields, "BatchMinHealthyPercentage") + } + return o +} + func (o *ECSRoll) SetLaunchSpecIDs(v []string) *ECSRoll { if o.LaunchSpecIDs = v; o.LaunchSpecIDs == nil { o.nullFields = append(o.nullFields, "LaunchSpecIDs") diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/launchspec_ecs.go b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/launchspec_ecs.go index fa67f1a9..4e93454e 100644 --- a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/launchspec_ecs.go +++ b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/launchspec_ecs.go @@ -26,6 +26,7 @@ type ECSLaunchSpec struct { BlockDeviceMappings []*ECSBlockDeviceMapping `json:"blockDeviceMappings,omitempty"` Tags []*Tag `json:"tags,omitempty"` InstanceTypes []string `json:"instanceTypes,omitempty"` + PreferredSpotTypes []string `json:"preferredSpotTypes,omitempty"` RestrictScaleDown *bool `json:"restrictScaleDown,omitempty"` SubnetIDs []string `json:"subnetIds,omitempty"` LaunchSpecScheduling *ECSLaunchSpecScheduling `json:"scheduling,omitempty"` @@ -433,6 +434,13 @@ func (o *ECSLaunchSpec) SetInstanceTypes(v []string) *ECSLaunchSpec { return o } +func (o *ECSLaunchSpec) SetPreferredSpotTypes(v []string) *ECSLaunchSpec { + if o.PreferredSpotTypes = v; o.PreferredSpotTypes == nil { + o.nullFields = append(o.nullFields, "PreferredSpotTypes") + } + return o +} + func (o *ECSLaunchSpec) SetRestrictScaleDown(v *bool) *ECSLaunchSpec { if o.RestrictScaleDown = v; o.RestrictScaleDown == nil { o.nullFields = append(o.nullFields, "RestrictScaleDown") diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/service.go b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/service.go index e7d99fc1..3478339c 100644 --- a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/service.go +++ b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws/service.go @@ -44,6 +44,8 @@ type serviceKubernetes interface { // Deprecated: Roll is obsolete, exists for backward compatibility only, // and should not be used. Please use CreateRoll instead. Roll(context.Context, *RollClusterInput) (*RollClusterOutput, error) + + GetClusterAggregatedCosts(context.Context, *ClusterAggregatedCostInput) (*ClusterAggregatedCostOutput, error) } type serviceECS interface { diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/azure/cluster.go b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/azure/cluster.go index f9742542..e29298e3 100644 --- a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/azure/cluster.go +++ b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/azure/cluster.go @@ -67,6 +67,7 @@ type Health struct { type VirtualNodeGroupTemplate struct { VMSizes *VMSizes `json:"vmSizes,omitempty"` LaunchSpecification *LaunchSpecification `json:"launchSpecification,omitempty"` + Zones []string `json:"zones,omitempty"` forceSendFields []string nullFields []string @@ -121,6 +122,7 @@ type LaunchSpecification struct { ManagedServiceIdentities []*ManagedServiceIdentity `json:"managedServiceIdentities,omitempty"` Extensions []*Extension `json:"extensions,omitempty"` Tags []*Tag `json:"tags,omitempty"` + MaxPods *int `json:"maxPods,omitempty"` forceSendFields []string nullFields []string @@ -706,6 +708,13 @@ func (o *VirtualNodeGroupTemplate) SetLaunchSpecification(v *LaunchSpecification return o } +func (o *VirtualNodeGroupTemplate) SetZones(v []string) *VirtualNodeGroupTemplate { + if o.Zones = v; o.Zones == nil { + o.nullFields = append(o.nullFields, "Zones") + } + return o +} + // endregion // region ResourceLimits @@ -892,6 +901,13 @@ func (o *LaunchSpecification) SetTags(v []*Tag) *LaunchSpecification { return o } +func (o *LaunchSpecification) SetMaxPods(v *int) *LaunchSpecification { + if o.MaxPods = v; o.MaxPods == nil { + o.nullFields = append(o.nullFields, "MaxPods") + } + return o +} + // endregion // region Image diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/azure/common.go b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/azure/common.go index 925e38e3..8e9f33b3 100644 --- a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/azure/common.go +++ b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/azure/common.go @@ -37,8 +37,9 @@ func (o *Tag) SetValue(v *string) *Tag { // region OSDisk type OSDisk struct { - SizeGB *int `json:"sizeGB,omitempty"` - Type *string `json:"type,omitempty"` + SizeGB *int `json:"sizeGB,omitempty"` + Type *string `json:"type,omitempty"` + UtilizeEphemeralStorage *bool `json:"utilizeEphemeralStorage,omitempty"` forceSendFields []string nullFields []string @@ -64,6 +65,13 @@ func (o *OSDisk) SetType(v *string) *OSDisk { return o } +func (o *OSDisk) SetUtilizeEphemeralStorage(v *bool) *OSDisk { + if o.UtilizeEphemeralStorage = v; o.UtilizeEphemeralStorage == nil { + o.nullFields = append(o.nullFields, "UtilizeEphemeralStorage") + } + return o +} + // endregion // region Label diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/azure/nodegroup.go b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/azure/nodegroup.go index d12672d8..e9de1945 100644 --- a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/azure/nodegroup.go +++ b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/azure/nodegroup.go @@ -22,6 +22,7 @@ type VirtualNodeGroup struct { AutoScale *VirtualNodeGroupAutoScale `json:"autoScale,omitempty"` ResourceLimits *VirtualNodeGroupResourceLimits `json:"resourceLimits,omitempty"` LaunchSpecification *VirtualNodeGroupLaunchSpecification `json:"launchSpecification,omitempty"` + Zones []string `json:"zones,omitempty"` // Read-only fields. CreatedAt *time.Time `json:"createdAt,omitempty"` @@ -57,8 +58,9 @@ type VirtualNodeGroupHeadroom struct { } type VirtualNodeGroupLaunchSpecification struct { - OSDisk *OSDisk `json:"osDisk,omitempty"` - Tags []*Tag `json:"tags,omitempty"` + OSDisk *OSDisk `json:"osDisk,omitempty"` + Tags []*Tag `json:"tags,omitempty"` + MaxPods *int `json:"maxPods,omitempty"` forceSendFields []string nullFields []string @@ -324,6 +326,13 @@ func (o *VirtualNodeGroup) SetAutoScale(v *VirtualNodeGroupAutoScale) *VirtualNo return o } +func (o *VirtualNodeGroup) SetZones(v []string) *VirtualNodeGroup { + if o.Zones = v; o.Zones == nil { + o.nullFields = append(o.nullFields, "Zones") + } + return o +} + // endregion // region VirtualNodeGroupAutoScale @@ -427,4 +436,11 @@ func (o *VirtualNodeGroupLaunchSpecification) SetTags(v []*Tag) *VirtualNodeGrou return o } +func (o *VirtualNodeGroupLaunchSpecification) SetMaxPods(v *int) *VirtualNodeGroupLaunchSpecification { + if o.MaxPods = v; o.MaxPods == nil { + o.nullFields = append(o.nullFields, "MaxPods") + } + return o +} + // endregion diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/gcp/cluster.go b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/gcp/cluster.go index 578bd663..975ca540 100644 --- a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/gcp/cluster.go +++ b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/gcp/cluster.go @@ -46,8 +46,9 @@ type Cluster struct { } type Strategy struct { - DrainingTimeout *int `json:"drainingTimeout,omitempty"` - ProvisioningModel *string `json:"provisioningModel,omitempty"` + DrainingTimeout *int `json:"drainingTimeout,omitempty"` + ProvisioningModel *string `json:"provisioningModel,omitempty"` + PreemptiblePercentage *int `json:"preemptiblePercentage,omitempty"` forceSendFields []string nullFields []string @@ -160,6 +161,7 @@ type GKE struct { type InstanceTypes struct { Whitelist []string `json:"whitelist,omitempty"` + Blacklist []string `json:"blacklist,omitempty"` forceSendFields []string nullFields []string @@ -175,6 +177,7 @@ type LaunchSpecification struct { Tags []string `json:"tags,omitempty"` RootVolumeType *string `json:"rootVolumeType,omitempty"` ShieldedInstanceConfig *LaunchSpecShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` + UseAsTemplateOnly *bool `json:"useAsTemplateOnly,omitempty"` forceSendFields []string nullFields []string @@ -267,11 +270,12 @@ type DeleteClusterInput struct { type DeleteClusterOutput struct{} type RollSpec struct { - ClusterID *string `json:"clusterId,omitempty"` - Comment *string `json:"comment,omitempty"` - BatchSizePercentage *int `json:"batchSizePercentage,omitempty"` - LaunchSpecIDs []string `json:"launchSpecIds,omitempty"` - InstanceNames []string `json:"instanceNames,omitempty"` + ClusterID *string `json:"clusterId,omitempty"` + Comment *string `json:"comment,omitempty"` + BatchSizePercentage *int `json:"batchSizePercentage,omitempty"` + BatchMinHealthyPercentage *int `json:"batchMinHealthyPercentage,omitempty"` + LaunchSpecIDs []string `json:"launchSpecIds,omitempty"` + InstanceNames []string `json:"instanceNames,omitempty"` forceSendFields []string nullFields []string @@ -849,6 +853,13 @@ func (o *Strategy) SetProvisioningModel(v *string) *Strategy { return o } +func (o *Strategy) SetPreemptiblePercentage(v *int) *Strategy { + if o.PreemptiblePercentage = v; o.PreemptiblePercentage == nil { + o.nullFields = append(o.nullFields, "PreemptiblePercentage") + } + return o +} + // endregion // region Compute @@ -911,6 +922,13 @@ func (o *InstanceTypes) SetWhitelist(v []string) *InstanceTypes { return o } +func (o *InstanceTypes) SetBlacklist(v []string) *InstanceTypes { + if o.Blacklist = v; o.Blacklist == nil { + o.nullFields = append(o.nullFields, "Blacklist") + } + return o +} + // endregion // region LaunchSpecification @@ -991,6 +1009,13 @@ func (o *LaunchSpecification) SetShieldedInstanceConfig(v *LaunchSpecShieldedIns return o } +func (o *LaunchSpecification) SetUseAsTemplateOnly(v *bool) *LaunchSpecification { + if o.UseAsTemplateOnly = v; o.UseAsTemplateOnly == nil { + o.nullFields = append(o.nullFields, "UseAsTemplateOnly") + } + return o +} + // endregion // region BackendService @@ -1341,6 +1366,13 @@ func (o *RollSpec) SetBatchSizePercentage(v *int) *RollSpec { return o } +func (o *RollSpec) SetBatchMinHealthyPercentage(v *int) *RollSpec { + if o.BatchMinHealthyPercentage = v; o.BatchMinHealthyPercentage == nil { + o.nullFields = append(o.nullFields, "BatchMinHealthyPercentage") + } + return o +} + func (o *RollSpec) SetLaunchSpecIDs(v []string) *RollSpec { if o.LaunchSpecIDs = v; o.LaunchSpecIDs == nil { o.nullFields = append(o.nullFields, "LaunchSpecIDs") diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/gcp/launchspec.go b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/gcp/launchspec.go index df43a1a6..4441b528 100644 --- a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/gcp/launchspec.go +++ b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/providers/gcp/launchspec.go @@ -22,7 +22,6 @@ type LaunchSpec struct { Taints []*Taint `json:"taints,omitempty"` AutoScale *AutoScale `json:"autoScale,omitempty"` RestrictScaleDown *bool `json:"restrictScaleDown,omitempty"` - Tags []*Tag `json:"tags,omitempty"` Strategy *LaunchSpecStrategy `json:"strategy,omitempty"` RootVolumeSizeInGB *int `json:"rootVolumeSizeInGb,omitempty"` RootVolumeType *string `json:"rootVolumeType,omitempty"` @@ -32,6 +31,7 @@ type LaunchSpec struct { Storage *Storage `json:"storage,omitempty"` ResourceLimits *ResourceLimits `json:"resourceLimits,omitempty"` LaunchSpecScheduling *GKELaunchSpecScheduling `json:"scheduling,omitempty"` + LaunchSpecTags []string `json:"tags,omitempty"` // forceSendFields is a list of field names (e.g. "Keys") to // unconditionally include in API requests. By default, fields with @@ -475,13 +475,6 @@ func (o *LaunchSpec) SetServiceAccount(v *string) *LaunchSpec { return o } -func (o *LaunchSpec) SetTags(v []*Tag) *LaunchSpec { - if o.Tags = v; o.Tags == nil { - o.nullFields = append(o.nullFields, "Tags") - } - return o -} - func (o *LaunchSpec) SetShieldedInstanceConfig(v *ShieldedInstanceConfig) *LaunchSpec { if o.ShieldedInstanceConfig = v; o.ShieldedInstanceConfig == nil { o.nullFields = append(o.nullFields, "ShieldedInstanceConfig") @@ -517,6 +510,13 @@ func (o *LaunchSpec) SetScheduling(v *GKELaunchSpecScheduling) *LaunchSpec { return o } +func (o *LaunchSpec) SetLaunchSpecTags(v []string) *LaunchSpec { + if o.LaunchSpecTags = v; o.LaunchSpecTags == nil { + o.nullFields = append(o.nullFields, "LaunchSpecTags") + } + return o +} + // endregion // region Label diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/spark/cluster.go b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/spark/cluster.go new file mode 100644 index 00000000..17fb0f86 --- /dev/null +++ b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/spark/cluster.go @@ -0,0 +1,258 @@ +package spark + +import ( + "time" + + "github.com/spotinst/spotinst-sdk-go/spotinst/util/jsonutil" +) + +type Cluster struct { + Config *Config `json:"config,omitempty"` + + // Read-only fields. + ID *string `json:"id,omitempty"` + ControllerClusterID *string `json:"controllerClusterId,omitempty"` + OceanClusterID *string `json:"oceanClusterId,omitempty"` + Region *string `json:"region,omitempty"` + State *string `json:"state,omitempty"` + K8sVersion *string `json:"k8sVersion,omitempty"` + OperatorVersion *string `json:"operatorVersion,omitempty"` + OperatorLastHeartbeat *time.Time `json:"operatorLastHeartbeat,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + + forceSendFields []string + nullFields []string +} + +type Config struct { + Ingress *IngressConfig `json:"ingress,omitempty"` + Webhook *WebhookConfig `json:"webhook,omitempty"` + Compute *ComputeConfig `json:"compute,omitempty"` + LogCollection *LogCollectionConfig `json:"logCollection,omitempty"` + + forceSendFields []string + nullFields []string +} + +type LogCollectionConfig struct { + CollectDriverLogs *bool `json:"collectDriverLogs,omitempty"` + + forceSendFields []string + nullFields []string +} + +type ComputeConfig struct { + UseTaints *bool `json:"useTaints,omitempty"` + CreateVngs *bool `json:"createVngs,omitempty"` + + forceSendFields []string + nullFields []string +} + +type WebhookConfig struct { + UseHostNetwork *bool `json:"useHostNetwork,omitempty"` + HostNetworkPorts []*int `json:"hostNetworkPorts,omitempty"` + + forceSendFields []string + nullFields []string +} + +type IngressConfig struct { + ServiceAnnotations map[string]string `json:"serviceAnnotations,omitempty"` + DeployIngress *bool `json:"deployIngress,omitempty"` + + forceSendFields []string + nullFields []string +} + +type ListClustersInput struct { + ControllerClusterID *string `json:"controllerClusterId,omitempty"` + ClusterState *string `json:"clusterState,omitempty"` +} + +type ListClustersOutput struct { + Clusters []*Cluster `json:"clusters,omitempty"` +} + +type ReadClusterInput struct { + ClusterID *string `json:"clusterId,omitempty"` +} + +type ReadClusterOutput struct { + Cluster *Cluster `json:"cluster,omitempty"` +} + +type CreateClusterInput struct { + Cluster *CreateClusterRequest `json:"cluster,omitempty"` +} + +type CreateClusterRequest struct { + OceanClusterID *string `json:"oceanClusterId,omitempty"` + Config *Config `json:"config,omitempty"` +} + +type CreateClusterOutput struct { + Cluster *Cluster `json:"cluster,omitempty"` +} + +type UpdateClusterInput struct { + ClusterID *string `json:"-"` + Cluster *UpdateClusterRequest `json:"cluster,omitempty"` +} + +type UpdateClusterRequest struct { + Config *Config `json:"config,omitempty"` +} + +type UpdateClusterOutput struct{} + +type DeleteClusterInput struct { + ClusterID *string `json:"clusterId,omitempty"` +} + +type DeleteClusterOutput struct{} + +// region Cluster + +func (c Cluster) MarshalJSON() ([]byte, error) { + type noMethod Cluster + raw := noMethod(c) + return jsonutil.MarshalJSON(raw, c.forceSendFields, c.nullFields) +} + +func (c *Cluster) SetConfig(v *Config) *Cluster { + if c.Config = v; c.Config == nil { + c.nullFields = append(c.nullFields, "Config") + } + return c +} + +// endregion + +// region Config + +func (c Config) MarshalJSON() ([]byte, error) { + type noMethod Config + raw := noMethod(c) + return jsonutil.MarshalJSON(raw, c.forceSendFields, c.nullFields) +} + +func (c *Config) SetIngress(v *IngressConfig) *Config { + if c.Ingress = v; c.Ingress == nil { + c.nullFields = append(c.nullFields, "Ingress") + } + return c +} + +func (c *Config) SetWebhook(v *WebhookConfig) *Config { + if c.Webhook = v; c.Webhook == nil { + c.nullFields = append(c.nullFields, "Webhook") + } + return c +} + +func (c *Config) SetCompute(v *ComputeConfig) *Config { + if c.Compute = v; c.Compute == nil { + c.nullFields = append(c.nullFields, "Compute") + } + return c +} + +func (c *Config) SetLogCollection(v *LogCollectionConfig) *Config { + if c.LogCollection = v; c.LogCollection == nil { + c.nullFields = append(c.nullFields, "LogCollection") + } + return c +} + +// endregion + +// region Ingress + +func (i IngressConfig) MarshalJSON() ([]byte, error) { + type noMethod IngressConfig + raw := noMethod(i) + return jsonutil.MarshalJSON(raw, i.forceSendFields, i.nullFields) +} + +func (i *IngressConfig) SetServiceAnnotations(v map[string]string) *IngressConfig { + if i.ServiceAnnotations = v; i.ServiceAnnotations == nil { + i.nullFields = append(i.nullFields, "ServiceAnnotations") + } + return i +} + +func (i *IngressConfig) SetDeployIngress(v *bool) *IngressConfig { + if i.DeployIngress = v; i.DeployIngress == nil { + i.nullFields = append(i.nullFields, "DeployIngress") + } + return i +} + +// endregion + +// region Webhook + +func (w WebhookConfig) MarshalJSON() ([]byte, error) { + type noMethod WebhookConfig + raw := noMethod(w) + return jsonutil.MarshalJSON(raw, w.forceSendFields, w.nullFields) +} + +func (w *WebhookConfig) SetUseHostNetwork(v *bool) *WebhookConfig { + if w.UseHostNetwork = v; w.UseHostNetwork == nil { + w.nullFields = append(w.nullFields, "UseHostNetwork") + } + return w +} + +func (w *WebhookConfig) SetHostNetworkPorts(v []*int) *WebhookConfig { + if w.HostNetworkPorts = v; w.HostNetworkPorts == nil { + w.nullFields = append(w.nullFields, "HostNetworkPorts") + } + return w +} + +// endregion + +// region Compute + +func (c ComputeConfig) MarshalJSON() ([]byte, error) { + type noMethod ComputeConfig + raw := noMethod(c) + return jsonutil.MarshalJSON(raw, c.forceSendFields, c.nullFields) +} + +func (c *ComputeConfig) SetUseTaints(v *bool) *ComputeConfig { + if c.UseTaints = v; c.UseTaints == nil { + c.nullFields = append(c.nullFields, "UseTaints") + } + return c +} + +func (c *ComputeConfig) SetCreateVNGs(v *bool) *ComputeConfig { + if c.CreateVngs = v; c.CreateVngs == nil { + c.nullFields = append(c.nullFields, "CreateVngs") + } + return c +} + +// endregion + +// region Log collection + +func (l LogCollectionConfig) MarshalJSON() ([]byte, error) { + type noMethod LogCollectionConfig + raw := noMethod(l) + return jsonutil.MarshalJSON(raw, l.forceSendFields, l.nullFields) +} + +func (l *LogCollectionConfig) SetCollectDriverLogs(v *bool) *LogCollectionConfig { + if l.CollectDriverLogs = v; l.CollectDriverLogs == nil { + l.nullFields = append(l.nullFields, "CollectDriverLogs") + } + return l +} + +// endregion diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/spark/service.go b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/spark/service.go new file mode 100644 index 00000000..9081a4c4 --- /dev/null +++ b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/spark/service.go @@ -0,0 +1,41 @@ +package spark + +import ( + "context" + + "github.com/spotinst/spotinst-sdk-go/spotinst" + "github.com/spotinst/spotinst-sdk-go/spotinst/client" + "github.com/spotinst/spotinst-sdk-go/spotinst/session" +) + +// Service provides the API operation methods for making requests to endpoints +// of the Spotinst API. See this package's package overview docs for details on +// the service. +type Service interface { + ReadCluster(context.Context, *ReadClusterInput) (*ReadClusterOutput, error) + ListClusters(context.Context, *ListClustersInput) (*ListClustersOutput, error) + DeleteCluster(context.Context, *DeleteClusterInput) (*DeleteClusterOutput, error) + CreateCluster(context.Context, *CreateClusterInput) (*CreateClusterOutput, error) + UpdateCluster(context.Context, *UpdateClusterInput) (*UpdateClusterOutput, error) + DetachVirtualNodeGroup(context.Context, *DetachVngInput) (*DetachVngOutput, error) + AttachVirtualNodeGroup(context.Context, *AttachVngInput) (*AttachVngOutput, error) +} + +type ClusterManager interface { +} + +type ServiceOp struct { + Client *client.Client +} + +var _ Service = &ServiceOp{} + +func New(sess *session.Session, cfgs ...*spotinst.Config) *ServiceOp { + cfg := &spotinst.Config{} + cfg.Merge(sess.Config) + cfg.Merge(cfgs...) + + return &ServiceOp{ + Client: client.New(cfg), + } +} diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/spark/spark.go b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/spark/spark.go new file mode 100644 index 00000000..c14ebb9e --- /dev/null +++ b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/spark/spark.go @@ -0,0 +1,272 @@ +package spark + +import ( + "context" + "encoding/json" + "fmt" + "github.com/spotinst/spotinst-sdk-go/spotinst" + "github.com/spotinst/spotinst-sdk-go/spotinst/client" + "github.com/spotinst/spotinst-sdk-go/spotinst/util/uritemplates" + "io/ioutil" + "net/http" +) + +//region Cluster +func (s *ServiceOp) ListClusters(ctx context.Context, input *ListClustersInput) (*ListClustersOutput, error) { + r := client.NewRequest(http.MethodGet, "/ocean/spark/cluster") + + if input != nil { + if input.ControllerClusterID != nil { + r.Params.Set("controllerClusterId", spotinst.StringValue(input.ControllerClusterID)) + } + + if input.ClusterState != nil { + r.Params.Set("state", spotinst.StringValue(input.ClusterState)) + } + } + + resp, err := client.RequireOK(s.Client.Do(ctx, r)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + clusters, err := clustersFromHttpResponse(resp) + if err != nil { + return nil, err + } + + return &ListClustersOutput{Clusters: clusters}, nil +} + +func (s *ServiceOp) ReadCluster(ctx context.Context, input *ReadClusterInput) (*ReadClusterOutput, error) { + if input == nil { + return nil, fmt.Errorf("input is nil") + } + + path, err := uritemplates.Expand("/ocean/spark/cluster/{clusterId}", uritemplates.Values{ + "clusterId": spotinst.StringValue(input.ClusterID), + }) + if err != nil { + return nil, err + } + + r := client.NewRequest(http.MethodGet, path) + resp, err := client.RequireOK(s.Client.Do(ctx, r)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + clusters, err := clustersFromHttpResponse(resp) + if err != nil { + return nil, err + } + + output := new(ReadClusterOutput) + if len(clusters) > 0 { + output.Cluster = clusters[0] + } + + return output, nil +} + +func (s *ServiceOp) DeleteCluster(ctx context.Context, input *DeleteClusterInput) (*DeleteClusterOutput, error) { + if input == nil { + return nil, fmt.Errorf("input is nil") + } + + path, err := uritemplates.Expand("/ocean/spark/cluster/{clusterId}", uritemplates.Values{ + "clusterId": spotinst.StringValue(input.ClusterID), + }) + if err != nil { + return nil, err + } + + r := client.NewRequest(http.MethodDelete, path) + + resp, err := client.RequireOK(s.Client.Do(ctx, r)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + return &DeleteClusterOutput{}, nil +} + +func (s *ServiceOp) CreateCluster(ctx context.Context, input *CreateClusterInput) (*CreateClusterOutput, error) { + if input == nil { + return nil, fmt.Errorf("input is nil") + } + r := client.NewRequest(http.MethodPost, "/ocean/spark/cluster") + r.Obj = input + + resp, err := client.RequireOK(s.Client.Do(ctx, r)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + gs, err := clustersFromHttpResponse(resp) + if err != nil { + return nil, err + } + + output := new(CreateClusterOutput) + if len(gs) > 0 { + output.Cluster = gs[0] + } + + return output, nil +} + +func (s *ServiceOp) UpdateCluster(ctx context.Context, input *UpdateClusterInput) (*UpdateClusterOutput, error) { + if input == nil { + return nil, fmt.Errorf("input is nil") + } + + path, err := uritemplates.Expand("/ocean/spark/cluster/{clusterId}", uritemplates.Values{ + "clusterId": spotinst.StringValue(input.ClusterID), + }) + if err != nil { + return nil, err + } + + r := client.NewRequest(http.MethodPut, path) + r.Obj = input + + resp, err := client.RequireOK(s.Client.Do(ctx, r)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + return &UpdateClusterOutput{}, nil +} + +func clustersFromHttpResponse(resp *http.Response) ([]*Cluster, error) { + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, err + } + return clustersFromJSON(body) +} + +func clustersFromJSON(in []byte) ([]*Cluster, error) { + var rw client.Response + if err := json.Unmarshal(in, &rw); err != nil { + return nil, err + } + out := make([]*Cluster, len(rw.Response.Items)) + for i, rb := range rw.Response.Items { + b, err := clusterFromJSON(rb) + if err != nil { + return nil, err + } + out[i] = b + } + return out, nil +} + +func clusterFromJSON(in []byte) (*Cluster, error) { + b := new(Cluster) + if err := json.Unmarshal(in, b); err != nil { + return nil, err + } + return b, nil +} + +//endregion + +//region Virtual Node Group +func (s *ServiceOp) DetachVirtualNodeGroup(ctx context.Context, input *DetachVngInput) (*DetachVngOutput, error) { + if input == nil { + return nil, fmt.Errorf("input is nil") + } + + path, err := uritemplates.Expand("/ocean/spark/cluster/{clusterId}/virtualNodeGroup/{vngId}", uritemplates.Values{ + "clusterId": spotinst.StringValue(input.ClusterID), + "vngId": spotinst.StringValue(input.VngID), + }) + if err != nil { + return nil, err + } + + r := client.NewRequest(http.MethodDelete, path) + + resp, err := client.RequireOK(s.Client.Do(ctx, r)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + return &DetachVngOutput{}, nil +} + +func (s *ServiceOp) AttachVirtualNodeGroup(ctx context.Context, input *AttachVngInput) (*AttachVngOutput, error) { + if input == nil { + return nil, fmt.Errorf("input is nil") + } + + path, err := uritemplates.Expand("/ocean/spark/cluster/{clusterId}/virtualNodeGroup", uritemplates.Values{ + "clusterId": spotinst.StringValue(input.ClusterID), + }) + if err != nil { + return nil, err + } + + r := client.NewRequest(http.MethodPost, path) + r.Obj = input + + resp, err := client.RequireOK(s.Client.Do(ctx, r)) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + gs, err := vngsFromHttpResponse(resp) + if err != nil { + return nil, err + } + + output := new(AttachVngOutput) + if len(gs) > 0 { + output.VirtualNodeGroup = gs[0] + } + + return output, nil +} + +func vngsFromHttpResponse(resp *http.Response) ([]*DedicatedVirtualNodeGroup, error) { + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, err + } + return vngsFromJSON(body) +} + +func vngsFromJSON(in []byte) ([]*DedicatedVirtualNodeGroup, error) { + var rw client.Response + if err := json.Unmarshal(in, &rw); err != nil { + return nil, err + } + out := make([]*DedicatedVirtualNodeGroup, len(rw.Response.Items)) + for i, rb := range rw.Response.Items { + b, err := vngFromJSON(rb) + if err != nil { + return nil, err + } + out[i] = b + } + return out, nil +} + +func vngFromJSON(in []byte) (*DedicatedVirtualNodeGroup, error) { + b := new(DedicatedVirtualNodeGroup) + if err := json.Unmarshal(in, b); err != nil { + return nil, err + } + return b, nil +} + +//endregion diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/spark/vng.go b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/spark/vng.go new file mode 100644 index 00000000..058a2e7a --- /dev/null +++ b/vendor/github.com/spotinst/spotinst-sdk-go/service/ocean/spark/vng.go @@ -0,0 +1,27 @@ +package spark + +type DedicatedVirtualNodeGroup struct { + OceanClusterID *string `json:"oceanClusterId,omitempty"` + OceanSparkClusterID *string `json:"oceanSparkClusterId,omitempty"` + VngID *string `json:"vngId,omitempty"` +} + +type AttachVirtualNodeGroupRequest struct { + VngID *string `json:"id,omitempty"` +} + +type AttachVngInput struct { + ClusterID *string `json:"-"` + VirtualNodeGroup *AttachVirtualNodeGroupRequest `json:"virtualNodeGroup,omitempty"` +} + +type AttachVngOutput struct { + VirtualNodeGroup *DedicatedVirtualNodeGroup `json:"virtualNodeGroup,omitempty"` +} + +type DetachVngInput struct { + ClusterID *string `json:"clusterId,omitempty"` + VngID *string `json:"vngId,omitempty"` +} + +type DetachVngOutput struct{} diff --git a/vendor/github.com/spotinst/spotinst-sdk-go/spotinst/version.go b/vendor/github.com/spotinst/spotinst-sdk-go/spotinst/version.go index 6714ca3a..893ed05d 100644 --- a/vendor/github.com/spotinst/spotinst-sdk-go/spotinst/version.go +++ b/vendor/github.com/spotinst/spotinst-sdk-go/spotinst/version.go @@ -1,7 +1,7 @@ package spotinst // SDKVersion is the current version of the SDK. -const SDKVersion = "1.114.0" +const SDKVersion = "1.129.0" // SDKName is the name of the SDK. const SDKName = "spotinst-sdk-go" diff --git a/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go b/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go index df22c47f..da867903 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go @@ -9,7 +9,7 @@ package assert import "reflect" -// Wrapper around reflect.Value.CanConvert, for compatability +// Wrapper around reflect.Value.CanConvert, for compatibility // reasons. func canConvert(value reflect.Value, to reflect.Type) bool { return value.CanConvert(to) diff --git a/vendor/gopkg.in/ini.v1/.golangci.yml b/vendor/gopkg.in/ini.v1/.golangci.yml index b7256bae..631e3692 100644 --- a/vendor/gopkg.in/ini.v1/.golangci.yml +++ b/vendor/gopkg.in/ini.v1/.golangci.yml @@ -1,4 +1,9 @@ linters-settings: + staticcheck: + checks: [ + "all", + "-SA1019" # There are valid use cases of strings.Title + ] nakedret: max-func-lines: 0 # Disallow any unnamed return statement @@ -19,3 +24,4 @@ linters: - rowserrcheck - unconvert - goimports + - unparam diff --git a/vendor/gopkg.in/ini.v1/README.md b/vendor/gopkg.in/ini.v1/README.md index 1e429445..30606d97 100644 --- a/vendor/gopkg.in/ini.v1/README.md +++ b/vendor/gopkg.in/ini.v1/README.md @@ -1,6 +1,6 @@ # INI -[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/go-ini/ini/Go?logo=github&style=for-the-badge)](https://github.com/go-ini/ini/actions?query=workflow%3AGo) +[![GitHub Workflow Status](https://img.shields.io/github/checks-status/go-ini/ini/main?logo=github&style=for-the-badge)](https://github.com/go-ini/ini/actions?query=branch%3Amain) [![codecov](https://img.shields.io/codecov/c/github/go-ini/ini/master?logo=codecov&style=for-the-badge)](https://codecov.io/gh/go-ini/ini) [![GoDoc](https://img.shields.io/badge/GoDoc-Reference-blue?style=for-the-badge&logo=go)](https://pkg.go.dev/github.com/go-ini/ini?tab=doc) [![Sourcegraph](https://img.shields.io/badge/view%20on-Sourcegraph-brightgreen.svg?style=for-the-badge&logo=sourcegraph)](https://sourcegraph.com/github.com/go-ini/ini) @@ -24,7 +24,7 @@ Package ini provides INI file read and write functionality in Go. ## Installation -The minimum requirement of Go is **1.12**. +The minimum requirement of Go is **1.13**. ```sh $ go get gopkg.in/ini.v1 diff --git a/vendor/gopkg.in/ini.v1/codecov.yml b/vendor/gopkg.in/ini.v1/codecov.yml index 31f646ee..e02ec84b 100644 --- a/vendor/gopkg.in/ini.v1/codecov.yml +++ b/vendor/gopkg.in/ini.v1/codecov.yml @@ -4,6 +4,13 @@ coverage: project: default: threshold: 1% + informational: true + patch: + defualt: + only_pulls: true + informational: true comment: layout: 'diff' + +github_checks: false diff --git a/vendor/gopkg.in/ini.v1/error.go b/vendor/gopkg.in/ini.v1/error.go index d88347c5..f66bc94b 100644 --- a/vendor/gopkg.in/ini.v1/error.go +++ b/vendor/gopkg.in/ini.v1/error.go @@ -32,3 +32,18 @@ func IsErrDelimiterNotFound(err error) bool { func (err ErrDelimiterNotFound) Error() string { return fmt.Sprintf("key-value delimiter not found: %s", err.Line) } + +// ErrEmptyKeyName indicates the error type of no key name is found which there should be one. +type ErrEmptyKeyName struct { + Line string +} + +// IsErrEmptyKeyName returns true if the given error is an instance of ErrEmptyKeyName. +func IsErrEmptyKeyName(err error) bool { + _, ok := err.(ErrEmptyKeyName) + return ok +} + +func (err ErrEmptyKeyName) Error() string { + return fmt.Sprintf("empty key name: %s", err.Line) +} diff --git a/vendor/gopkg.in/ini.v1/file.go b/vendor/gopkg.in/ini.v1/file.go index 9d91c31a..f8b22408 100644 --- a/vendor/gopkg.in/ini.v1/file.go +++ b/vendor/gopkg.in/ini.v1/file.go @@ -342,6 +342,7 @@ func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) { // Use buffer to make sure target is safe until finish encoding. buf := bytes.NewBuffer(nil) + lastSectionIdx := len(f.sectionList) - 1 for i, sname := range f.sectionList { sec := f.SectionWithIndex(sname, f.sectionIndexes[i]) if len(sec.Comment) > 0 { @@ -371,12 +372,13 @@ func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) { } } + isLastSection := i == lastSectionIdx if sec.isRawSection { if _, err := buf.WriteString(sec.rawBody); err != nil { return nil, err } - if PrettySection { + if PrettySection && !isLastSection { // Put a line between sections if _, err := buf.WriteString(LineBreak); err != nil { return nil, err @@ -448,9 +450,7 @@ func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) { } if key.isBooleanType { - if kname != sec.keyList[len(sec.keyList)-1] { - buf.WriteString(LineBreak) - } + buf.WriteString(LineBreak) return true, nil } @@ -496,7 +496,7 @@ func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) { } } - if PrettySection { + if PrettySection && !isLastSection { // Put a line between sections if _, err := buf.WriteString(LineBreak); err != nil { return nil, err diff --git a/vendor/gopkg.in/ini.v1/parser.go b/vendor/gopkg.in/ini.v1/parser.go index ac1c980a..44fc526c 100644 --- a/vendor/gopkg.in/ini.v1/parser.go +++ b/vendor/gopkg.in/ini.v1/parser.go @@ -164,6 +164,10 @@ func readKeyName(delimiters string, in []byte) (string, int, error) { if endIdx < 0 { return "", -1, ErrDelimiterNotFound{line} } + if endIdx == 0 { + return "", -1, ErrEmptyKeyName{line} + } + return strings.TrimSpace(line[0:endIdx]), endIdx + 1, nil } @@ -463,8 +467,9 @@ func (f *File) parse(reader io.Reader) (err error) { kname, offset, err := readKeyName(f.options.KeyValueDelimiters, line) if err != nil { + switch { // Treat as boolean key when desired, and whole line is key name. - if IsErrDelimiterNotFound(err) { + case IsErrDelimiterNotFound(err): switch { case f.options.AllowBooleanKeys: kname, err := p.readValue(line, parserBufferSize) @@ -482,6 +487,8 @@ func (f *File) parse(reader io.Reader) (err error) { case f.options.SkipUnrecognizableLines: continue } + case IsErrEmptyKeyName(err) && f.options.SkipUnrecognizableLines: + continue } return err } diff --git a/vendor/gopkg.in/yaml.v3/decode.go b/vendor/gopkg.in/yaml.v3/decode.go index df36e3a3..0173b698 100644 --- a/vendor/gopkg.in/yaml.v3/decode.go +++ b/vendor/gopkg.in/yaml.v3/decode.go @@ -100,7 +100,10 @@ func (p *parser) peek() yaml_event_type_t { if p.event.typ != yaml_NO_EVENT { return p.event.typ } - if !yaml_parser_parse(&p.parser, &p.event) { + // It's curious choice from the underlying API to generally return a + // positive result on success, but on this case return true in an error + // scenario. This was the source of bugs in the past (issue #666). + if !yaml_parser_parse(&p.parser, &p.event) || p.parser.error != yaml_NO_ERROR { p.fail() } return p.event.typ @@ -320,6 +323,8 @@ type decoder struct { decodeCount int aliasCount int aliasDepth int + + mergedFields map[interface{}]bool } var ( @@ -808,6 +813,11 @@ func (d *decoder) mapping(n *Node, out reflect.Value) (good bool) { } } + mergedFields := d.mergedFields + d.mergedFields = nil + + var mergeNode *Node + mapIsNew := false if out.IsNil() { out.Set(reflect.MakeMap(outt)) @@ -815,11 +825,18 @@ func (d *decoder) mapping(n *Node, out reflect.Value) (good bool) { } for i := 0; i < l; i += 2 { if isMerge(n.Content[i]) { - d.merge(n.Content[i+1], out) + mergeNode = n.Content[i+1] continue } k := reflect.New(kt).Elem() if d.unmarshal(n.Content[i], k) { + if mergedFields != nil { + ki := k.Interface() + if mergedFields[ki] { + continue + } + mergedFields[ki] = true + } kkind := k.Kind() if kkind == reflect.Interface { kkind = k.Elem().Kind() @@ -833,6 +850,12 @@ func (d *decoder) mapping(n *Node, out reflect.Value) (good bool) { } } } + + d.mergedFields = mergedFields + if mergeNode != nil { + d.merge(n, mergeNode, out) + } + d.stringMapType = stringMapType d.generalMapType = generalMapType return true @@ -844,7 +867,8 @@ func isStringMap(n *Node) bool { } l := len(n.Content) for i := 0; i < l; i += 2 { - if n.Content[i].ShortTag() != strTag { + shortTag := n.Content[i].ShortTag() + if shortTag != strTag && shortTag != mergeTag { return false } } @@ -861,7 +885,6 @@ func (d *decoder) mappingStruct(n *Node, out reflect.Value) (good bool) { var elemType reflect.Type if sinfo.InlineMap != -1 { inlineMap = out.Field(sinfo.InlineMap) - inlineMap.Set(reflect.New(inlineMap.Type()).Elem()) elemType = inlineMap.Type().Elem() } @@ -870,6 +893,9 @@ func (d *decoder) mappingStruct(n *Node, out reflect.Value) (good bool) { d.prepare(n, field) } + mergedFields := d.mergedFields + d.mergedFields = nil + var mergeNode *Node var doneFields []bool if d.uniqueKeys { doneFields = make([]bool, len(sinfo.FieldsList)) @@ -879,13 +905,20 @@ func (d *decoder) mappingStruct(n *Node, out reflect.Value) (good bool) { for i := 0; i < l; i += 2 { ni := n.Content[i] if isMerge(ni) { - d.merge(n.Content[i+1], out) + mergeNode = n.Content[i+1] continue } if !d.unmarshal(ni, name) { continue } - if info, ok := sinfo.FieldsMap[name.String()]; ok { + sname := name.String() + if mergedFields != nil { + if mergedFields[sname] { + continue + } + mergedFields[sname] = true + } + if info, ok := sinfo.FieldsMap[sname]; ok { if d.uniqueKeys { if doneFields[info.Id] { d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s already set in type %s", ni.Line, name.String(), out.Type())) @@ -911,6 +944,11 @@ func (d *decoder) mappingStruct(n *Node, out reflect.Value) (good bool) { d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in type %s", ni.Line, name.String(), out.Type())) } } + + d.mergedFields = mergedFields + if mergeNode != nil { + d.merge(n, mergeNode, out) + } return true } @@ -918,19 +956,29 @@ func failWantMap() { failf("map merge requires map or sequence of maps as the value") } -func (d *decoder) merge(n *Node, out reflect.Value) { - switch n.Kind { +func (d *decoder) merge(parent *Node, merge *Node, out reflect.Value) { + mergedFields := d.mergedFields + if mergedFields == nil { + d.mergedFields = make(map[interface{}]bool) + for i := 0; i < len(parent.Content); i += 2 { + k := reflect.New(ifaceType).Elem() + if d.unmarshal(parent.Content[i], k) { + d.mergedFields[k.Interface()] = true + } + } + } + + switch merge.Kind { case MappingNode: - d.unmarshal(n, out) + d.unmarshal(merge, out) case AliasNode: - if n.Alias != nil && n.Alias.Kind != MappingNode { + if merge.Alias != nil && merge.Alias.Kind != MappingNode { failWantMap() } - d.unmarshal(n, out) + d.unmarshal(merge, out) case SequenceNode: - // Step backwards as earlier nodes take precedence. - for i := len(n.Content) - 1; i >= 0; i-- { - ni := n.Content[i] + for i := 0; i < len(merge.Content); i++ { + ni := merge.Content[i] if ni.Kind == AliasNode { if ni.Alias != nil && ni.Alias.Kind != MappingNode { failWantMap() @@ -943,6 +991,8 @@ func (d *decoder) merge(n *Node, out reflect.Value) { default: failWantMap() } + + d.mergedFields = mergedFields } func isMerge(n *Node) bool { diff --git a/vendor/gopkg.in/yaml.v3/parserc.go b/vendor/gopkg.in/yaml.v3/parserc.go index ac66fccc..268558a0 100644 --- a/vendor/gopkg.in/yaml.v3/parserc.go +++ b/vendor/gopkg.in/yaml.v3/parserc.go @@ -687,6 +687,9 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) + if token == nil { + return false + } parser.marks = append(parser.marks, token.start_mark) skip_token(parser) } @@ -786,7 +789,7 @@ func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) { } token := peek_token(parser) - if token.typ != yaml_BLOCK_SEQUENCE_START_TOKEN && token.typ != yaml_BLOCK_MAPPING_START_TOKEN { + if token == nil || token.typ != yaml_BLOCK_SEQUENCE_START_TOKEN && token.typ != yaml_BLOCK_MAPPING_START_TOKEN { return } @@ -813,6 +816,9 @@ func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) { func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) + if token == nil { + return false + } parser.marks = append(parser.marks, token.start_mark) skip_token(parser) } @@ -922,6 +928,9 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) + if token == nil { + return false + } parser.marks = append(parser.marks, token.start_mark) skip_token(parser) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 18c29f4b..0e5a4790 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -188,12 +188,13 @@ github.com/spf13/cobra # github.com/spf13/pflag v1.0.5 ## explicit github.com/spf13/pflag -# github.com/spotinst/spotinst-sdk-go v1.114.0 +# github.com/spotinst/spotinst-sdk-go v1.129.0 ## explicit github.com/spotinst/spotinst-sdk-go/service/ocean github.com/spotinst/spotinst-sdk-go/service/ocean/providers/aws github.com/spotinst/spotinst-sdk-go/service/ocean/providers/azure github.com/spotinst/spotinst-sdk-go/service/ocean/providers/gcp +github.com/spotinst/spotinst-sdk-go/service/ocean/spark github.com/spotinst/spotinst-sdk-go/spotinst github.com/spotinst/spotinst-sdk-go/spotinst/client github.com/spotinst/spotinst-sdk-go/spotinst/credentials @@ -203,7 +204,7 @@ github.com/spotinst/spotinst-sdk-go/spotinst/session github.com/spotinst/spotinst-sdk-go/spotinst/util/jsonutil github.com/spotinst/spotinst-sdk-go/spotinst/util/uritemplates github.com/spotinst/spotinst-sdk-go/spotinst/util/useragent -# github.com/stretchr/testify v1.7.1 +# github.com/stretchr/testify v1.7.2 ## explicit github.com/stretchr/testify/assert # github.com/theckman/yacspin v0.13.12 @@ -285,11 +286,11 @@ google.golang.org/protobuf/types/known/timestamppb ## explicit # gopkg.in/inf.v0 v0.9.1 gopkg.in/inf.v0 -# gopkg.in/ini.v1 v1.66.4 +# gopkg.in/ini.v1 v1.66.6 gopkg.in/ini.v1 # gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v2 -# gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b +# gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 # k8s.io/api v0.23.5 ## explicit