From 350fbb31eac6cd2dbce7a3c9c01b807b0933eaea Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Thu, 23 May 2024 11:13:13 -0700 Subject: [PATCH 01/30] require 1.20 go version upgrade golang to 1.20 Signed-off-by: Henry Zeng --- Makefile | 2 +- hack/demo/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index edb2649..dce1485 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ PLATFORMS ?= linux_amd64 linux_arm64 # Setup Go # TODO(jastang): Upgrade Go version to be in-line with build submodule. -GO_REQUIRED_VERSION = 1.17 +GO_REQUIRED_VERSION = 1.20 # Set a sane default so that the nprocs calculation below is less noisy on the initial # loading of this file diff --git a/hack/demo/Dockerfile b/hack/demo/Dockerfile index 77e18a8..6c5be34 100644 --- a/hack/demo/Dockerfile +++ b/hack/demo/Dockerfile @@ -1,5 +1,5 @@ # Base build image -FROM golang:1.14 AS build_base +FROM golang:1.20 AS build_base WORKDIR /go/src/github.com/creativesoftwarefdn/weaviate From ec0b2313c4d6d27b5169ec3c35a5bcf5f9110213 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Mon, 13 May 2024 13:48:36 -0700 Subject: [PATCH 02/30] fix secret generating shell Signed-off-by: Henry Zeng --- hack/demo/prepare-alibaba-credentials.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hack/demo/prepare-alibaba-credentials.sh b/hack/demo/prepare-alibaba-credentials.sh index 3f520df..1203922 100644 --- a/hack/demo/prepare-alibaba-credentials.sh +++ b/hack/demo/prepare-alibaba-credentials.sh @@ -1,5 +1,5 @@ #!/bin/bash -echo "accessKeyId: ${ALICLOUD_ACCESS_KEY}\naccessKeySecret: ${ALICLOUD_SECRET_KEY}" > alibaba-credentials.conf -kubectl create secret generic alibaba-account-creds -n crossplane-system --from-file=credentials=alibaba-credentials.conf -rm -f alibaba-credentials.conf +kubectl create secret generic alibaba-account-creds -n crossplane-system \ + --from-literal=accessKeyId=${ALICLOUD_ACCESS_KEY} \ + --from-literal=accessKeySecret=${ALICLOUD_SECRET_KEY} From 37aa3fc0c76a3553a0c167c24ac8b985cc504a13 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Tue, 14 May 2024 12:12:20 -0700 Subject: [PATCH 03/30] clean up AliCloud SDK error requestID remove recommend in error due to requestID add more comment Signed-off-by: Henry Zeng --- pkg/clients/redis/redis.go | 54 +++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index e287d51..d3b3eff 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -18,6 +18,7 @@ package redis import ( "context" + "encoding/json" "strconv" "time" @@ -45,6 +46,15 @@ const ( VPCNetworkType = "VPC" ) +// Same server error but without requestID +type CleanedServerError struct { + HttpStatus int + HostId string + Code string + Message string + Comment string +} + // Client defines Redis client operations type Client interface { DescribeDBInstance(id string) (*DBInstance, error) @@ -96,7 +106,7 @@ type client struct { func NewClient(ctx context.Context, accessKeyID, accessKeySecret, region string) (Client, error) { redisCli, err := aliredis.NewClientWithAccessKey(region, accessKeyID, accessKeySecret) if err != nil { - return nil, err + return nil, CleanError(err) } c := &client{redisCli: redisCli} return c, nil @@ -110,7 +120,7 @@ func (c *client) DescribeDBInstance(id string) (*DBInstance, error) { response, err := c.redisCli.DescribeInstances(request) if err != nil { - return nil, errors.Wrap(err, "cannot describe redis instance") + return nil, errors.Wrap(CleanError(err), "cannot describe redis instance") } if len(response.Instances.KVStoreInstance) == 0 { return nil, ErrDBInstanceNotFound @@ -142,7 +152,7 @@ func (c *client) CreateDBInstance(req *CreateRedisInstanceRequest) (*DBInstance, } resp, err := c.redisCli.CreateInstance(request) if err != nil { - return nil, err + return nil, CleanError(err) } return &DBInstance{ @@ -163,7 +173,7 @@ func (c *client) CreateAccount(id, user, pw string) error { request.ReadTimeout = DefaultReadTime _, err := c.redisCli.CreateAccount(request) - return err + return CleanError(err) } func (c *client) DeleteDBInstance(id string) error { @@ -173,7 +183,7 @@ func (c *client) DeleteDBInstance(id string) error { request.InstanceId = id _, err := c.redisCli.DeleteInstance(request) - return err + return CleanError(err) } // GenerateObservation is used to produce v1alpha1.RedisInstanceObservation from @@ -223,7 +233,7 @@ func (c *client) AllocateInstancePublicConnection(id string, port int) (string, request.ReadTimeout = DefaultReadTime _, err := c.redisCli.AllocateInstancePublicConnection(request) if err != nil { - return "", err + return "", CleanError(err) } return request.ConnectionStringPrefix, err } @@ -237,7 +247,7 @@ func (c *client) ModifyDBInstanceConnectionString(id string, port int) (string, request.ReadTimeout = DefaultReadTime _, err := c.redisCli.ModifyDBInstanceConnectionString(request) if err != nil { - return "", err + return "", CleanError(err) } return request.CurrentConnectionString, err } @@ -259,5 +269,35 @@ func (c *client) modifyInstanceSpec(id string, req *ModifyRedisInstanceRequest) request.InstanceClass = req.InstanceClass request.ReadTimeout = DefaultReadTime _, err := c.redisCli.ModifyInstanceSpec(request) + return CleanError(err) +} + +// 2024-05-14: Henry +// Try to remove requestID from AliCloud SDK errors +// Returning error with requestID will cause Crossplane reconciler to treat the errors +// as a sequence of unique errors and insert all errors into the retry queue, which +// immediately boomed the AliCloud rate limit. +// See more details of a similar issue in AWS controller: +// https://github.com/crossplane-contrib/provider-aws/issues/69 +func CleanError(err error) error { + if err == nil { + return err + } + + if aliCloudErr, ok := err.(*sdkerrors.ServerError); ok { + cleanedErr := CleanedServerError{ + HttpStatus: aliCloudErr.HttpStatus(), + HostId: aliCloudErr.HostId(), + Code: aliCloudErr.ErrorCode(), + Message: aliCloudErr.Message(), + Comment: aliCloudErr.Comment(), + } + strData, err := json.Marshal(cleanedErr) + if err != nil { + return errors.Wrap(err, "Failed to marshal cleaned error from AliCloud SDK Error.") + } + return sdkerrors.NewServerError(aliCloudErr.HttpStatus(), string(strData), aliCloudErr.Comment()) + } + return err } From 83caf163a7eb173ee5e640bbe5a5a80c89c190cf Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Wed, 15 May 2024 14:10:53 -0700 Subject: [PATCH 04/30] update redis parameters update parameters for redis spec generate new crds for redis fix typo Signed-off-by: Henry Zeng --- apis/redis/v1alpha1/redis_types.go | 92 ++++++++++++------ apis/redis/v1alpha1/zz_generated.deepcopy.go | 22 ++++- go.mod | 17 ++-- go.sum | 60 ++++++++---- package/.DS_Store | Bin 0 -> 6148 bytes ....alibaba.crossplane.io_redisinstances.yaml | 45 +++++++-- 6 files changed, 170 insertions(+), 66 deletions(-) create mode 100644 package/.DS_Store diff --git a/apis/redis/v1alpha1/redis_types.go b/apis/redis/v1alpha1/redis_types.go index c33b118..f0ac520 100644 --- a/apis/redis/v1alpha1/redis_types.go +++ b/apis/redis/v1alpha1/redis_types.go @@ -59,11 +59,11 @@ type RedisInstanceSpec struct { // Redis instance states. const ( // The instance is healthy and available - RedisInstanceStateRunning = "Normal" + RedisInstanceStateRunning = "Ready" // The instance is being created. The instance is inaccessible while it is being created. RedisInstanceStateCreating = "Creating" // The instance is being deleted. - RedisInstanceStateDeleting = "Flushing" + RedisInstanceStateDeleting = "Deleting" ) // RedisInstanceStatus defines the observed state of RedisInstance @@ -72,33 +72,81 @@ type RedisInstanceStatus struct { AtProvider RedisInstanceObservation `json:"atProvider,omitempty"` } +// A Tag is used to tag the Redis resources in AliCloud. +type Tag struct { + // Key for the tag. + Key string `json:"key"` + + // Value of the tag. + // +optional + Value string `json:"value,omitempty"` +} + // RedisInstanceParameters define the desired state of an Redis instance. type RedisInstanceParameters struct { + // The ID of the region where you want to create the instance. + // +immutable + // +optional + RegionID string `json:"regionId,omitempty"` + + // The primary zone ID of the instance. + // +optional + ZoneID string `json:"zoneId,omitempty"` + + // The secondary zone ID of the instance. + // The master node and replica node of the instance can be deployed in different zones and disaster recovery is implemented across zones. + // +optional + SecondaryZoneID string `json:"secondaryZoneId,omitempty"` + + // The ID of the virtual private cloud (VPC). + // +immutable + // +optional + VpcID string `json:"vpcId,omitempty"` + + // VSwitchId is indicates VSwitch ID + // +immutable + // +optional + VSwitchID string `json:"vSwitchId,omitempty"` + + // ChargeType is indicates payment type + // ChargeType:PrePaid/PostPaid + // +optional + // +kubebuilder:default="PostPaid" + ChargeType string `json:"chargeType"` + + // NetworkType is indicates service network type + // NetworkType:CLASSIC/VPC + // +optional + // +immutable + // +kubebuilder:default="VPC" + NetworkType string `json:"networkType"` + // Engine is the name of the database engine to be used for this instance. // Engine is a required field. // +immutable // +kubebuilder:validation:Enum=Redis InstanceType string `json:"instanceType"` - // EngineVersion indicates the database engine version. - // Redis:4.0/5.0 - // +kubebuilder:validation:Enum="4.0";"5.0" - EngineVersion string `json:"engineVersion"` - // InstanceClass is the machine class of the instance, e.g. "redis.logic.sharding.2g.8db.0rodb.8proxy.default" + // The instance type. + // For example, redis.master.small.default indicates a Community Edition + // standard master-replica instance that has 1 GB of memory. InstanceClass string `json:"instanceClass"` - // InstancePort is indicates the database service port + // Port is indicates the database service port // +optional - InstancePort int `json:"port"` + Port int `json:"port,omitempty"` - // PubliclyAccessible is Public network of service exposure - PubliclyAccessible bool `json:"publiclyAccessible"` + // EngineVersion indicates the database engine version. + // +kubebuilder:validation:Enum="4.0";"5.0";"6.0";"7.0" + EngineVersion string `json:"engineVersion,omitempty"` - // ChargeType is indicates payment type - // ChargeType:PrePaid/PostPaid + // The number of data shards. + // This parameter is available only if you create a cluster instance that uses cloud disks. + ShardCount int `json:"shardCount"` + + // The tags of the instance. // +optional - // +kubebuilder:default="PostPaid" - ChargeType string `json:"chargeType"` + Tag []Tag `json:"tag,omitempty"` // MasterUsername is the name for the master user. // Constraints: @@ -109,20 +157,6 @@ type RedisInstanceParameters struct { // +immutable // +optional MasterUsername string `json:"masterUsername"` - - // NetworkType is indicates service network type - // NetworkType:CLASSIC/VPC - // +optional - // +kubebuilder:default="CLASSIC" - NetworkType string `json:"networkType"` - - // VpcId is indicates VPC ID - // +optional - VpcID string `json:"vpcId"` - - // VSwitchId is indicates VSwitch ID - // +optional - VSwitchID string `json:"vSwitchId"` } // RedisInstanceObservation is the representation of the current state that is observed. diff --git a/apis/redis/v1alpha1/zz_generated.deepcopy.go b/apis/redis/v1alpha1/zz_generated.deepcopy.go index 2d63f09..5058f3b 100644 --- a/apis/redis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/redis/v1alpha1/zz_generated.deepcopy.go @@ -117,6 +117,11 @@ func (in *RedisInstanceObservation) DeepCopy() *RedisInstanceObservation { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RedisInstanceParameters) DeepCopyInto(out *RedisInstanceParameters) { *out = *in + if in.Tag != nil { + in, out := &in.Tag, &out.Tag + *out = make([]Tag, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisInstanceParameters. @@ -133,7 +138,7 @@ func (in *RedisInstanceParameters) DeepCopy() *RedisInstanceParameters { func (in *RedisInstanceSpec) DeepCopyInto(out *RedisInstanceSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) - out.ForProvider = in.ForProvider + in.ForProvider.DeepCopyInto(&out.ForProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisInstanceSpec. @@ -162,3 +167,18 @@ func (in *RedisInstanceStatus) DeepCopy() *RedisInstanceStatus { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Tag) DeepCopyInto(out *Tag) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tag. +func (in *Tag) DeepCopy() *Tag { + if in == nil { + return nil + } + out := new(Tag) + in.DeepCopyInto(out) + return out +} diff --git a/go.mod b/go.mod index efe5fb3..81f2c43 100644 --- a/go.mod +++ b/go.mod @@ -7,12 +7,12 @@ require ( github.com/alibabacloud-go/nas-20170626/v2 v2.0.1 github.com/alibabacloud-go/slb-20140515/v2 v2.0.1 github.com/alibabacloud-go/tea v1.1.15 - github.com/aliyun/alibaba-cloud-sdk-go v1.61.109 + github.com/aliyun/alibaba-cloud-sdk-go v1.62.736 github.com/aliyun/aliyun-log-go-sdk v0.1.19 github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible github.com/crossplane/crossplane-runtime v0.13.0 github.com/crossplane/crossplane-tools v0.0.0-20201007233256-88b291e145bb - github.com/google/go-cmp v0.5.2 + github.com/google/go-cmp v0.5.4 github.com/pkg/errors v0.9.1 golang.org/x/net v0.0.0-20201110031124-69a78807bb2b gopkg.in/alecthomas/kingpin.v2 v2.2.6 @@ -55,13 +55,14 @@ require ( github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/imdario/mergo v0.3.10 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect - github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect - github.com/json-iterator/go v1.1.10 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/mattn/go-colorable v0.1.2 // indirect github.com/mattn/go-isatty v0.0.8 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect github.com/pierrec/lz4 v2.5.2+incompatible // indirect github.com/prometheus/client_golang v1.7.1 // indirect github.com/prometheus/client_model v0.2.0 // indirect @@ -72,7 +73,7 @@ require ( github.com/spf13/cobra v1.1.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tjfoc/gmsm v1.3.2 // indirect - go.uber.org/atomic v1.6.0 // indirect + go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.5.0 // indirect go.uber.org/zap v1.15.0 // indirect golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 // indirect @@ -87,9 +88,9 @@ require ( google.golang.org/appengine v1.6.6 // indirect google.golang.org/protobuf v1.25.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.56.0 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect + gopkg.in/yaml.v3 v3.0.0 // indirect k8s.io/apiextensions-apiserver v0.20.1 // indirect k8s.io/client-go v0.20.1 // indirect k8s.io/component-base v0.20.1 // indirect diff --git a/go.sum b/go.sum index 2fc138a..ab17018 100644 --- a/go.sum +++ b/go.sum @@ -42,6 +42,7 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -55,6 +56,7 @@ github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMx github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -87,8 +89,8 @@ github.com/alibabacloud-go/tea-utils v1.3.1/go.mod h1:EI/o33aBfj3hETm4RLiAxF/ThQ github.com/alibabacloud-go/tea-utils v1.3.8/go.mod h1:EI/o33aBfj3hETm4RLiAxF/ThQdSngxrpF8rKUDJjPE= github.com/alibabacloud-go/tea-utils v1.3.9 h1:TtbzxS+BXrisA7wzbAMRtlU8A2eWLg0ufm7m/Tl6fc4= github.com/alibabacloud-go/tea-utils v1.3.9/go.mod h1:EI/o33aBfj3hETm4RLiAxF/ThQdSngxrpF8rKUDJjPE= -github.com/aliyun/alibaba-cloud-sdk-go v1.61.109 h1:DLFMs6vlByrvF/xZro91b6jGirNxBJtQiyKCTta4FPQ= -github.com/aliyun/alibaba-cloud-sdk-go v1.61.109/go.mod h1:v8ESoHo4SyHmuB4b1tJqDHxfTGEciD+yhvOU/5s1Rfk= +github.com/aliyun/alibaba-cloud-sdk-go v1.62.736 h1:2OF8nzS58Xx+swb35tIZ5hhgGgWeokvxgso6HMenGvY= +github.com/aliyun/alibaba-cloud-sdk-go v1.62.736/go.mod h1:SOSDHfe1kX91v3W5QiBsWSLqeLxImobbMX1mxrFHsVQ= github.com/aliyun/aliyun-log-go-sdk v0.1.19 h1:7lNg5wOQqeOTIAQJjkfYj8zmRuJd4Dt6m6Kg90oYLlk= github.com/aliyun/aliyun-log-go-sdk v0.1.19/go.mod h1:arjbKu+pwifPdi8tMJSJtFszZlxs+6F34VPv+ecf3zA= github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible h1:Ft+KeWIJxFP76LqgJbvtOA1qBIoC8vGkTV3QeCOeJC4= @@ -156,6 +158,7 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/crossplane/crossplane-runtime v0.13.0 h1:TFeItxtW32/fETB9be0AsEha/ur0bbrtQRocC+Jd6RI= github.com/crossplane/crossplane-runtime v0.13.0/go.mod h1:Bc54/KBvV9ld/tvervcnhcSzk13FYguTqmYt72Mybps= github.com/crossplane/crossplane-tools v0.0.0-20201007233256-88b291e145bb h1:j09j/Gk1qH64HUtf/fcTjMAxLxUdOuQXySWu46WTVTU= @@ -192,6 +195,7 @@ github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQo github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= @@ -278,6 +282,7 @@ github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5 github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -313,8 +318,9 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= @@ -339,7 +345,6 @@ github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwu github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3SQ2HBHWsJUfbNBiTXJDeW2QDxw9AQ0= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -395,21 +400,24 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -422,8 +430,9 @@ github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= @@ -462,8 +471,9 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -505,6 +515,8 @@ github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b h1:FfH+VrHHk6Lxt9HdVS0PXzSXFyS2NbZKXv33FYPol0A= +github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b/go.mod h1:AC62GU6hc0BrNm+9RK9VSiwa/EUe1bkIeFORAMcHvJU= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= @@ -579,10 +591,7 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.1.0 h1:MkTeG1DMwsrdH7QtLXy5W+fUxWq+vmb6cLmyJ7aRtF0= github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.3/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -616,14 +625,19 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tjfoc/gmsm v1.3.2 h1:7JVkAn5bvUJ7HtU08iW6UiD+UTmJTIToHCfeFzkcCxM= github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= +github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= +github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= @@ -652,8 +666,9 @@ go.uber.org/atomic v0.0.0-20181018215023-8dc6146f7569/go.mod h1:gD2HeocX3+yG+ygL go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v0.0.0-20180122172545-ddea229ff1df/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -687,6 +702,8 @@ golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -699,6 +716,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -833,6 +851,7 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -890,9 +909,12 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1N golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -971,10 +993,10 @@ gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 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.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.56.0 h1:DPMeDvGTM54DXbPkVIZsp19fp/I2K7zwA/itHYHKo8Y= gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -992,8 +1014,9 @@ gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1058,6 +1081,7 @@ modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03 modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= diff --git a/package/.DS_Store b/package/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..8d25c0c33b58e81b4be9f0aed7e6a782fd98352f GIT binary patch literal 6148 zcmeH~F$w}f3`G;&La^D=avBfd4F=H@>;(h`8(BfodXDZ-CJ2t!BJu;tpJXO1`-+{7 zi0JxuSc&u^GJ~7S(n4d3ypz3L4M3`}dgXhH(h?7~0-B+w9;*1Wg-e+&OK|2Hj6Nq_|Y zjDU8VVY9|d#ohY$dRE^>)z$?L_2URHKLJSWDqg_du%B!J&7q|#Dlq;CI0gn1_$q-1 DHXRbb literal 0 HcmV?d00001 diff --git a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml index 89faa75..222e7b6 100644 --- a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml +++ b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml @@ -69,13 +69,15 @@ spec: description: ChargeType is indicates payment type ChargeType:PrePaid/PostPaid type: string engineVersion: - description: EngineVersion indicates the database engine version. Redis:4.0/5.0 + description: EngineVersion indicates the database engine version. enum: - "4.0" - "5.0" + - "6.0" + - "7.0" type: string instanceClass: - description: InstanceClass is the machine class of the instance, e.g. "redis.logic.sharding.2g.8db.0rodb.8proxy.default" + description: The instance type. For example, redis.master.small.default indicates a Community Edition standard master-replica instance that has 1 GB of memory. type: string instanceType: description: Engine is the name of the database engine to be used for this instance. Engine is a required field. @@ -86,26 +88,49 @@ spec: description: 'MasterUsername is the name for the master user. Constraints: * Required for Redis. * Must be 1 to 16 letters or numbers. * First character must be a letter. * Cannot be a reserved word for the chosen database engine.' type: string networkType: - default: CLASSIC + default: VPC description: NetworkType is indicates service network type NetworkType:CLASSIC/VPC type: string port: - description: InstancePort is indicates the database service port + description: Port is indicates the database service port type: integer - publiclyAccessible: - description: PubliclyAccessible is Public network of service exposure - type: boolean + regionId: + description: The ID of the region where you want to create the instance. + type: string + secondaryZoneId: + description: The secondary zone ID of the instance. The master node and replica node of the instance can be deployed in different zones and disaster recovery is implemented across zones. + type: string + shardCount: + description: The number of data shards. This parameter is available only if you create a cluster instance that uses cloud disks. + type: integer + tag: + description: The tags of the instance. + items: + description: A Tag is used to tag the Redis resources in AliCloud. + properties: + key: + description: Key for the tag. + type: string + value: + description: Value of the tag. + type: string + required: + - key + type: object + type: array vSwitchId: description: VSwitchId is indicates VSwitch ID type: string vpcId: - description: VpcId is indicates VPC ID + description: The ID of the virtual private cloud (VPC). + type: string + zoneId: + description: The primary zone ID of the instance. type: string required: - - engineVersion - instanceClass - instanceType - - publiclyAccessible + - shardCount type: object providerConfigRef: description: ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. From d182f6f3a3672995c8a3e81d4404e039beec4b0e Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Wed, 15 May 2024 16:17:19 -0700 Subject: [PATCH 05/30] fix redis status to match AliCloud Redis status update parameters to provision redis Signed-off-by: Henry Zeng --- apis/redis/v1alpha1/redis_types.go | 4 +- pkg/clients/redis/redis.go | 68 ++++++++-------------- pkg/controller/redis/redis_instance.go | 66 ++++++++++----------- pkg/controller/redis/redisinstance_test.go | 22 +++---- 4 files changed, 70 insertions(+), 90 deletions(-) diff --git a/apis/redis/v1alpha1/redis_types.go b/apis/redis/v1alpha1/redis_types.go index f0ac520..2a75db6 100644 --- a/apis/redis/v1alpha1/redis_types.go +++ b/apis/redis/v1alpha1/redis_types.go @@ -59,11 +59,11 @@ type RedisInstanceSpec struct { // Redis instance states. const ( // The instance is healthy and available - RedisInstanceStateRunning = "Ready" + RedisInstanceStateRunning = "Normal" // The instance is being created. The instance is inaccessible while it is being created. RedisInstanceStateCreating = "Creating" // The instance is being deleted. - RedisInstanceStateDeleting = "Deleting" + RedisInstanceStateDeleting = "Flushing" ) // RedisInstanceStatus defines the observed state of RedisInstance diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index d3b3eff..9dde425 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -25,6 +25,7 @@ import ( "github.com/pkg/errors" sdkerrors "github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" aliredis "github.com/aliyun/alibaba-cloud-sdk-go/services/r-kvstore" "github.com/crossplane-contrib/provider-alibaba/apis/redis/v1alpha1" @@ -43,7 +44,7 @@ const ( // HTTPSScheme indicates request scheme HTTPSScheme = "https" // VPCNetworkType indicates network type by vpc - VPCNetworkType = "VPC" + // VPCNetworkType = "VPC" ) // Same server error but without requestID @@ -59,7 +60,7 @@ type CleanedServerError struct { type Client interface { DescribeDBInstance(id string) (*DBInstance, error) CreateAccount(id, username, password string) error - CreateDBInstance(*CreateRedisInstanceRequest) (*DBInstance, error) + CreateDBInstance(externalName string, parameters *v1alpha1.RedisInstanceParameters) (*DBInstance, error) DeleteDBInstance(id string) error AllocateInstancePublicConnection(id string, port int) (string, error) ModifyDBInstanceConnectionString(id string, port int) (string, error) @@ -78,21 +79,6 @@ type DBInstance struct { Endpoint *v1alpha1.Endpoint } -// CreateRedisInstanceRequest defines the request info to create DB Instance -type CreateRedisInstanceRequest struct { - Name string - InstanceType string - EngineVersion string - SecurityIPList string - InstanceClass string - Password string - ChargeType string - Port int - NetworkType string - VpcID string - VSwitchID string -} - // ModifyRedisInstanceRequest defines the request info to modify DB Instance type ModifyRedisInstanceRequest struct { InstanceClass string @@ -134,22 +120,31 @@ func (c *client) DescribeDBInstance(id string) (*DBInstance, error) { return in, nil } -func (c *client) CreateDBInstance(req *CreateRedisInstanceRequest) (*DBInstance, error) { +func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstanceParameters) (*DBInstance, error) { request := aliredis.CreateCreateInstanceRequest() - request.Scheme = HTTPSScheme - request.InstanceName = req.Name - request.EngineVersion = req.EngineVersion - request.InstanceClass = req.InstanceClass - request.InstanceType = req.InstanceType - request.ReadTimeout = DefaultReadTime - request.ChargeType = req.ChargeType - request.NetworkType = req.NetworkType + request.Scheme = HTTPSScheme - if req.NetworkType == VPCNetworkType { - request.VpcId = req.VpcID - request.VSwitchId = req.VSwitchID + request.InstanceName = externalName + // request.RegionID = p.RegionID + request.ZoneId = p.ZoneID + request.SecondaryZoneId = p.SecondaryZoneID + request.VpcId = p.VpcID + request.VSwitchId = p.VSwitchID + request.ChargeType = p.ChargeType + request.NetworkType = p.NetworkType + request.InstanceType = p.InstanceType + request.InstanceClass = p.InstanceClass + request.Port = strconv.Itoa(p.Port) + request.EngineVersion = p.EngineVersion + request.ShardCount = requests.NewInteger(p.ShardCount) + + requestTags := make([]aliredis.CreateInstanceTag, len(p.Tag)) + for _, tag := range p.Tag { + requestTags = append(requestTags, aliredis.CreateInstanceTag{Key: tag.Key, Value: tag.Value}) } + request.Tag = &requestTags + resp, err := c.redisCli.CreateInstance(request) if err != nil { return nil, CleanError(err) @@ -195,21 +190,6 @@ func GenerateObservation(db *DBInstance) v1alpha1.RedisInstanceObservation { } } -// MakeCreateDBInstanceRequest generates CreateDBInstanceRequest -func MakeCreateDBInstanceRequest(name string, p *v1alpha1.RedisInstanceParameters) *CreateRedisInstanceRequest { - return &CreateRedisInstanceRequest{ - Name: name, - InstanceType: p.InstanceType, - EngineVersion: p.EngineVersion, - InstanceClass: p.InstanceClass, - Port: p.InstancePort, - NetworkType: p.NetworkType, - VpcID: p.VpcID, - VSwitchID: p.VSwitchID, - ChargeType: p.ChargeType, - } -} - // IsErrorNotFound helper function to test for ErrCodeDBInstanceNotFoundFault error func IsErrorNotFound(err error) bool { if err == nil { diff --git a/pkg/controller/redis/redis_instance.go b/pkg/controller/redis/redis_instance.go index 3ee1038..cc3681e 100644 --- a/pkg/controller/redis/redis_instance.go +++ b/pkg/controller/redis/redis_instance.go @@ -188,22 +188,23 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex } func (e *external) createConnectionIfNeeded(cr *v1alpha1.RedisInstance) (string, string, error) { - if cr.Spec.ForProvider.PubliclyAccessible { - return e.createPublicConnectionIfNeeded(cr) - } + // Henry: No need to support for public access + // if cr.Spec.ForProvider.PubliclyAccessible { + // return e.createPublicConnectionIfNeeded(cr) + // } return e.createPrivateConnectionIfNeeded(cr) } func (e *external) createPrivateConnectionIfNeeded(cr *v1alpha1.RedisInstance) (string, string, error) { domain := cr.Status.AtProvider.DBInstanceID + ".redis.rds.aliyuncs.com" - if cr.Spec.ForProvider.InstancePort == 0 { + if cr.Spec.ForProvider.Port == 0 { return domain, defaultRedisPort, nil } - port := strconv.Itoa(cr.Spec.ForProvider.InstancePort) + port := strconv.Itoa(cr.Spec.ForProvider.Port) if cr.Status.AtProvider.ConnectionReady { return domain, port, nil } - connectionDomain, err := e.client.ModifyDBInstanceConnectionString(cr.Status.AtProvider.DBInstanceID, cr.Spec.ForProvider.InstancePort) + connectionDomain, err := e.client.ModifyDBInstanceConnectionString(cr.Status.AtProvider.DBInstanceID, cr.Spec.ForProvider.Port) if err != nil { // The previous request might fail due to timeout. That's fine we will eventually reconcile it. var sdkerr sdkerror.Error @@ -220,31 +221,31 @@ func (e *external) createPrivateConnectionIfNeeded(cr *v1alpha1.RedisInstance) ( return connectionDomain, port, nil } -func (e *external) createPublicConnectionIfNeeded(cr *v1alpha1.RedisInstance) (string, string, error) { - domain := cr.Status.AtProvider.DBInstanceID + redis.PubilConnectionDomain - if cr.Status.AtProvider.ConnectionReady { - return domain, "", nil - } - port := defaultRedisPort - if cr.Spec.ForProvider.InstancePort != 0 { - port = strconv.Itoa(cr.Spec.ForProvider.InstancePort) - } - _, err := e.client.AllocateInstancePublicConnection(cr.Status.AtProvider.DBInstanceID, cr.Spec.ForProvider.InstancePort) - if err != nil { - // The previous request might fail due to timeout. That's fine we will eventually reconcile it. - var sdkerr sdkerror.Error - if errors.As(err, &sdkerr) { - if sdkerr.ErrorCode() == errDuplicateConnectionPort || sdkerr.ErrorCode() == "NetTypeExists" { - cr.Status.AtProvider.ConnectionReady = true - return domain, port, nil - } - } - return "", "", err - } - - cr.Status.AtProvider.ConnectionReady = true - return domain, port, nil -} +// func (e *external) createPublicConnectionIfNeeded(cr *v1alpha1.RedisInstance) (string, string, error) { +// domain := cr.Status.AtProvider.DBInstanceID + redis.PubilConnectionDomain +// if cr.Status.AtProvider.ConnectionReady { +// return domain, "", nil +// } +// port := defaultRedisPort +// if cr.Spec.ForProvider.InstancePort != 0 { +// port = strconv.Itoa(cr.Spec.ForProvider.InstancePort) +// } +// _, err := e.client.AllocateInstancePublicConnection(cr.Status.AtProvider.DBInstanceID, cr.Spec.ForProvider.InstancePort) +// if err != nil { +// // The previous request might fail due to timeout. That's fine we will eventually reconcile it. +// var sdkerr sdkerror.Error +// if errors.As(err, &sdkerr) { +// if sdkerr.ErrorCode() == errDuplicateConnectionPort || sdkerr.ErrorCode() == "NetTypeExists" { +// cr.Status.AtProvider.ConnectionReady = true +// return domain, port, nil +// } +// } +// return "", "", err +// } + +// cr.Status.AtProvider.ConnectionReady = true +// return domain, port, nil +// } func (e *external) createAccountIfNeeded(cr *v1alpha1.RedisInstance) (string, error) { if cr.Status.AtProvider.AccountReady { @@ -288,8 +289,7 @@ func (e *external) Create(ctx context.Context, mg resource.Managed) (managed.Ext return managed.ExternalCreation{}, nil } - req := redis.MakeCreateDBInstanceRequest(meta.GetExternalName(cr), &cr.Spec.ForProvider) - instance, err := e.client.CreateDBInstance(req) + instance, err := e.client.CreateDBInstance(meta.GetExternalName(cr), &cr.Spec.ForProvider) if err != nil { return managed.ExternalCreation{}, errors.Wrap(err, errCreateFailed) } diff --git a/pkg/controller/redis/redisinstance_test.go b/pkg/controller/redis/redisinstance_test.go index 64be436..d9d07be 100644 --- a/pkg/controller/redis/redisinstance_test.go +++ b/pkg/controller/redis/redisinstance_test.go @@ -285,7 +285,7 @@ func TestObserve(t *testing.T) { Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{ MasterUsername: testName, - InstancePort: 1234, + Port: 1234, }, }, Status: v1alpha1.RedisInstanceStatus{ @@ -302,9 +302,9 @@ func TestObserve(t *testing.T) { mg: &v1alpha1.RedisInstance{ Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{ - MasterUsername: testName, - PubliclyAccessible: true, - InstancePort: 123, + MasterUsername: testName, + // PubliclyAccessible: true, + Port: 123, }, }, Status: v1alpha1.RedisInstanceStatus{ @@ -373,11 +373,11 @@ func TestCreate(t *testing.T) { }, Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{ - MasterUsername: testName, - EngineVersion: "5.0", - InstanceClass: "redis.logic.sharding.2g.8db.0rodb.8proxy.default", - InstancePort: 8080, - PubliclyAccessible: true, + MasterUsername: testName, + EngineVersion: "5.0", + InstanceClass: "redis.logic.sharding.2g.8db.0rodb.8proxy.default", + Port: 8080, + // PubliclyAccessible: true, }, }, }, @@ -636,8 +636,8 @@ func (c *fakeRedisClient) DescribeDBInstance(id string) (*redis.DBInstance, erro }, nil } -func (c *fakeRedisClient) CreateDBInstance(req *redis.CreateRedisInstanceRequest) (*redis.DBInstance, error) { - if req.Name != testName { +func (c *fakeRedisClient) CreateDBInstance(instanceName string, p *v1alpha1.RedisInstanceParameters) (*redis.DBInstance, error) { + if instanceName != testName { return nil, errors.New("CreateRedisInstance: client doesn't work") } return &redis.DBInstance{ From 38694c249f7187af0e4f06adf8a3f9cdb64c1895 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Wed, 15 May 2024 17:08:15 -0700 Subject: [PATCH 06/30] add connection details to the cr status remove unneeded connection sync update generated redis crd Signed-off-by: Henry Zeng --- apis/redis/v1alpha1/redis_types.go | 3 + apis/redis/v1alpha1/zz_generated.deepcopy.go | 1 + ....alibaba.crossplane.io_redisinstances.yaml | 11 +++ pkg/clients/redis/redis.go | 68 +++++++++-------- pkg/controller/redis/redis_instance.go | 76 +++++++++---------- 5 files changed, 89 insertions(+), 70 deletions(-) diff --git a/apis/redis/v1alpha1/redis_types.go b/apis/redis/v1alpha1/redis_types.go index 2a75db6..af3ba18 100644 --- a/apis/redis/v1alpha1/redis_types.go +++ b/apis/redis/v1alpha1/redis_types.go @@ -172,6 +172,9 @@ type RedisInstanceObservation struct { // ConnectionReady specifies whether the network connect is ready ConnectionReady bool `json:"connectionReady"` + + // Endpoint contains address and port used to connect with the Redis instance + Endpoint Endpoint `json:"endpoint"` } // Endpoint is the redis endpoint diff --git a/apis/redis/v1alpha1/zz_generated.deepcopy.go b/apis/redis/v1alpha1/zz_generated.deepcopy.go index 5058f3b..02e588b 100644 --- a/apis/redis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/redis/v1alpha1/zz_generated.deepcopy.go @@ -102,6 +102,7 @@ func (in *RedisInstanceList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RedisInstanceObservation) DeepCopyInto(out *RedisInstanceObservation) { *out = *in + out.Endpoint = in.Endpoint } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisInstanceObservation. diff --git a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml index 222e7b6..41c58b0 100644 --- a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml +++ b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml @@ -184,10 +184,21 @@ spec: dbInstanceStatus: description: DBInstanceStatus specifies the current state of this database. type: string + endpoint: + description: Endpoint contains address and port used to connect with the Redis instance + properties: + address: + description: Address specifies the DNS address of the Redis instance. + type: string + port: + description: Port specifies the port that the database engine is listening on. + type: string + type: object required: - accountReady - connectionReady - dbInstanceID + - endpoint type: object conditions: description: Conditions of the resource. diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index 9dde425..c140a12 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -40,7 +40,7 @@ const ( // DefaultReadTime indicates default connect timeout number DefaultReadTime = 60 * time.Second // PubilConnectionDomain indicates instances connect domain - PubilConnectionDomain = "-pb.redis.rds.aliyuncs.com" + // PubilConnectionDomain = "-pb.redis.rds.aliyuncs.com" // HTTPSScheme indicates request scheme HTTPSScheme = "https" // VPCNetworkType indicates network type by vpc @@ -62,8 +62,8 @@ type Client interface { CreateAccount(id, username, password string) error CreateDBInstance(externalName string, parameters *v1alpha1.RedisInstanceParameters) (*DBInstance, error) DeleteDBInstance(id string) error - AllocateInstancePublicConnection(id string, port int) (string, error) - ModifyDBInstanceConnectionString(id string, port int) (string, error) + // AllocateInstancePublicConnection(id string, port int) (string, error) + // ModifyDBInstanceConnectionString(id string, port int) (string, error) Update(id string, req *ModifyRedisInstanceRequest) error } @@ -115,6 +115,10 @@ func (c *client) DescribeDBInstance(id string) (*DBInstance, error) { in := &DBInstance{ ID: rsp.InstanceId, Status: rsp.InstanceStatus, + Endpoint: &v1alpha1.Endpoint{ + Address: rsp.ConnectionDomain, + Port: strconv.FormatInt(rsp.Port, 10), + }, } return in, nil @@ -187,6 +191,10 @@ func GenerateObservation(db *DBInstance) v1alpha1.RedisInstanceObservation { return v1alpha1.RedisInstanceObservation{ DBInstanceStatus: db.Status, DBInstanceID: db.ID, + Endpoint: v1alpha1.Endpoint{ + Address: db.Endpoint.Address, + Port: db.Endpoint.Port, + }, } } @@ -204,33 +212,33 @@ func IsErrorNotFound(err error) bool { return srverr.ErrorCode() == "InvalidInstanceId.NotFound" } -func (c *client) AllocateInstancePublicConnection(id string, port int) (string, error) { - request := aliredis.CreateAllocateInstancePublicConnectionRequest() - request.Scheme = HTTPSScheme - request.InstanceId = id - request.ConnectionStringPrefix = id + PubilConnectionDomain - request.Port = strconv.Itoa(port) - request.ReadTimeout = DefaultReadTime - _, err := c.redisCli.AllocateInstancePublicConnection(request) - if err != nil { - return "", CleanError(err) - } - return request.ConnectionStringPrefix, err -} - -func (c *client) ModifyDBInstanceConnectionString(id string, port int) (string, error) { - request := aliredis.CreateModifyDBInstanceConnectionStringRequest() - request.Scheme = HTTPSScheme - request.DBInstanceId = id - request.CurrentConnectionString = id + PubilConnectionDomain - request.Port = strconv.Itoa(port) - request.ReadTimeout = DefaultReadTime - _, err := c.redisCli.ModifyDBInstanceConnectionString(request) - if err != nil { - return "", CleanError(err) - } - return request.CurrentConnectionString, err -} +// func (c *client) AllocateInstancePublicConnection(id string, port int) (string, error) { +// request := aliredis.CreateAllocateInstancePublicConnectionRequest() +// request.Scheme = HTTPSScheme +// request.InstanceId = id +// request.ConnectionStringPrefix = id + PubilConnectionDomain +// request.Port = strconv.Itoa(port) +// request.ReadTimeout = DefaultReadTime +// _, err := c.redisCli.AllocateInstancePublicConnection(request) +// if err != nil { +// return "", CleanError(err) +// } +// return request.ConnectionStringPrefix, err +// } + +// func (c *client) ModifyDBInstanceConnectionString(id string, port int) (string, error) { +// request := aliredis.CreateModifyDBInstanceConnectionStringRequest() +// request.Scheme = HTTPSScheme +// request.DBInstanceId = id +// request.CurrentConnectionString = id + PubilConnectionDomain +// request.Port = strconv.Itoa(port) +// request.ReadTimeout = DefaultReadTime +// _, err := c.redisCli.ModifyDBInstanceConnectionString(request) +// if err != nil { +// return "", CleanError(err) +// } +// return request.CurrentConnectionString, err +// } func (c *client) Update(id string, req *ModifyRedisInstanceRequest) error { if req.InstanceClass == "" { diff --git a/pkg/controller/redis/redis_instance.go b/pkg/controller/redis/redis_instance.go index cc3681e..ceb6658 100644 --- a/pkg/controller/redis/redis_instance.go +++ b/pkg/controller/redis/redis_instance.go @@ -19,7 +19,6 @@ package redis import ( "context" "fmt" - "strconv" sdkerror "github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors" xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" @@ -159,14 +158,9 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex switch cr.Status.AtProvider.DBInstanceStatus { case v1alpha1.RedisInstanceStateRunning: cr.Status.SetConditions(xpv1.Available()) - address, port, err := e.createConnectionIfNeeded(cr) - if err != nil { - return managed.ExternalObservation{}, errors.Wrap(err, errCreateInstanceConnectionFailed) - } - instance.Endpoint = &v1alpha1.Endpoint{ - Address: address, - Port: port, - } + + // TODO: Support update connection port + cr.Status.AtProvider.ConnectionReady = true pw, err = e.createAccountIfNeeded(cr) if err != nil { @@ -187,39 +181,41 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex }, nil } -func (e *external) createConnectionIfNeeded(cr *v1alpha1.RedisInstance) (string, string, error) { - // Henry: No need to support for public access - // if cr.Spec.ForProvider.PubliclyAccessible { - // return e.createPublicConnectionIfNeeded(cr) - // } - return e.createPrivateConnectionIfNeeded(cr) -} +// Henry: No need to support for public access +// We don't need to call this method as the port and address are automatically configured now +// func (e *external) createConnectionIfNeeded(cr *v1alpha1.RedisInstance) (string, string, error) { -func (e *external) createPrivateConnectionIfNeeded(cr *v1alpha1.RedisInstance) (string, string, error) { - domain := cr.Status.AtProvider.DBInstanceID + ".redis.rds.aliyuncs.com" - if cr.Spec.ForProvider.Port == 0 { - return domain, defaultRedisPort, nil - } - port := strconv.Itoa(cr.Spec.ForProvider.Port) - if cr.Status.AtProvider.ConnectionReady { - return domain, port, nil - } - connectionDomain, err := e.client.ModifyDBInstanceConnectionString(cr.Status.AtProvider.DBInstanceID, cr.Spec.ForProvider.Port) - if err != nil { - // The previous request might fail due to timeout. That's fine we will eventually reconcile it. - var sdkerr sdkerror.Error - if errors.As(err, &sdkerr) { - if sdkerr.ErrorCode() == errDuplicateConnectionPort { - cr.Status.AtProvider.ConnectionReady = true - return domain, port, nil - } - } - return "", "", err - } +// if cr.Spec.ForProvider.PubliclyAccessible { +// return e.createPublicConnectionIfNeeded(cr) +// } +// return e.createPrivateConnectionIfNeeded(cr) +// } - cr.Status.AtProvider.ConnectionReady = true - return connectionDomain, port, nil -} +// func (e *external) createPrivateConnectionIfNeeded(cr *v1alpha1.RedisInstance) (string, string, error) { +// domain := cr.Status.AtProvider.DBInstanceID + ".redis.rds.aliyuncs.com" +// if cr.Spec.ForProvider.Port == 0 { +// return domain, defaultRedisPort, nil +// } +// port := strconv.Itoa(cr.Spec.ForProvider.Port) +// if cr.Status.AtProvider.ConnectionReady { +// return domain, port, nil +// } +// connectionDomain, err := e.client.ModifyDBInstanceConnectionString(cr.Status.AtProvider.DBInstanceID, cr.Spec.ForProvider.Port) +// if err != nil { +// // The previous request might fail due to timeout. That's fine we will eventually reconcile it. +// var sdkerr sdkerror.Error +// if errors.As(err, &sdkerr) { +// if sdkerr.ErrorCode() == errDuplicateConnectionPort { +// cr.Status.AtProvider.ConnectionReady = true +// return domain, port, nil +// } +// } +// return "", "", err +// } + +// cr.Status.AtProvider.ConnectionReady = true +// return connectionDomain, port, nil +// } // func (e *external) createPublicConnectionIfNeeded(cr *v1alpha1.RedisInstance) (string, string, error) { // domain := cr.Status.AtProvider.DBInstanceID + redis.PubilConnectionDomain From a8b0f3ea7cd326d8ce2c7ef42b8ed757927a8c37 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Thu, 16 May 2024 14:05:08 -0700 Subject: [PATCH 07/30] make vpc and vswitch id not optional Signed-off-by: Henry Zeng --- apis/redis/v1alpha1/redis_types.go | 6 +----- .../crds/redis.alibaba.crossplane.io_redisinstances.yaml | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/apis/redis/v1alpha1/redis_types.go b/apis/redis/v1alpha1/redis_types.go index af3ba18..62bbe99 100644 --- a/apis/redis/v1alpha1/redis_types.go +++ b/apis/redis/v1alpha1/redis_types.go @@ -86,26 +86,21 @@ type Tag struct { type RedisInstanceParameters struct { // The ID of the region where you want to create the instance. // +immutable - // +optional RegionID string `json:"regionId,omitempty"` // The primary zone ID of the instance. - // +optional ZoneID string `json:"zoneId,omitempty"` // The secondary zone ID of the instance. // The master node and replica node of the instance can be deployed in different zones and disaster recovery is implemented across zones. - // +optional SecondaryZoneID string `json:"secondaryZoneId,omitempty"` // The ID of the virtual private cloud (VPC). // +immutable - // +optional VpcID string `json:"vpcId,omitempty"` // VSwitchId is indicates VSwitch ID // +immutable - // +optional VSwitchID string `json:"vSwitchId,omitempty"` // ChargeType is indicates payment type @@ -134,6 +129,7 @@ type RedisInstanceParameters struct { // Port is indicates the database service port // +optional + // +kubebuilder:default=6379 Port int `json:"port,omitempty"` // EngineVersion indicates the database engine version. diff --git a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml index 41c58b0..17609c8 100644 --- a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml +++ b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml @@ -92,6 +92,7 @@ spec: description: NetworkType is indicates service network type NetworkType:CLASSIC/VPC type: string port: + default: 6379 description: Port is indicates the database service port type: integer regionId: From 0ce11003d338ea6e7f5d43f5849ce0534ab8a344 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Thu, 23 May 2024 11:26:46 -0700 Subject: [PATCH 08/30] change example region to eu; fix redis cr example Signed-off-by: Henry Zeng --- examples/provider.yaml | 2 +- examples/redis/redis.yaml | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/examples/provider.yaml b/examples/provider.yaml index abdadf8..8669504 100644 --- a/examples/provider.yaml +++ b/examples/provider.yaml @@ -16,4 +16,4 @@ spec: namespace: crossplane-system name: alibaba-account-creds key: credentials - region: cn-beijing + region: eu-central-1 diff --git a/examples/redis/redis.yaml b/examples/redis/redis.yaml index 609b9ac..4416121 100644 --- a/examples/redis/redis.yaml +++ b/examples/redis/redis.yaml @@ -7,11 +7,17 @@ metadata: engine: redis spec: forProvider: + regionId: eu-central-1 + zoneId: eu-central-1a + secondaryZoneId: eu-central-1c + chargeType: PostPaid + networkType: VPC instanceType: Redis - engineVersion: "5.0" - instanceClass: redis.basic.small.default + instanceClass: redis.shard.small.ce port: 8080 - publiclyAccessible: true + engineVersion: "5.0" + shardCount: 2 + masterUsername: exampleUser writeConnectionSecretToRef: namespace: crossplane-system name: example-redis From 1b5b90b0e197c72138d78af58adb055f35171cfc Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Thu, 23 May 2024 15:15:18 -0700 Subject: [PATCH 09/30] match apis with the spec from AliCloud official site Signed-off-by: Henry Zeng --- apis/redis/v1alpha1/redis_types.go | 268 +++++++++++++++--- ....alibaba.crossplane.io_redisinstances.yaml | 110 +++++-- 2 files changed, 312 insertions(+), 66 deletions(-) diff --git a/apis/redis/v1alpha1/redis_types.go b/apis/redis/v1alpha1/redis_types.go index 62bbe99..4c0db12 100644 --- a/apis/redis/v1alpha1/redis_types.go +++ b/apis/redis/v1alpha1/redis_types.go @@ -83,76 +83,264 @@ type Tag struct { } // RedisInstanceParameters define the desired state of an Redis instance. +// Detailed information can be found in https://www.alibabacloud.com/help/en/redis/developer-reference/api-r-kvstore-2015-01-01-createinstance-redis type RedisInstanceParameters struct { // The ID of the region where you want to create the instance. - // +immutable RegionID string `json:"regionId,omitempty"` + // The client token that is used to ensure the idempotence of the request. + // You can use the client to generate the value, but you must make sure that the token is + // unique among different requests. The token is case-sensitive. + // The token can contain only ASCII characters and cannot exceed 64 characters in length. + // +optional + Token string `json:"token,omitempty"` + + // The name of the instance. The name must be 2 to 80 characters in length and must start with a letter. + // It cannot contain spaces or specific special characters. These special characters include @ / : = " < > { [ ] } + // +optional + InstanceName string `json:"instanceName,omitempty"` + + // The password that is used to connect to the instance. The password must be 8 to 32 characters + // in length and must contain at least three of the following character types: uppercase letters, + // lowercase letters, digits, and specific special characters. These special characters include ! @ # $ % ^ & * ( ) _ + - = + // +optional + Password string `json:"password,omitempty"` + + // The storage capacity of the instance. Unit: MB. + // Note: You must specify at least one of the Capacity and InstanceClass parameters when you call this operation. + // +optional + Capacity string `json:"capacity,omitempty"` + + // The instance type. + // For example, redis.master.small.default indicates a Community Edition + // standard master-replica instance that has 1 GB of memory. + // For more information, see https://www.alibabacloud.com/help/en/redis/product-overview/overview-4. + // +optional + InstanceClass string `json:"instanceClass,omitempty"` + // The primary zone ID of the instance. ZoneID string `json:"zoneId,omitempty"` - // The secondary zone ID of the instance. - // The master node and replica node of the instance can be deployed in different zones and disaster recovery is implemented across zones. - SecondaryZoneID string `json:"secondaryZoneId,omitempty"` + // ChargeType is indicates payment type + // Default value: PrePaid. + // Valid values: + // PrePaid: subscription + // PostPaid: pay-as-you-go + // +optional + ChargeType string `json:"chargeType,omitempty"` + + // The node type. + // Valid values: + // MASTER_SLAVE: high availability (master-replica) + // STAND_ALONE: standalone + // double: master-replica + // single: standalone + // Note: To create a cloud-native instance, set this parameter to MASTER_SLAVE or STAND_ALONE. + // To create a classic instance, set this parameter to double or single. + // +optional + NodeType string `json:"nodeType,omitempty"` + + // The network type of the instance. + // Default value: + // VPC + // Valid values: + // VPC + // +optional + NetworkType string `json:"networkType,omitempty"` // The ID of the virtual private cloud (VPC). - // +immutable + // +optional VpcID string `json:"vpcId,omitempty"` - // VSwitchId is indicates VSwitch ID - // +immutable + // The ID of the vSwitch to which you want the instance to connect. + // +optional VSwitchID string `json:"vSwitchId,omitempty"` - // ChargeType is indicates payment type - // ChargeType:PrePaid/PostPaid + // The subscription duration. + // Valid values: + // 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24,36, and 60. + // Unit: + // months. + // Note: This parameter is available and required only if the ChargeType parameter is set to PrePaid. // +optional - // +kubebuilder:default="PostPaid" - ChargeType string `json:"chargeType"` + Period string `json:"period,omitempty"` - // NetworkType is indicates service network type - // NetworkType:CLASSIC/VPC + // The ID of the promotional event or business information. // +optional - // +immutable - // +kubebuilder:default="VPC" - NetworkType string `json:"networkType"` + BusinessInfo string `json:"businessInfo,omitempty"` - // Engine is the name of the database engine to be used for this instance. - // Engine is a required field. - // +immutable - // +kubebuilder:validation:Enum=Redis - InstanceType string `json:"instanceType"` + // The coupon code. + // Default value: + // default. + // +optional + CouponNo string `json:"couponNo,omitempty"` - // The instance type. - // For example, redis.master.small.default indicates a Community Edition - // standard master-replica instance that has 1 GB of memory. - InstanceClass string `json:"instanceClass"` + // The ID of the original instance. If you want to create an instance based on a + // backup file of a specified instance, you can specify this parameter and use + // the BackupId or RestoreTime parameter to specify the backup file. + // +optional + SrcDBInstanceId string `json:"srcDBInstanceId,omitempty"` + + // The ID of the backup file of the original instance. If you want to create + // an instance based on a backup file of a specified instance, you can specify + // this parameter after you specify the SrcDBInstanceId parameter. + // Then, the system creates an instance based on the backup file that is specified by this parameter. + // Note: + // After you specify the SrcDBInstanceId parameter, + // you must use the BackupId or RestoreTime parameter to specify the backup file. + // +optional + BackupId string `json:"backupId,omitempty"` + + // The category of the instance. + // Default value: + // Redis + // Valid values: + // Redis + // Memcache + // +optional + InstanceType string `json:"instanceType,omitempty"` + + // The database engine version of the instance. + // Valid values: + // 4.0 + // 5.0 + // 6.0 + // 7.0 + // +optional + EngineVersion string `json:"engineVersion,omitempty"` - // Port is indicates the database service port + // The private IP address of the instance. + // Note: + // The private IP address must be available within the CIDR block + // of the vSwitch to which to connect the instance. + // +optional + PrivateIpAddress string `json:"privateIpAddress,omitempty"` + + // Specifies whether to use a coupon. + // Default value: + // false + // Valid values: + // true: uses a coupon + // false: does not use a coupon + // +optional + AutoUseCoupon string `json:"autoUseCoupon,omitempty"` + + // Specifies whether to enable auto-renewal for the instance. + // Default value: + // false + // Valid values: + // true: enables auto-renewal + // false: disables auto-renewal // +optional - // +kubebuilder:default=6379 - Port int `json:"port,omitempty"` + AutoRenew string `json:"autoRenew,omitempty"` + + // The subscription duration that is supported by auto-renewal. + // Unit: months. + // Valid values: + // 1, 2, 3, 6, and 12 + // Note: + // This parameter is required only if the AutoRenew parameter is set to true. + // +optional + AutoRenewPeriod string `json:"autoRenewPeriod,omitempty"` - // EngineVersion indicates the database engine version. - // +kubebuilder:validation:Enum="4.0";"5.0";"6.0";"7.0" - EngineVersion string `json:"engineVersion,omitempty"` + // The ID of the resource group. + // +optional + ResourceGroupId string `json:"resourceGroupId,omitempty"` + + // The point in time at which the specified original instance is backed up. + // The point in time must be within the retention period of backup files of the + // original instance. If you want to create an instance based on a backup file of + // a specified instance, you can set this parameter to specify a point in time after + // you set the SrcDBInstanceId parameter. Then, the system creates an instance based + // on the backup file that was created at the specified point in time for the + // original instance. Specify the time in the ISO 8601 standard in the + // yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. + // Note: + // After you specify the SrcDBInstanceId parameter, you must use the BackupId or + // RestoreTime parameter to specify the backup file. + // +optional + RestoreTime string `json:"restoreTime,omitempty"` + + // The ID of the dedicated cluster. This parameter is required if you create an + // instance in a dedicated cluster. + // +optional + DedicatedHostGroupId string `json:"dedicatedHostGroupId,omitempty"` // The number of data shards. // This parameter is available only if you create a cluster instance that uses cloud disks. - ShardCount int `json:"shardCount"` + // +optional + ShardCount int `json:"shardCount,omitempty"` + + // The number of read-only nodes in the instance. This parameter is available + // only if you create a read/write splitting instance that uses cloud disks. + // Valid values: + // 1 to 5 + // +optional + ReadOnlyCount int `json:"readOnlyCount,omitempty"` + + // The ID of the distributed instance. This parameter is available only on the China site (aliyun.com). + // +optional + GlobalInstanceId string `json:"globalInstanceId,omitempty"` + + // Specifies whether to use the new instance as the first child instance of the distributed instance. + // Default value: + // false + // Valid values: + // true: uses the new instance as the first child instance + // false: does not use the new instance as the first child instance + // If you want to create an ApsaraDB for Redis Enhanced Edition (Tair) DRAM-based instance that + // runs Redis 5.0, you must set this parameter to true. + // This parameter is available only on the China site (aliyun.com). + // +optional + GlobalInstance bool `json:"globalInstance,omitempty"` + + // The secondary zone ID of the instance. + // The master node and replica node of the instance can be deployed in different zones and disaster + // recovery is implemented across zones. + // Note: + // If you specify this parameter, the master node and replica node of the instance can be + // deployed in different zones and disaster recovery is implemented across zones. + // The instance can withstand failures in data centers. + // +optional + SecondaryZoneID string `json:"secondaryZoneId,omitempty"` + + // Port is indicates the database service port + // Valid values: + // 1024 to 65535 + // Default value: + // 6379 + // +optional + Port string `json:"port,omitempty"` + + // The global IP whitelist template for the instance. Multiple IP whitelist templates should + // be separated by English commas (,) and cannot be duplicated. + // +optional + GlobalSecurityGroupIds string `json:"globalSecurityGroupIds,omitempty"` + + // Specifies whether to enable append-only file (AOF) persistence for the instance. + // Valid values: + // yes (default): enables AOF persistence + // no: disables AOF persistence + // Description: + // This parameter is applicable to classic instances, and is unavailable for cloud-native instances. + // +optional + Appendonly string `json:"appendonly,omitempty"` + + // The operation that you want to perform. Set the value to AllocateInstancePublicConnection. + // +optional + ConnectionStringPrefix string `json:"connectionStringPrefix,omitempty"` + + // The parameter template ID, which must be globally unique. + // +optional + ParamGroupId string `json:"paramGroupId,omitempty"` // The tags of the instance. // +optional Tag []Tag `json:"tag,omitempty"` - // MasterUsername is the name for the master user. - // Constraints: - // * Required for Redis. - // * Must be 1 to 16 letters or numbers. - // * First character must be a letter. - // * Cannot be a reserved word for the chosen database engine. - // +immutable + // The backup set ID. // +optional - MasterUsername string `json:"masterUsername"` + ClusterBackupId string `json:"clusterBackupId,omitempty"` } // RedisInstanceObservation is the representation of the current state that is observed. diff --git a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml index 17609c8..8acc92d 100644 --- a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml +++ b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml @@ -62,48 +62,107 @@ spec: - Delete type: string forProvider: - description: RedisInstanceParameters define the desired state of an Redis instance. + description: RedisInstanceParameters define the desired state of an Redis instance. Detailed information can be found in https://www.alibabacloud.com/help/en/redis/developer-reference/api-r-kvstore-2015-01-01-createinstance-redis properties: + appendonly: + description: "Specifies whether to enable append-only file (AOF) persistence for the instance. Valid values: \t\tyes (default): enables AOF persistence \t\tno: disables AOF persistence Description: \t\tThis parameter is applicable to classic instances, and is unavailable for cloud-native instances." + type: string + autoRenew: + description: "Specifies whether to enable auto-renewal for the instance. Default value: \t\tfalse \tValid values: \t\ttrue: enables auto-renewal \t\tfalse: disables auto-renewal" + type: string + autoRenewPeriod: + description: "The subscription duration that is supported by auto-renewal. Unit: months. Valid values: \t\t1, 2, 3, 6, and 12 Note: \t\tThis parameter is required only if the AutoRenew parameter is set to true." + type: string + autoUseCoupon: + description: "Specifies whether to use a coupon. Default value: \t\tfalse Valid values: \t\ttrue: uses a coupon \t\tfalse: does not use a coupon" + type: string + backupId: + description: "The ID of the backup file of the original instance. If you want to create an instance based on a backup file of a specified instance, you can specify this parameter after you specify the SrcDBInstanceId parameter. Then, the system creates an instance based on the backup file that is specified by this parameter. Note: \t\tAfter you specify the SrcDBInstanceId parameter, \t\tyou must use the BackupId or RestoreTime parameter to specify the backup file." + type: string + businessInfo: + description: The ID of the promotional event or business information. + type: string + capacity: + description: 'The storage capacity of the instance. Unit: MB. Note: You must specify at least one of the Capacity and InstanceClass parameters when you call this operation.' + type: string chargeType: - default: PostPaid - description: ChargeType is indicates payment type ChargeType:PrePaid/PostPaid + description: "ChargeType is indicates payment type Default value: PrePaid. Valid values: \t\tPrePaid: subscription \t\tPostPaid: pay-as-you-go" + type: string + clusterBackupId: + description: The backup set ID. + type: string + connectionStringPrefix: + description: The operation that you want to perform. Set the value to AllocateInstancePublicConnection. + type: string + couponNo: + description: "The coupon code. Default value: \t\tdefault." + type: string + dedicatedHostGroupId: + description: The ID of the dedicated cluster. This parameter is required if you create an instance in a dedicated cluster. type: string engineVersion: - description: EngineVersion indicates the database engine version. - enum: - - "4.0" - - "5.0" - - "6.0" - - "7.0" + description: "The database engine version of the instance. Valid values: \t\t4.0 \t\t5.0 \t\t6.0 \t\t7.0" + type: string + globalInstance: + description: "Specifies whether to use the new instance as the first child instance of the distributed instance. Default value: \t\tfalse Valid values: \t\ttrue: uses the new instance as the first child instance \t\tfalse: does not use the new instance as the first child instance If you want to create an ApsaraDB for Redis Enhanced Edition (Tair) DRAM-based instance that runs Redis 5.0, you must set this parameter to true. This parameter is available only on the China site (aliyun.com)." + type: boolean + globalInstanceId: + description: The ID of the distributed instance. This parameter is available only on the China site (aliyun.com). + type: string + globalSecurityGroupIds: + description: The global IP whitelist template for the instance. Multiple IP whitelist templates should be separated by English commas (,) and cannot be duplicated. type: string instanceClass: - description: The instance type. For example, redis.master.small.default indicates a Community Edition standard master-replica instance that has 1 GB of memory. + description: The instance type. For example, redis.master.small.default indicates a Community Edition standard master-replica instance that has 1 GB of memory. For more information, see https://www.alibabacloud.com/help/en/redis/product-overview/overview-4. type: string - instanceType: - description: Engine is the name of the database engine to be used for this instance. Engine is a required field. - enum: - - Redis + instanceName: + description: 'The name of the instance. The name must be 2 to 80 characters in length and must start with a letter. It cannot contain spaces or specific special characters. These special characters include @ / : = " < > { [ ] }' type: string - masterUsername: - description: 'MasterUsername is the name for the master user. Constraints: * Required for Redis. * Must be 1 to 16 letters or numbers. * First character must be a letter. * Cannot be a reserved word for the chosen database engine.' + instanceType: + description: "The category of the instance. \tDefault value: \t\tRedis \tValid values: \t\tRedis \t\tMemcache" type: string networkType: - default: VPC - description: NetworkType is indicates service network type NetworkType:CLASSIC/VPC + description: "The network type of the instance. Default value: \t\tVPC Valid values: \t\tVPC" + type: string + nodeType: + description: "The node type. Valid values: \t\tMASTER_SLAVE: high availability (master-replica) \t\tSTAND_ALONE: standalone \t\tdouble: master-replica \t\tsingle: standalone Note: To create a cloud-native instance, set this parameter to MASTER_SLAVE or STAND_ALONE. To create a classic instance, set this parameter to double or single." + type: string + paramGroupId: + description: The parameter template ID, which must be globally unique. + type: string + password: + description: 'The password that is used to connect to the instance. The password must be 8 to 32 characters in length and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and specific special characters. These special characters include ! @ # $ % ^ & * ( ) _ + - =' + type: string + period: + description: "The subscription duration. Valid values: \t\t1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24,36, and 60. Unit: \t\tmonths. Note: This parameter is available and required only if the ChargeType parameter is set to PrePaid." type: string port: - default: 6379 - description: Port is indicates the database service port + description: "Port is indicates the database service port Valid values: \t\t1024 to 65535 Default value: \t\t6379" + type: string + privateIpAddress: + description: "The private IP address of the instance. Note: \t\tThe private IP address must be available within the CIDR block \t\tof the vSwitch to which to connect the instance." + type: string + readOnlyCount: + description: "The number of read-only nodes in the instance. This parameter is available only if you create a read/write splitting instance that uses cloud disks. Valid values: \t\t1 to 5" type: integer regionId: description: The ID of the region where you want to create the instance. type: string + resourceGroupId: + description: The ID of the resource group. + type: string + restoreTime: + description: "The point in time at which the specified original instance is backed up. The point in time must be within the retention period of backup files of the original instance. If you want to create an instance based on a backup file of a specified instance, you can set this parameter to specify a point in time after you set the SrcDBInstanceId parameter. Then, the system creates an instance based on the backup file that was created at the specified point in time for the original instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Note: \t\tAfter you specify the SrcDBInstanceId parameter, you must use the BackupId or \t\tRestoreTime parameter to specify the backup file." + type: string secondaryZoneId: - description: The secondary zone ID of the instance. The master node and replica node of the instance can be deployed in different zones and disaster recovery is implemented across zones. + description: "The secondary zone ID of the instance. The master node and replica node of the instance can be deployed in different zones and disaster recovery is implemented across zones. Note: \t\tIf you specify this parameter, the master node and replica node of the instance can be \t\tdeployed in different zones and disaster recovery is implemented across zones. \t\tThe instance can withstand failures in data centers." type: string shardCount: description: The number of data shards. This parameter is available only if you create a cluster instance that uses cloud disks. type: integer + srcDBInstanceId: + description: The ID of the original instance. If you want to create an instance based on a backup file of a specified instance, you can specify this parameter and use the BackupId or RestoreTime parameter to specify the backup file. + type: string tag: description: The tags of the instance. items: @@ -119,8 +178,11 @@ spec: - key type: object type: array + token: + description: The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the token is unique among different requests. The token is case-sensitive. The token can contain only ASCII characters and cannot exceed 64 characters in length. + type: string vSwitchId: - description: VSwitchId is indicates VSwitch ID + description: The ID of the vSwitch to which you want the instance to connect. type: string vpcId: description: The ID of the virtual private cloud (VPC). @@ -128,10 +190,6 @@ spec: zoneId: description: The primary zone ID of the instance. type: string - required: - - instanceClass - - instanceType - - shardCount type: object providerConfigRef: description: ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. From 49fde37388851a1247dabb413795f2847f95836f Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Thu, 23 May 2024 16:51:31 -0700 Subject: [PATCH 10/30] adapt all parameters from AliCloud API; fix unit tests Signed-off-by: Henry Zeng --- pkg/clients/redis/redis.go | 42 ++++++++--- pkg/clients/redis/redis_test.go | 9 ++- pkg/controller/redis/redis_instance.go | 22 +++--- pkg/controller/redis/redisinstance_test.go | 85 +++++++++++----------- 4 files changed, 94 insertions(+), 64 deletions(-) diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index c140a12..bb9c101 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -39,12 +39,9 @@ var ( const ( // DefaultReadTime indicates default connect timeout number DefaultReadTime = 60 * time.Second - // PubilConnectionDomain indicates instances connect domain - // PubilConnectionDomain = "-pb.redis.rds.aliyuncs.com" + // HTTPSScheme indicates request scheme HTTPSScheme = "https" - // VPCNetworkType indicates network type by vpc - // VPCNetworkType = "VPC" ) // Same server error but without requestID @@ -129,19 +126,44 @@ func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstance request.Scheme = HTTPSScheme - request.InstanceName = externalName + // Seems regionID will be by default from the first part ZoneID // request.RegionID = p.RegionID + request.Token = p.Token + request.InstanceName = externalName + request.Password = p.Password + request.Capacity = requests.Integer(p.Capacity) + request.InstanceClass = p.InstanceClass request.ZoneId = p.ZoneID - request.SecondaryZoneId = p.SecondaryZoneID - request.VpcId = p.VpcID - request.VSwitchId = p.VSwitchID request.ChargeType = p.ChargeType + request.NodeType = p.NodeType request.NetworkType = p.NetworkType + request.VpcId = p.VpcID + request.VSwitchId = p.VSwitchID + request.Period = p.Period + request.BusinessInfo = p.BusinessInfo + request.CouponNo = p.CouponNo + request.SrcDBInstanceId = p.SrcDBInstanceId + request.BackupId = p.BackupId request.InstanceType = p.InstanceType - request.InstanceClass = p.InstanceClass - request.Port = strconv.Itoa(p.Port) request.EngineVersion = p.EngineVersion + request.PrivateIpAddress = p.PrivateIpAddress + request.AutoUseCoupon = p.AutoUseCoupon + request.AutoRenew = p.AutoRenew + request.AutoRenewPeriod = p.AutoRenewPeriod + request.ResourceGroupId = p.ResourceGroupId + request.RestoreTime = p.RestoreTime + request.DedicatedHostGroupId = p.DedicatedHostGroupId request.ShardCount = requests.NewInteger(p.ShardCount) + request.ReadOnlyCount = requests.NewInteger(p.ReadOnlyCount) + request.GlobalInstanceId = p.GlobalInstanceId + request.GlobalInstance = requests.NewBoolean(p.GlobalInstance) + request.SecondaryZoneId = p.SecondaryZoneID + request.Port = p.Port + request.GlobalSecurityGroupIds = p.GlobalSecurityGroupIds + request.Appendonly = p.Appendonly + request.ConnectionStringPrefix = p.ConnectionStringPrefix + request.ParamGroupId = p.ParamGroupId + request.ClusterBackupId = p.ClusterBackupId requestTags := make([]aliredis.CreateInstanceTag, len(p.Tag)) for _, tag := range p.Tag { diff --git a/pkg/clients/redis/redis_test.go b/pkg/clients/redis/redis_test.go index f891941..d287285 100644 --- a/pkg/clients/redis/redis_test.go +++ b/pkg/clients/redis/redis_test.go @@ -10,7 +10,14 @@ import ( ) func TestGenerateObservation(t *testing.T) { - ob := GenerateObservation(&DBInstance{Status: v1alpha1.RedisInstanceStateRunning}) + ob := GenerateObservation(&DBInstance{ + Status: v1alpha1.RedisInstanceStateRunning, + ID: "test-id", + Endpoint: &v1alpha1.Endpoint{ + Address: "test-address", + Port: "test-port", + }, + }) if ob.DBInstanceStatus != v1alpha1.RedisInstanceStateRunning { t.Errorf("RedisInstanceStatus: want=%v, get=%v", v1alpha1.RedisInstanceStateRunning, ob.DBInstanceStatus) } diff --git a/pkg/controller/redis/redis_instance.go b/pkg/controller/redis/redis_instance.go index ceb6658..fa5aaa7 100644 --- a/pkg/controller/redis/redis_instance.go +++ b/pkg/controller/redis/redis_instance.go @@ -162,7 +162,7 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex // TODO: Support update connection port cr.Status.AtProvider.ConnectionReady = true - pw, err = e.createAccountIfNeeded(cr) + pw, err = e.createAccount(cr) if err != nil { return managed.ExternalObservation{}, errors.Wrap(err, errCreateAccountFailed) } @@ -243,7 +243,7 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex // return domain, port, nil // } -func (e *external) createAccountIfNeeded(cr *v1alpha1.RedisInstance) (string, error) { +func (e *external) createAccount(cr *v1alpha1.RedisInstance) (string, error) { if cr.Status.AtProvider.AccountReady { return "", nil } @@ -253,11 +253,8 @@ func (e *external) createAccountIfNeeded(cr *v1alpha1.RedisInstance) (string, er return "", err } - if cr.Spec.ForProvider.MasterUsername == "" { - return pw, nil - } - - err = e.client.CreateAccount(cr.Status.AtProvider.DBInstanceID, cr.Spec.ForProvider.MasterUsername, pw) + // Use the instance id as the default user + err = e.client.CreateAccount(cr.Status.AtProvider.DBInstanceID, cr.Status.AtProvider.DBInstanceID, pw) if err != nil { // The previous request might fail due to timeout. That's fine we will eventually reconcile it. var sdkerr sdkerror.Error @@ -327,15 +324,16 @@ func (e *external) Delete(ctx context.Context, mg resource.Managed) error { } func getConnectionDetails(password string, cr *v1alpha1.RedisInstance, instance *redis.DBInstance) managed.ConnectionDetails { - cd := managed.ConnectionDetails{ - xpv1.ResourceCredentialsSecretUserKey: []byte(instance.ID), - } - if cr.Spec.ForProvider.MasterUsername != "" { - cd[xpv1.ResourceCredentialsSecretUserKey] = []byte(cr.Spec.ForProvider.MasterUsername) + cd := managed.ConnectionDetails{} + + if cr.Status.AtProvider.DBInstanceID != "" { + cd[xpv1.ResourceCredentialsSecretUserKey] = []byte(cr.Status.AtProvider.DBInstanceID) } + if password != "" { cd[xpv1.ResourceCredentialsSecretPasswordKey] = []byte(password) } + if instance.Endpoint != nil { cd[xpv1.ResourceCredentialsSecretEndpointKey] = []byte(instance.Endpoint.Address) cd[xpv1.ResourceCredentialsSecretPortKey] = []byte(instance.Endpoint.Port) diff --git a/pkg/controller/redis/redisinstance_test.go b/pkg/controller/redis/redisinstance_test.go index d9d07be..25e1e8b 100644 --- a/pkg/controller/redis/redisinstance_test.go +++ b/pkg/controller/redis/redisinstance_test.go @@ -21,7 +21,10 @@ import ( "github.com/crossplane-contrib/provider-alibaba/pkg/clients/redis" ) -const testName = "test" +const testName = "testName" +const testStatus = "testEndpoint" + +var testEndpoint = v1alpha1.Endpoint{Address: "test-address", Port: "test-port"} func TestConnector(t *testing.T) { errBoom := errors.New("boom") @@ -266,13 +269,13 @@ func TestObserve(t *testing.T) { "InstancePort is not set": { mg: &v1alpha1.RedisInstance{ Spec: v1alpha1.RedisInstanceSpec{ - ForProvider: v1alpha1.RedisInstanceParameters{ - MasterUsername: testName, - }, + ForProvider: v1alpha1.RedisInstanceParameters{}, }, Status: v1alpha1.RedisInstanceStatus{ AtProvider: v1alpha1.RedisInstanceObservation{ - DBInstanceID: testName, + DBInstanceID: testName, + DBInstanceStatus: testStatus, + Endpoint: testEndpoint, }, }, }, @@ -284,32 +287,14 @@ func TestObserve(t *testing.T) { mg: &v1alpha1.RedisInstance{ Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{ - MasterUsername: testName, - Port: 1234, - }, - }, - Status: v1alpha1.RedisInstanceStatus{ - AtProvider: v1alpha1.RedisInstanceObservation{ - DBInstanceID: testName, - }, - }, - }, - want: want{ - ResourceExists: true, ResourceUpToDate: true, err: nil, - }, - }, - "PubliclyAccessible is set": { - mg: &v1alpha1.RedisInstance{ - Spec: v1alpha1.RedisInstanceSpec{ - ForProvider: v1alpha1.RedisInstanceParameters{ - MasterUsername: testName, - // PubliclyAccessible: true, - Port: 123, + Port: "1234", }, }, Status: v1alpha1.RedisInstanceStatus{ AtProvider: v1alpha1.RedisInstanceObservation{ - DBInstanceID: testName, + DBInstanceID: testName, + DBInstanceStatus: testStatus, + Endpoint: testEndpoint, }, }, }, @@ -357,6 +342,8 @@ func TestCreate(t *testing.T) { Status: v1alpha1.RedisInstanceStatus{ AtProvider: v1alpha1.RedisInstanceObservation{ DBInstanceStatus: v1alpha1.RedisInstanceStateCreating, + DBInstanceID: testName, + Endpoint: testEndpoint, }, }, }, @@ -373,10 +360,9 @@ func TestCreate(t *testing.T) { }, Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{ - MasterUsername: testName, - EngineVersion: "5.0", - InstanceClass: "redis.logic.sharding.2g.8db.0rodb.8proxy.default", - Port: 8080, + EngineVersion: "5.0", + InstanceClass: "redis.logic.sharding.2g.8db.0rodb.8proxy.default", + Port: "8080", // PubliclyAccessible: true, }, }, @@ -475,6 +461,8 @@ func TestDelete(t *testing.T) { Status: v1alpha1.RedisInstanceStatus{ AtProvider: v1alpha1.RedisInstanceObservation{ DBInstanceStatus: v1alpha1.RedisInstanceStateDeleting, + DBInstanceID: testName, + Endpoint: testEndpoint, }, }, }, @@ -489,7 +477,9 @@ func TestDelete(t *testing.T) { }, Status: v1alpha1.RedisInstanceStatus{ AtProvider: v1alpha1.RedisInstanceObservation{ - DBInstanceID: testName, + DBInstanceID: testName, + DBInstanceStatus: testStatus, + Endpoint: testEndpoint, }, }, }, @@ -510,8 +500,8 @@ func TestDelete(t *testing.T) { } func TestGetConnectionDetails(t *testing.T) { - address := "0.0.0.0" - port := "3346" + address := testEndpoint.Address + port := testEndpoint.Port password := "super-secret" type args struct { @@ -537,8 +527,11 @@ func TestGetConnectionDetails(t *testing.T) { }, }, Spec: v1alpha1.RedisInstanceSpec{ - ForProvider: v1alpha1.RedisInstanceParameters{ - MasterUsername: testName, + ForProvider: v1alpha1.RedisInstanceParameters{}, + }, + Status: v1alpha1.RedisInstanceStatus{ + AtProvider: v1alpha1.RedisInstanceObservation{ + Endpoint: testEndpoint, }, }, }, @@ -551,7 +544,6 @@ func TestGetConnectionDetails(t *testing.T) { }, want: want{ conn: managed.ConnectionDetails{ - xpv1.ResourceCredentialsSecretUserKey: []byte(testName), xpv1.ResourceCredentialsSecretEndpointKey: []byte(address), xpv1.ResourceCredentialsSecretPortKey: []byte(port), }, @@ -567,8 +559,11 @@ func TestGetConnectionDetails(t *testing.T) { }, }, Spec: v1alpha1.RedisInstanceSpec{ - ForProvider: v1alpha1.RedisInstanceParameters{ - MasterUsername: testName, + ForProvider: v1alpha1.RedisInstanceParameters{}, + }, + Status: v1alpha1.RedisInstanceStatus{ + AtProvider: v1alpha1.RedisInstanceObservation{ + DBInstanceID: testName, }, }, }, @@ -591,8 +586,12 @@ func TestGetConnectionDetails(t *testing.T) { }, }, Spec: v1alpha1.RedisInstanceSpec{ - ForProvider: v1alpha1.RedisInstanceParameters{ - MasterUsername: testName, + ForProvider: v1alpha1.RedisInstanceParameters{}, + }, + Status: v1alpha1.RedisInstanceStatus{ + AtProvider: v1alpha1.RedisInstanceObservation{ + DBInstanceID: testName, + Endpoint: testEndpoint, }, }, }, @@ -633,6 +632,10 @@ func (c *fakeRedisClient) DescribeDBInstance(id string) (*redis.DBInstance, erro return &redis.DBInstance{ ID: id, Status: v1alpha1.RedisInstanceStateRunning, + Endpoint: &v1alpha1.Endpoint{ + Address: "172.0.0.1", + Port: "8888", + }, }, nil } From d5decdcae9d094ecca3b786c98382d94e467a5fe Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Sun, 26 May 2024 11:24:27 -0700 Subject: [PATCH 11/30] change port api to integer type Signed-off-by: Henry Zeng --- apis/redis/v1alpha1/redis_types.go | 2 +- package/crds/redis.alibaba.crossplane.io_redisinstances.yaml | 2 +- pkg/clients/redis/redis.go | 2 +- pkg/controller/redis/redisinstance_test.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apis/redis/v1alpha1/redis_types.go b/apis/redis/v1alpha1/redis_types.go index 4c0db12..3349c53 100644 --- a/apis/redis/v1alpha1/redis_types.go +++ b/apis/redis/v1alpha1/redis_types.go @@ -310,7 +310,7 @@ type RedisInstanceParameters struct { // Default value: // 6379 // +optional - Port string `json:"port,omitempty"` + Port int `json:"port,omitempty"` // The global IP whitelist template for the instance. Multiple IP whitelist templates should // be separated by English commas (,) and cannot be duplicated. diff --git a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml index 8acc92d..637577f 100644 --- a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml +++ b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml @@ -138,7 +138,7 @@ spec: type: string port: description: "Port is indicates the database service port Valid values: \t\t1024 to 65535 Default value: \t\t6379" - type: string + type: integer privateIpAddress: description: "The private IP address of the instance. Note: \t\tThe private IP address must be available within the CIDR block \t\tof the vSwitch to which to connect the instance." type: string diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index bb9c101..4767891 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -158,7 +158,7 @@ func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstance request.GlobalInstanceId = p.GlobalInstanceId request.GlobalInstance = requests.NewBoolean(p.GlobalInstance) request.SecondaryZoneId = p.SecondaryZoneID - request.Port = p.Port + request.Port = strconv.Itoa(p.Port) request.GlobalSecurityGroupIds = p.GlobalSecurityGroupIds request.Appendonly = p.Appendonly request.ConnectionStringPrefix = p.ConnectionStringPrefix diff --git a/pkg/controller/redis/redisinstance_test.go b/pkg/controller/redis/redisinstance_test.go index 25e1e8b..e0d37c3 100644 --- a/pkg/controller/redis/redisinstance_test.go +++ b/pkg/controller/redis/redisinstance_test.go @@ -287,7 +287,7 @@ func TestObserve(t *testing.T) { mg: &v1alpha1.RedisInstance{ Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{ - Port: "1234", + Port: 1234, }, }, Status: v1alpha1.RedisInstanceStatus{ @@ -362,7 +362,7 @@ func TestCreate(t *testing.T) { ForProvider: v1alpha1.RedisInstanceParameters{ EngineVersion: "5.0", InstanceClass: "redis.logic.sharding.2g.8db.0rodb.8proxy.default", - Port: "8080", + Port: 8080, // PubliclyAccessible: true, }, }, From f13334dc4f244a6b632489d14f02d0ca7755c609 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Sun, 26 May 2024 14:45:55 -0700 Subject: [PATCH 12/30] fix user creation with default externalName Signed-off-by: Henry Zeng --- pkg/clients/redis/redis.go | 6 +++++- pkg/controller/redis/redis_instance.go | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index 4767891..8ac53c6 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -40,6 +40,9 @@ const ( // DefaultReadTime indicates default connect timeout number DefaultReadTime = 60 * time.Second + // Default Account privilege + DefaultAccountPrivilege = "RoleReadWrite" + // HTTPSScheme indicates request scheme HTTPSScheme = "https" ) @@ -124,7 +127,7 @@ func (c *client) DescribeDBInstance(id string) (*DBInstance, error) { func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstanceParameters) (*DBInstance, error) { request := aliredis.CreateCreateInstanceRequest() - request.Scheme = HTTPSScheme + // request.Scheme = HTTPSScheme // Seems regionID will be by default from the first part ZoneID // request.RegionID = p.RegionID @@ -192,6 +195,7 @@ func (c *client) CreateAccount(id, user, pw string) error { request.AccountName = user request.AccountPassword = pw request.ReadTimeout = DefaultReadTime + // request.AccountPrivilege = DefaultAccountPrivilege _, err := c.redisCli.CreateAccount(request) return CleanError(err) diff --git a/pkg/controller/redis/redis_instance.go b/pkg/controller/redis/redis_instance.go index fa5aaa7..ac4514f 100644 --- a/pkg/controller/redis/redis_instance.go +++ b/pkg/controller/redis/redis_instance.go @@ -254,7 +254,7 @@ func (e *external) createAccount(cr *v1alpha1.RedisInstance) (string, error) { } // Use the instance id as the default user - err = e.client.CreateAccount(cr.Status.AtProvider.DBInstanceID, cr.Status.AtProvider.DBInstanceID, pw) + err = e.client.CreateAccount(cr.Status.AtProvider.DBInstanceID, meta.GetExternalName(cr), pw) if err != nil { // The previous request might fail due to timeout. That's fine we will eventually reconcile it. var sdkerr sdkerror.Error @@ -326,8 +326,8 @@ func (e *external) Delete(ctx context.Context, mg resource.Managed) error { func getConnectionDetails(password string, cr *v1alpha1.RedisInstance, instance *redis.DBInstance) managed.ConnectionDetails { cd := managed.ConnectionDetails{} - if cr.Status.AtProvider.DBInstanceID != "" { - cd[xpv1.ResourceCredentialsSecretUserKey] = []byte(cr.Status.AtProvider.DBInstanceID) + if meta.GetExternalName(cr) != "" { + cd[xpv1.ResourceCredentialsSecretUserKey] = []byte(meta.GetExternalName(cr)) } if password != "" { From 1962a623adc344bb773b78ea61e533ceae5a26db Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Sun, 26 May 2024 14:50:36 -0700 Subject: [PATCH 13/30] fix unit tests Signed-off-by: Henry Zeng --- pkg/controller/redis/redisinstance_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/controller/redis/redisinstance_test.go b/pkg/controller/redis/redisinstance_test.go index e0d37c3..e39d168 100644 --- a/pkg/controller/redis/redisinstance_test.go +++ b/pkg/controller/redis/redisinstance_test.go @@ -268,6 +268,9 @@ func TestObserve(t *testing.T) { }{ "InstancePort is not set": { mg: &v1alpha1.RedisInstance{ + ObjectMeta: metav1.ObjectMeta{ + Name: testName, + }, Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{}, }, @@ -285,6 +288,9 @@ func TestObserve(t *testing.T) { }, "InstancePort is set": { mg: &v1alpha1.RedisInstance{ + ObjectMeta: metav1.ObjectMeta{ + Name: testName, + }, Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{ Port: 1234, @@ -357,6 +363,7 @@ func TestCreate(t *testing.T) { Annotations: map[string]string{ crossplanemeta.AnnotationKeyExternalName: testName, }, + Name: testName, }, Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{ @@ -544,6 +551,7 @@ func TestGetConnectionDetails(t *testing.T) { }, want: want{ conn: managed.ConnectionDetails{ + xpv1.ResourceCredentialsSecretUserKey: []byte(testName), xpv1.ResourceCredentialsSecretEndpointKey: []byte(address), xpv1.ResourceCredentialsSecretPortKey: []byte(port), }, @@ -557,6 +565,7 @@ func TestGetConnectionDetails(t *testing.T) { Annotations: map[string]string{ crossplanemeta.AnnotationKeyExternalName: testName, }, + Name: testName, }, Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{}, @@ -584,6 +593,7 @@ func TestGetConnectionDetails(t *testing.T) { Annotations: map[string]string{ crossplanemeta.AnnotationKeyExternalName: testName, }, + Name: testName, }, Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{}, From 825c3bbc32155c837d577347403119351d952d6a Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Mon, 27 May 2024 13:42:52 -0700 Subject: [PATCH 14/30] make all integer parameter pointer so they are not generated by json with value 0 Signed-off-by: Henry Zeng --- apis/redis/v1alpha1/redis_types.go | 8 +++---- apis/redis/v1alpha1/zz_generated.deepcopy.go | 20 ++++++++++++++++ ....alibaba.crossplane.io_redisinstances.yaml | 2 +- pkg/clients/redis/redis.go | 24 +++++++++++++++---- pkg/controller/redis/redisinstance_test.go | 6 +++-- 5 files changed, 49 insertions(+), 11 deletions(-) diff --git a/apis/redis/v1alpha1/redis_types.go b/apis/redis/v1alpha1/redis_types.go index 3349c53..234524d 100644 --- a/apis/redis/v1alpha1/redis_types.go +++ b/apis/redis/v1alpha1/redis_types.go @@ -109,7 +109,7 @@ type RedisInstanceParameters struct { // The storage capacity of the instance. Unit: MB. // Note: You must specify at least one of the Capacity and InstanceClass parameters when you call this operation. // +optional - Capacity string `json:"capacity,omitempty"` + Capacity *int `json:"capacity,omitempty"` // The instance type. // For example, redis.master.small.default indicates a Community Edition @@ -269,14 +269,14 @@ type RedisInstanceParameters struct { // The number of data shards. // This parameter is available only if you create a cluster instance that uses cloud disks. // +optional - ShardCount int `json:"shardCount,omitempty"` + ShardCount *int `json:"shardCount,omitempty"` // The number of read-only nodes in the instance. This parameter is available // only if you create a read/write splitting instance that uses cloud disks. // Valid values: // 1 to 5 // +optional - ReadOnlyCount int `json:"readOnlyCount,omitempty"` + ReadOnlyCount *int `json:"readOnlyCount,omitempty"` // The ID of the distributed instance. This parameter is available only on the China site (aliyun.com). // +optional @@ -310,7 +310,7 @@ type RedisInstanceParameters struct { // Default value: // 6379 // +optional - Port int `json:"port,omitempty"` + Port *int `json:"port,omitempty"` // The global IP whitelist template for the instance. Multiple IP whitelist templates should // be separated by English commas (,) and cannot be duplicated. diff --git a/apis/redis/v1alpha1/zz_generated.deepcopy.go b/apis/redis/v1alpha1/zz_generated.deepcopy.go index 02e588b..476ccf7 100644 --- a/apis/redis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/redis/v1alpha1/zz_generated.deepcopy.go @@ -118,6 +118,26 @@ func (in *RedisInstanceObservation) DeepCopy() *RedisInstanceObservation { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RedisInstanceParameters) DeepCopyInto(out *RedisInstanceParameters) { *out = *in + if in.Capacity != nil { + in, out := &in.Capacity, &out.Capacity + *out = new(int) + **out = **in + } + if in.ShardCount != nil { + in, out := &in.ShardCount, &out.ShardCount + *out = new(int) + **out = **in + } + if in.ReadOnlyCount != nil { + in, out := &in.ReadOnlyCount, &out.ReadOnlyCount + *out = new(int) + **out = **in + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(int) + **out = **in + } if in.Tag != nil { in, out := &in.Tag, &out.Tag *out = make([]Tag, len(*in)) diff --git a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml index 637577f..7f573df 100644 --- a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml +++ b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml @@ -84,7 +84,7 @@ spec: type: string capacity: description: 'The storage capacity of the instance. Unit: MB. Note: You must specify at least one of the Capacity and InstanceClass parameters when you call this operation.' - type: string + type: integer chargeType: description: "ChargeType is indicates payment type Default value: PrePaid. Valid values: \t\tPrePaid: subscription \t\tPostPaid: pay-as-you-go" type: string diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index 8ac53c6..115c77d 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -40,6 +40,8 @@ const ( // DefaultReadTime indicates default connect timeout number DefaultReadTime = 60 * time.Second + DefaultConnectTime = 60 * time.Second + // Default Account privilege DefaultAccountPrivilege = "RoleReadWrite" @@ -128,13 +130,14 @@ func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstance request := aliredis.CreateCreateInstanceRequest() // request.Scheme = HTTPSScheme + request.ConnectTimeout = DefaultConnectTime + request.ReadTimeout = DefaultReadTime // Seems regionID will be by default from the first part ZoneID // request.RegionID = p.RegionID request.Token = p.Token request.InstanceName = externalName request.Password = p.Password - request.Capacity = requests.Integer(p.Capacity) request.InstanceClass = p.InstanceClass request.ZoneId = p.ZoneID request.ChargeType = p.ChargeType @@ -156,18 +159,31 @@ func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstance request.ResourceGroupId = p.ResourceGroupId request.RestoreTime = p.RestoreTime request.DedicatedHostGroupId = p.DedicatedHostGroupId - request.ShardCount = requests.NewInteger(p.ShardCount) - request.ReadOnlyCount = requests.NewInteger(p.ReadOnlyCount) request.GlobalInstanceId = p.GlobalInstanceId request.GlobalInstance = requests.NewBoolean(p.GlobalInstance) request.SecondaryZoneId = p.SecondaryZoneID - request.Port = strconv.Itoa(p.Port) request.GlobalSecurityGroupIds = p.GlobalSecurityGroupIds request.Appendonly = p.Appendonly request.ConnectionStringPrefix = p.ConnectionStringPrefix request.ParamGroupId = p.ParamGroupId request.ClusterBackupId = p.ClusterBackupId + if p.Port != nil { + request.Port = strconv.Itoa(*p.Port) + } + + if p.Capacity != nil { + request.Capacity = requests.NewInteger(*p.Capacity) + } + + if p.ShardCount != nil { + request.ShardCount = requests.NewInteger(*p.ShardCount) + } + + if p.ReadOnlyCount != nil { + request.ReadOnlyCount = requests.NewInteger(*p.ReadOnlyCount) + } + requestTags := make([]aliredis.CreateInstanceTag, len(p.Tag)) for _, tag := range p.Tag { requestTags = append(requestTags, aliredis.CreateInstanceTag{Key: tag.Key, Value: tag.Value}) diff --git a/pkg/controller/redis/redisinstance_test.go b/pkg/controller/redis/redisinstance_test.go index e39d168..a68da8a 100644 --- a/pkg/controller/redis/redisinstance_test.go +++ b/pkg/controller/redis/redisinstance_test.go @@ -24,6 +24,8 @@ import ( const testName = "testName" const testStatus = "testEndpoint" +var testPort = 8080 + var testEndpoint = v1alpha1.Endpoint{Address: "test-address", Port: "test-port"} func TestConnector(t *testing.T) { @@ -293,7 +295,7 @@ func TestObserve(t *testing.T) { }, Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{ - Port: 1234, + Port: &testPort, }, }, Status: v1alpha1.RedisInstanceStatus{ @@ -369,7 +371,7 @@ func TestCreate(t *testing.T) { ForProvider: v1alpha1.RedisInstanceParameters{ EngineVersion: "5.0", InstanceClass: "redis.logic.sharding.2g.8db.0rodb.8proxy.default", - Port: 8080, + Port: &testPort, // PubliclyAccessible: true, }, }, From 5defaf172c0015f6123c85a29474c00d56f3519a Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Wed, 29 May 2024 17:09:49 -0700 Subject: [PATCH 15/30] upgrade crossplane runtime for bug fix Signed-off-by: Henry Zeng --- go.mod | 92 +++++----- go.sum | 569 ++++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 491 insertions(+), 170 deletions(-) diff --git a/go.mod b/go.mod index 81f2c43..ba5dd81 100644 --- a/go.mod +++ b/go.mod @@ -10,18 +10,18 @@ require ( github.com/aliyun/alibaba-cloud-sdk-go v1.62.736 github.com/aliyun/aliyun-log-go-sdk v0.1.19 github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible - github.com/crossplane/crossplane-runtime v0.13.0 + github.com/crossplane/crossplane-runtime v0.15.1 github.com/crossplane/crossplane-tools v0.0.0-20201007233256-88b291e145bb - github.com/google/go-cmp v0.5.4 + github.com/google/go-cmp v0.5.6 github.com/pkg/errors v0.9.1 - golang.org/x/net v0.0.0-20201110031124-69a78807bb2b + golang.org/x/net v0.0.0-20210825183410-e898025ed96a gopkg.in/alecthomas/kingpin.v2 v2.2.6 - gopkg.in/yaml.v2 v2.3.0 - k8s.io/api v0.20.1 - k8s.io/apimachinery v0.20.1 - k8s.io/utils v0.0.0-20201110183641-67b214c5f920 - sigs.k8s.io/controller-runtime v0.8.0 - sigs.k8s.io/controller-tools v0.3.0 + gopkg.in/yaml.v2 v2.4.0 + k8s.io/api v0.23.0 + k8s.io/apimachinery v0.23.0 + k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b + sigs.k8s.io/controller-runtime v0.11.0 + sigs.k8s.io/controller-tools v0.8.0 ) require ( @@ -38,64 +38,64 @@ require ( github.com/cespare/xxhash/v2 v2.1.1 // indirect github.com/dave/jennifer v1.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/evanphx/json-patch v4.9.0+incompatible // indirect - github.com/fatih/color v1.7.0 // indirect - github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/fatih/color v1.12.0 // indirect + github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-kit/kit v0.10.0 // indirect github.com/go-logfmt/logfmt v0.5.0 // indirect - github.com/go-logr/logr v0.3.0 // indirect - github.com/go-logr/zapr v0.2.0 // indirect - github.com/gobuffalo/flect v0.2.0 // indirect - github.com/gogo/protobuf v1.3.1 // indirect - github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect - github.com/golang/protobuf v1.4.3 // indirect + github.com/go-logr/logr v1.2.0 // indirect + github.com/go-logr/zapr v1.2.0 // indirect + github.com/gobuffalo/flect v0.2.3 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/google/uuid v1.1.2 // indirect - github.com/googleapis/gnostic v0.5.1 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/imdario/mergo v0.3.10 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect + github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/mattn/go-colorable v0.1.2 // indirect - github.com/mattn/go-isatty v0.0.8 // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect github.com/pierrec/lz4 v2.5.2+incompatible // indirect - github.com/prometheus/client_golang v1.7.1 // indirect + github.com/prometheus/client_golang v1.11.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.10.0 // indirect - github.com/prometheus/procfs v0.2.0 // indirect + github.com/prometheus/common v0.28.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect github.com/satori/go.uuid v1.2.0 // indirect - github.com/spf13/afero v1.2.2 // indirect - github.com/spf13/cobra v1.1.1 // indirect + github.com/spf13/afero v1.8.0 // indirect + github.com/spf13/cobra v1.2.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tjfoc/gmsm v1.3.2 // indirect go.uber.org/atomic v1.9.0 // indirect - go.uber.org/multierr v1.5.0 // indirect - go.uber.org/zap v1.15.0 // indirect - golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 // indirect - golang.org/x/mod v0.3.0 // indirect - golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.19.1 // indirect + golang.org/x/mod v0.4.2 // indirect + golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec // indirect - golang.org/x/text v0.3.4 // indirect - golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect - golang.org/x/tools v0.0.0-20200616133436-c1934b75d054 // indirect + golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - gomodules.xyz/jsonpatch/v2 v2.1.0 // indirect - google.golang.org/appengine v1.6.6 // indirect - google.golang.org/protobuf v1.25.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/protobuf v1.27.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v3 v3.0.0 // indirect - k8s.io/apiextensions-apiserver v0.20.1 // indirect - k8s.io/client-go v0.20.1 // indirect - k8s.io/component-base v0.20.1 // indirect - k8s.io/klog/v2 v2.4.0 // indirect - k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.0.2 // indirect - sigs.k8s.io/yaml v1.2.0 // indirect + k8s.io/apiextensions-apiserver v0.23.0 // indirect + k8s.io/client-go v0.23.0 // indirect + k8s.io/component-base v0.23.0 // indirect + k8s.io/klog/v2 v2.30.0 // indirect + k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect + sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index ab17018..17a462d 100644 --- a/go.sum +++ b/go.sum @@ -3,40 +3,61 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= +github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= @@ -45,6 +66,7 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -55,7 +77,6 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= @@ -97,7 +118,8 @@ github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible h1:Ft+KeWIJxFP76LqgJbvtO github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/aliyun/credentials-go v1.1.2 h1:qU1vwGIBb3UJ8BwunHDRFtAhS6jnQLnde/yk0+Ih2GY= github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -113,6 +135,9 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f h1:ZNv7On9kyUzm7fvRZumSyy/IUiSC7AzL0I1jKKtwooA= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -120,12 +145,15 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= @@ -138,7 +166,14 @@ github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4 github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58 h1:F1EaeKL/ta07PY/k9Os/UFtwERei2/XzGemhpGnBKNg= github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coreos/bbolt v1.3.1-coreos.6/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= @@ -151,6 +186,7 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= @@ -159,8 +195,9 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/crossplane/crossplane-runtime v0.13.0 h1:TFeItxtW32/fETB9be0AsEha/ur0bbrtQRocC+Jd6RI= -github.com/crossplane/crossplane-runtime v0.13.0/go.mod h1:Bc54/KBvV9ld/tvervcnhcSzk13FYguTqmYt72Mybps= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/crossplane/crossplane-runtime v0.15.1 h1:4l3iTMyrQRkt9U0P1oJ6M71JMFGcIq95agFu7OPrwRE= +github.com/crossplane/crossplane-runtime v0.15.1/go.mod h1:XvktCTRFTkdP2jR2PecrvhsxzSO8XT3jHxTOk/k+NL8= github.com/crossplane/crossplane-tools v0.0.0-20201007233256-88b291e145bb h1:j09j/Gk1qH64HUtf/fcTjMAxLxUdOuQXySWu46WTVTU= github.com/crossplane/crossplane-tools v0.0.0-20201007233256-88b291e145bb/go.mod h1:C735A9X0x0lR8iGVOOxb49Mt70Ua4EM2b7PGaRPBLd4= github.com/dave/jennifer v1.3.0 h1:p3tl41zjjCZTNBytMwrUuiAnherNUZktlhPTKoF/sEk= @@ -173,7 +210,6 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -187,23 +223,37 @@ github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkg github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= +github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.10.2 h1:19ARM85nVi4xH7xPXuc5eM/udya5ieh7b/Sv+d844Tk= github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= @@ -215,21 +265,23 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.3.0 h1:q4c+kbcR0d5rSurhBR8dIgieOaYpXtsdTYfx22Cu6rs= -github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= -github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= +github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= +github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= @@ -238,69 +290,78 @@ github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwds github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobuffalo/flect v0.1.5/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= -github.com/gobuffalo/flect v0.2.0 h1:EWCvMGGxOjsgwlWaP+f4+Hh6yrrte7JeFL2S6b+0hdM= -github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= +github.com/gobuffalo/flect v0.2.3 h1:f/ZukRnSNA/DUpSNDadko7Qc0PhGvsew35p/2tu+CRY= +github.com/gobuffalo/flect v0.2.3/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -308,29 +369,49 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= +github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -339,16 +420,18 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwuTCM= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= +github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -357,10 +440,12 @@ github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:Fecb github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20190222133341-cfaf5686ec79/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.3.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -383,7 +468,6 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -393,12 +477,14 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.10 h1:6q5mVkdH/vYmqngx7kZQTjJ5HRsx+ImorDIEQ+beJgc= -github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -406,23 +492,30 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -438,19 +531,23 @@ github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0U github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -465,7 +562,10 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -477,6 +577,7 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= @@ -487,8 +588,9 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -499,17 +601,20 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4= -github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs= -github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= +github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= @@ -525,6 +630,7 @@ github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIw github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -536,6 +642,8 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -547,8 +655,9 @@ github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= -github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -562,8 +671,10 @@ github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.28.0 h1:vGVfV9KrDTvWt5boZO0I19g2E3CsWfpPPKZM9dt3mEw= +github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -571,12 +682,14 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -585,27 +698,35 @@ github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0 github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.3/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.8.0 h1:5MmtuhAgYeU6qpa7w7bP0dv6MBYuup0vekhSpSkoq60= +github.com/spf13/afero v1.8.0/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -613,6 +734,7 @@ 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/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -629,11 +751,11 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tjfoc/gmsm v1.3.2 h1:7JVkAn5bvUJ7HtU08iW6UiD+UTmJTIToHCfeFzkcCxM= github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= @@ -642,48 +764,74 @@ github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljT github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.30/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= -go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= +go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= +go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v0.0.0-20181018215023-8dc6146f7569/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v0.0.0-20180122172545-ddea229ff1df/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v0.0.0-20180814183419-67bc79d13d15/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= -go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -693,15 +841,17 @@ golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -728,8 +878,9 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -737,8 +888,12 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -759,11 +914,11 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -771,17 +926,45 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a h1:bRuuGXV8wwSdGTB+CtJf+FjgO1APK1CoO39T4BN/XBw= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -789,6 +972,10 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -816,40 +1003,84 @@ golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200509044756-6aff5f38e54f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI= golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= -golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -857,7 +1088,6 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -869,13 +1099,11 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -897,18 +1125,40 @@ golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200616133436-c1934b75d054 h1:HHeAlu5H9b71C+Fx0K+1dGgVFN1DM1/wz4aoGOA5qS8= -golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff h1:VX/uD7MK0AHXGiScH3fsieUQUcpmRERPDYtqZdJnA+Q= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= -gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= +gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= @@ -925,15 +1175,28 @@ google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -952,9 +1215,37 @@ google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -964,9 +1255,24 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -976,8 +1282,11 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -995,6 +1304,7 @@ 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.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= @@ -1007,74 +1317,80 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +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-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 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= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20190918155943-95b840bb6a1f/go.mod h1:uWuOHnjmNrtQomJrvEBg0c0HRNyQ+8KTEERVsK0PW48= -k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= -k8s.io/api v0.20.1 h1:ud1c3W3YNzGd6ABJlbFfKXBKXO+1KdGfcgGGNgFR03E= -k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= +k8s.io/api v0.21.2/go.mod h1:Lv6UGJZ1rlMI1qusN8ruAp9PUBFyBwpEHAdG24vIsiU= +k8s.io/api v0.23.0 h1:WrL1gb73VSC8obi8cuYETJGXEoFNEh3LU0Pt+Sokgro= +k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= k8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783/go.mod h1:xvae1SZB3E17UpV59AWc271W/Ph25N+bjPyR63X6tPY= -k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= -k8s.io/apiextensions-apiserver v0.20.1 h1:ZrXQeslal+6zKM/HjDXLzThlz/vPSxrfK3OqL8txgVQ= -k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk= +k8s.io/apiextensions-apiserver v0.21.2/go.mod h1:+Axoz5/l3AYpGLlhJDfcVQzCerVYq3K3CvDMvw6X1RA= +k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= +k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655/go.mod h1:nL6pwRT8NgfF8TT68DBI8uEePRt89cSvoXUVqbkWHq4= -k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= -k8s.io/apimachinery v0.20.1 h1:LAhz8pKbgR8tUwn7boK+b2HZdt7MiTu2mkYtFMUjTRQ= -k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.21.2/go.mod h1:CdTY8fU/BlvAbJ2z/8kBwimGki5Zp8/fbVuLY8gJumM= +k8s.io/apimachinery v0.23.0 h1:mIfWRMjBuMdolAWJ3Fd+aPTMv3X9z+waiARMpvvb0HQ= +k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= k8s.io/apiserver v0.0.0-20190918160949-bfa5e2e684ad/go.mod h1:XPCXEwhjaFN29a8NldXA901ElnKeKLrLtREO9ZhFyhg= -k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= -k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= +k8s.io/apiserver v0.21.2/go.mod h1:lN4yBoGyiNT7SC1dmNk0ue6a5Wi6O3SWOIw91TsucQw= +k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= k8s.io/client-go v0.0.0-20190918160344-1fbdaa4c8d90/go.mod h1:J69/JveO6XESwVgG53q3Uz5OSfgsv4uxpScmmyYOOlk= -k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= -k8s.io/client-go v0.20.1 h1:Qquik0xNFbK9aUG92pxHYsyfea5/RPO9o9bSywNor+M= -k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= +k8s.io/client-go v0.21.2/go.mod h1:HdJ9iknWpbl3vMGtib6T2PyI/VYxiZfq936WNVHBRrA= +k8s.io/client-go v0.23.0 h1:vcsOqyPq7XV3QmQRCBH/t9BICJM9Q1M18qahjv+rebY= +k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= k8s.io/code-generator v0.0.0-20190912054826-cd179ad6a269/go.mod h1:V5BD6M4CyaN5m+VthcclXWsVcT1Hu+glwa1bi3MIsyE= -k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= -k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= +k8s.io/code-generator v0.21.2/go.mod h1:8mXJDCB7HcRo1xiEQstcguZkbxZaqeUOrO9SsicWs3U= +k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= k8s.io/component-base v0.0.0-20190918160511-547f6c5d7090/go.mod h1:933PBGtQFJky3TEwYx4aEPZ4IxqhWh3R6DCmzqIn1hA= -k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= -k8s.io/component-base v0.20.1 h1:6OQaHr205NSl24t5wOF2IhdrlxZTWEZwuGlLvBgaeIg= -k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= +k8s.io/component-base v0.21.2/go.mod h1:9lvmIThzdlrJj5Hp8Z/TOgIkdfsNARQ1pT+3PByuiuc= +k8s.io/component-base v0.23.0 h1:UAnyzjvVZ2ZR1lF35YwtNY6VMN94WtOnArcXBu34es8= +k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.4.0 h1:lCJCxf/LIowc2IGS9TPjWDyXY4nOmdGdfcwwDQCOURQ= k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= -k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= +k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210527160623-6fdb442a123b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= @@ -1084,21 +1400,26 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.8.0 h1:s0dYdo7lQgJiAf+alP82PRwbz+oAqL3oSyMQ18XRDOc= -sigs.k8s.io/controller-runtime v0.8.0/go.mod h1:v9Lbj5oX443uR7GXYY46E0EE2o7k2YxQ58GxVNeXSW4= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.19/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= +sigs.k8s.io/controller-runtime v0.9.2/go.mod h1:TxzMCHyEUpaeuOiZx/bIdc2T81vfs/aKdvJt9wuu0zk= +sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= +sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/controller-tools v0.2.4/go.mod h1:m/ztfQNocGYBgTTCmFdnK94uVvgxeZeE3LtJvd/jIzA= -sigs.k8s.io/controller-tools v0.3.0 h1:y3YD99XOyWaXkiF1kd41uRvfp/64teWcrEZFuHxPhJ4= -sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI= +sigs.k8s.io/controller-tools v0.8.0 h1:uUkfTGEwrguqYYfcI2RRGUnC8mYdCFDqfwPKUcNJh1o= +sigs.k8s.io/controller-tools v0.8.0/go.mod h1:qE2DXhVOiEq5ijmINcFbqi9GZrrUjzB1TuJU0xa6eoY= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca h1:6dsH6AYQWbyZmtttJNe8Gq1cXOeS1BdV3eW37zHilAQ= sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca/go.mod h1:IIgPezJWb76P0hotTxzDbWsMYB8APh18qZnxkomBpxA= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0= +sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= From 783c3d88cf7de2c992c3813d506478cf1eead1ce Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Wed, 29 May 2024 17:10:22 -0700 Subject: [PATCH 16/30] fix duplicated redis provisioning bug Signed-off-by: Henry Zeng --- apis/redis/v1alpha1/redis_types.go | 3 - ....alibaba.crossplane.io_redisinstances.yaml | 4 - pkg/clients/redis/redis.go | 27 ++- pkg/controller/redis/redis_instance.go | 189 ++++++++++-------- pkg/controller/redis/redisinstance_test.go | 169 ++++++---------- 5 files changed, 186 insertions(+), 206 deletions(-) diff --git a/apis/redis/v1alpha1/redis_types.go b/apis/redis/v1alpha1/redis_types.go index 234524d..6065a06 100644 --- a/apis/redis/v1alpha1/redis_types.go +++ b/apis/redis/v1alpha1/redis_types.go @@ -348,9 +348,6 @@ type RedisInstanceObservation struct { // DBInstanceStatus specifies the current state of this database. DBInstanceStatus string `json:"dbInstanceStatus,omitempty"` - // DBInstanceID specifies the Redis instance ID. - DBInstanceID string `json:"dbInstanceID"` - // AccountReady specifies whether the initial user account (username + password) is ready AccountReady bool `json:"accountReady"` diff --git a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml index 7f573df..1b04286 100644 --- a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml +++ b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml @@ -237,9 +237,6 @@ spec: connectionReady: description: ConnectionReady specifies whether the network connect is ready type: boolean - dbInstanceID: - description: DBInstanceID specifies the Redis instance ID. - type: string dbInstanceStatus: description: DBInstanceStatus specifies the current state of this database. type: string @@ -256,7 +253,6 @@ spec: required: - accountReady - connectionReady - - dbInstanceID - endpoint type: object conditions: diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index 115c77d..dd48623 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -22,6 +22,7 @@ import ( "strconv" "time" + "github.com/crossplane/crossplane-runtime/pkg/password" "github.com/pkg/errors" sdkerrors "github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors" @@ -47,6 +48,9 @@ const ( // HTTPSScheme indicates request scheme HTTPSScheme = "https" + + // Errors + errGeneratePasswordFailed = "cannot generate a password" ) // Same server error but without requestID @@ -61,8 +65,8 @@ type CleanedServerError struct { // Client defines Redis client operations type Client interface { DescribeDBInstance(id string) (*DBInstance, error) - CreateAccount(id, username, password string) error - CreateDBInstance(externalName string, parameters *v1alpha1.RedisInstanceParameters) (*DBInstance, error) + // CreateAccount(id, username, password string) error + CreateDBInstance(externalName string, parameters *v1alpha1.RedisInstanceParameters) (*DBInstance, string, error) DeleteDBInstance(id string) error // AllocateInstancePublicConnection(id string, port int) (string, error) // ModifyDBInstanceConnectionString(id string, port int) (string, error) @@ -126,7 +130,7 @@ func (c *client) DescribeDBInstance(id string) (*DBInstance, error) { return in, nil } -func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstanceParameters) (*DBInstance, error) { +func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstanceParameters) (*DBInstance, string, error) { request := aliredis.CreateCreateInstanceRequest() // request.Scheme = HTTPSScheme @@ -137,7 +141,6 @@ func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstance // request.RegionID = p.RegionID request.Token = p.Token request.InstanceName = externalName - request.Password = p.Password request.InstanceClass = p.InstanceClass request.ZoneId = p.ZoneID request.ChargeType = p.ChargeType @@ -184,6 +187,17 @@ func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstance request.ReadOnlyCount = requests.NewInteger(*p.ReadOnlyCount) } + // Password might be generated or provided by user + var pw string + var err error + if p.Password == "" { + pw, err = password.Generate() + if err != nil { + return nil, "", errors.Wrap(err, errGeneratePasswordFailed) + } + } + request.Password = pw + requestTags := make([]aliredis.CreateInstanceTag, len(p.Tag)) for _, tag := range p.Tag { requestTags = append(requestTags, aliredis.CreateInstanceTag{Key: tag.Key, Value: tag.Value}) @@ -192,7 +206,7 @@ func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstance resp, err := c.redisCli.CreateInstance(request) if err != nil { - return nil, CleanError(err) + return nil, "", CleanError(err) } return &DBInstance{ @@ -201,7 +215,7 @@ func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstance Address: resp.ConnectionDomain, Port: strconv.Itoa(resp.Port), }, - }, nil + }, pw, nil } func (c *client) CreateAccount(id, user, pw string) error { @@ -232,7 +246,6 @@ func (c *client) DeleteDBInstance(id string) error { func GenerateObservation(db *DBInstance) v1alpha1.RedisInstanceObservation { return v1alpha1.RedisInstanceObservation{ DBInstanceStatus: db.Status, - DBInstanceID: db.ID, Endpoint: v1alpha1.Endpoint{ Address: db.Endpoint.Address, Port: db.Endpoint.Port, diff --git a/pkg/controller/redis/redis_instance.go b/pkg/controller/redis/redis_instance.go index ac4514f..5311586 100644 --- a/pkg/controller/redis/redis_instance.go +++ b/pkg/controller/redis/redis_instance.go @@ -19,13 +19,12 @@ package redis import ( "context" "fmt" + "time" - sdkerror "github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors" xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" "github.com/crossplane/crossplane-runtime/pkg/event" "github.com/crossplane/crossplane-runtime/pkg/logging" "github.com/crossplane/crossplane-runtime/pkg/meta" - "github.com/crossplane/crossplane-runtime/pkg/password" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" "github.com/crossplane/crossplane-runtime/pkg/resource" "github.com/pkg/errors" @@ -40,50 +39,66 @@ import ( ) const ( + controllerName = "AliCloud Controller" // Fall to connection instance error description errCreateInstanceConnectionFailed = "cannot instance connection" - errNotInstance = "managed resource is not an instance custom resource" - errNoProvider = "no provider config or provider specified" - errCreateClient = "cannot create redis client" - errGetProviderConfig = "cannot get provider config" - errTrackUsage = "cannot track provider config usage" - errNoConnectionSecret = "no connection secret specified" - errGetConnectionSecret = "cannot get connection secret" + errNotInstance = "managed resource is not an instance custom resource" + errNoProvider = "no provider config or provider specified" + errCreateClient = "cannot create redis client" + errGetProviderConfig = "cannot get provider config" + errTrackUsage = "cannot track provider config usage" + errNoConnectionSecret = "no connection secret specified" + errGetConnectionSecret = "cannot get connection secret" + errInstanceIdEmpty = "instance id is empty, maybe it's not created" + errInstanceAlreadyCreated = "instance id is not empty, maybe it's already been created" + errStatusUpdate = "failed to update CR status" errCreateFailed = "cannot create redis instance" errCreateAccountFailed = "cannot create redis account" errDeleteFailed = "cannot delete redis instance" errDescribeFailed = "cannot describe redis instance" + errAccountNameInvalid = "instance name is invalid" errFmtUnsupportedCredSource = "credentials source %q is not currently supported" errDuplicateConnectionPort = "InvalidConnectionStringOrPort.Duplicate" errAccountNameDuplicate = "InvalidAccountName.Duplicate" - - // Default port of redis database - defaultRedisPort = "6379" ) // SetupRedisInstance adds a controller that reconciles RedisInstances. func SetupRedisInstance(mgr ctrl.Manager, l logging.Logger) error { name := managed.ControllerName(v1alpha1.RedisInstanceGroupKind) + connector := &redisConnector{ + kubeClient: mgr.GetClient(), + usage: resource.NewProviderConfigUsageTracker(mgr.GetClient(), &aliv1beta1.ProviderConfigUsage{}), + newRedisClient: redis.NewClient, + } + + reconcilerOpts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(connector), + managed.WithLogger(l.WithValues(controllerName, name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + // Use empty initializer to make sure the externalName is not initialized + // externalName is going to be updated after a successful creation + managed.WithInitializers(), + managed.WithCreationGracePeriod(3 * time.Minute), + } + + r := managed.NewReconciler( + mgr, + resource.ManagedKind(v1alpha1.RedisInstanceGroupVersionKind), + reconcilerOpts..., + ) + return ctrl.NewControllerManagedBy(mgr). Named(name). For(&v1alpha1.RedisInstance{}). - Complete(managed.NewReconciler(mgr, - resource.ManagedKind(v1alpha1.RedisInstanceGroupVersionKind), - managed.WithExternalConnecter(&redisConnector{ - client: mgr.GetClient(), - usage: resource.NewProviderConfigUsageTracker(mgr.GetClient(), &aliv1beta1.ProviderConfigUsage{}), - newRedisClient: redis.NewClient, - }), - managed.WithLogger(l.WithValues("controller", name)), - managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))))) + Complete(r) } type redisConnector struct { - client client.Client + kubeClient client.Client usage resource.Tracker newRedisClient func(ctx context.Context, accessKeyID, accessKeySecret, region string) (redis.Client, error) } @@ -107,7 +122,7 @@ func (c *redisConnector) Connect(ctx context.Context, mg resource.Managed) (mana } pc := &aliv1beta1.ProviderConfig{} - if err := c.client.Get(ctx, types.NamespacedName{Name: cr.Spec.ProviderConfigReference.Name}, pc); err != nil { + if err := c.kubeClient.Get(ctx, types.NamespacedName{Name: cr.Spec.ProviderConfigReference.Name}, pc); err != nil { return nil, errors.Wrap(err, errGetProviderConfig) } if s := pc.Spec.Credentials.Source; s != xpv1.CredentialsSourceSecret { @@ -125,16 +140,17 @@ func (c *redisConnector) Connect(ctx context.Context, mg resource.Managed) (mana s := &corev1.Secret{} nn := types.NamespacedName{Namespace: sel.Namespace, Name: sel.Name} - if err := c.client.Get(ctx, nn, s); err != nil { + if err := c.kubeClient.Get(ctx, nn, s); err != nil { return nil, errors.Wrap(err, errGetConnectionSecret) } redisClient, err := c.newRedisClient(ctx, string(s.Data["accessKeyId"]), string(s.Data["accessKeySecret"]), region) - return &external{client: redisClient}, errors.Wrap(err, errCreateClient) + return &external{redisClient: redisClient, kubeClient: c.kubeClient}, errors.Wrap(err, errCreateClient) } type external struct { - client redis.Client + redisClient redis.Client + kubeClient client.Client } func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.ExternalObservation, error) { @@ -143,29 +159,25 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex return managed.ExternalObservation{}, errors.New(errNotInstance) } - if cr.Status.AtProvider.DBInstanceID == "" { - return managed.ExternalObservation{}, nil + instanceId := meta.GetExternalName(cr) + // externalName will not be initialized until a successful creation + if instanceId == "" { + return managed.ExternalObservation{ + ResourceExists: false, + }, nil } - instance, err := e.client.DescribeDBInstance(cr.Status.AtProvider.DBInstanceID) + instance, err := e.redisClient.DescribeDBInstance(instanceId) if err != nil { fmt.Print(err.Error(), resource.Ignore(redis.IsErrorNotFound, err)) return managed.ExternalObservation{}, errors.Wrap(resource.Ignore(redis.IsErrorNotFound, err), errDescribeFailed) } cr.Status.AtProvider = redis.GenerateObservation(instance) - var pw string + switch cr.Status.AtProvider.DBInstanceStatus { case v1alpha1.RedisInstanceStateRunning: cr.Status.SetConditions(xpv1.Available()) - - // TODO: Support update connection port - cr.Status.AtProvider.ConnectionReady = true - - pw, err = e.createAccount(cr) - if err != nil { - return managed.ExternalObservation{}, errors.Wrap(err, errCreateAccountFailed) - } case v1alpha1.RedisInstanceStateCreating: cr.Status.SetConditions(xpv1.Creating()) case v1alpha1.RedisInstanceStateDeleting: @@ -177,7 +189,7 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex return managed.ExternalObservation{ ResourceExists: true, ResourceUpToDate: true, - ConnectionDetails: getConnectionDetails(pw, cr, instance), + ConnectionDetails: getConnectionDetails("", instance), }, nil } @@ -243,33 +255,40 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex // return domain, port, nil // } -func (e *external) createAccount(cr *v1alpha1.RedisInstance) (string, error) { - if cr.Status.AtProvider.AccountReady { - return "", nil - } +// func (e *external) createAccount(cr *v1alpha1.RedisInstance) (string, error) { +// if cr.Status.AtProvider.AccountReady { +// return "", nil +// } - pw, err := password.Generate() - if err != nil { - return "", err - } +// pw, err := password.Generate() +// if err != nil { +// return "", err +// } - // Use the instance id as the default user - err = e.client.CreateAccount(cr.Status.AtProvider.DBInstanceID, meta.GetExternalName(cr), pw) - if err != nil { - // The previous request might fail due to timeout. That's fine we will eventually reconcile it. - var sdkerr sdkerror.Error - if errors.As(err, &sdkerr) { - if sdkerr.ErrorCode() == errAccountNameDuplicate { - cr.Status.AtProvider.AccountReady = true - return "", nil - } - } - return "", err - } +// instanceId, err := getInstanceId(cr) +// if err != nil { +// return "", err +// } - cr.Status.AtProvider.AccountReady = true - return pw, nil -} +// username := getUsername(cr) + +// // Use the instance name as the default user +// err = e.client.CreateAccount(instanceId, username, pw) +// if err != nil { +// // The previous request might fail due to timeout. That's fine we will eventually reconcile it. +// var sdkerr sdkerror.Error +// if errors.As(err, &sdkerr) { +// if sdkerr.ErrorCode() == errAccountNameDuplicate { +// cr.Status.AtProvider.AccountReady = true +// return "", nil +// } +// } +// return "", err +// } + +// cr.Status.AtProvider.AccountReady = true +// return pw, nil +// } func (e *external) Create(ctx context.Context, mg resource.Managed) (managed.ExternalCreation, error) { cr, ok := mg.(*v1alpha1.RedisInstance) @@ -277,21 +296,20 @@ func (e *external) Create(ctx context.Context, mg resource.Managed) (managed.Ext return managed.ExternalCreation{}, errors.New(errNotInstance) } - cr.SetConditions(xpv1.Creating()) - if cr.Status.AtProvider.DBInstanceStatus == v1alpha1.RedisInstanceStateCreating { - return managed.ExternalCreation{}, nil + cr.Status.SetConditions(xpv1.Creating()) + if err := e.kubeClient.Status().Update(ctx, cr); err != nil { + return managed.ExternalCreation{}, errors.Wrap(err, errStatusUpdate) } - instance, err := e.client.CreateDBInstance(meta.GetExternalName(cr), &cr.Spec.ForProvider) + instance, pw, err := e.redisClient.CreateDBInstance(cr.GetObjectMeta().GetName(), &cr.Spec.ForProvider) if err != nil { return managed.ExternalCreation{}, errors.Wrap(err, errCreateFailed) } - // The Crossplane runtime will send status update back to apiserver. - cr.Status.AtProvider.DBInstanceID = instance.ID + meta.SetExternalName(cr, instance.ID) // Any connection details emitted in ExternalClient are cumulative. - return managed.ExternalCreation{ConnectionDetails: getConnectionDetails("", cr, instance)}, nil + return managed.ExternalCreation{ConnectionDetails: getConnectionDetails(pw, instance)}, nil } func (e *external) Update(ctx context.Context, mg resource.Managed) (managed.ExternalUpdate, error) { @@ -299,13 +317,15 @@ func (e *external) Update(ctx context.Context, mg resource.Managed) (managed.Ext if !ok { return managed.ExternalUpdate{}, errors.New(errNotInstance) } - name := meta.GetExternalName(cr) + + cr.Status.SetConditions(xpv1.Creating()) + description := cr.Spec.ForProvider modifyReq := &redis.ModifyRedisInstanceRequest{ InstanceClass: description.InstanceClass, } - cr.Status.SetConditions(xpv1.Creating()) - err := e.client.Update(name, modifyReq) + err := e.redisClient.Update(meta.GetExternalName(cr), modifyReq) + return managed.ExternalUpdate{}, err } @@ -314,20 +334,21 @@ func (e *external) Delete(ctx context.Context, mg resource.Managed) error { if !ok { return errors.New(errNotInstance) } + cr.SetConditions(xpv1.Deleting()) - if cr.Status.AtProvider.DBInstanceStatus == v1alpha1.RedisInstanceStateDeleting { - return nil - } - err := e.client.DeleteDBInstance(cr.Status.AtProvider.DBInstanceID) + err := e.redisClient.DeleteDBInstance(meta.GetExternalName(cr)) return errors.Wrap(resource.Ignore(redis.IsErrorNotFound, err), errDeleteFailed) } -func getConnectionDetails(password string, cr *v1alpha1.RedisInstance, instance *redis.DBInstance) managed.ConnectionDetails { +func getConnectionDetails(password string, instance *redis.DBInstance) managed.ConnectionDetails { cd := managed.ConnectionDetails{} - if meta.GetExternalName(cr) != "" { - cd[xpv1.ResourceCredentialsSecretUserKey] = []byte(meta.GetExternalName(cr)) + // By default, a master user will be created with the instanceId + username := instance.ID + + if username != "" { + cd[xpv1.ResourceCredentialsSecretUserKey] = []byte(username) } if password != "" { @@ -335,8 +356,12 @@ func getConnectionDetails(password string, cr *v1alpha1.RedisInstance, instance } if instance.Endpoint != nil { - cd[xpv1.ResourceCredentialsSecretEndpointKey] = []byte(instance.Endpoint.Address) - cd[xpv1.ResourceCredentialsSecretPortKey] = []byte(instance.Endpoint.Port) + if instance.Endpoint.Address != "" { + cd[xpv1.ResourceCredentialsSecretEndpointKey] = []byte(instance.Endpoint.Address) + } + if instance.Endpoint.Port != "" { + cd[xpv1.ResourceCredentialsSecretPortKey] = []byte(instance.Endpoint.Port) + } } return cd diff --git a/pkg/controller/redis/redisinstance_test.go b/pkg/controller/redis/redisinstance_test.go index a68da8a..79d2b21 100644 --- a/pkg/controller/redis/redisinstance_test.go +++ b/pkg/controller/redis/redisinstance_test.go @@ -21,12 +21,16 @@ import ( "github.com/crossplane-contrib/provider-alibaba/pkg/clients/redis" ) +const testId = "testId" const testName = "testName" const testStatus = "testEndpoint" +const testPassword = "testPassword" -var testPort = 8080 +const testPort = "8080" +const testAddress = "172.0.0.1" -var testEndpoint = v1alpha1.Endpoint{Address: "test-address", Port: "test-port"} +var testPortInt = 8080 +var testEndpoint = v1alpha1.Endpoint{Address: testAddress, Port: testPort} func TestConnector(t *testing.T) { errBoom := errors.New("boom") @@ -247,7 +251,7 @@ func TestConnector(t *testing.T) { for name, tc := range cases { t.Run(name, func(t *testing.T) { - c := &redisConnector{client: tc.fields.client, usage: tc.fields.usage, newRedisClient: tc.fields.newRedisClient} + c := &redisConnector{kubeClient: tc.fields.client, usage: tc.fields.usage, newRedisClient: tc.fields.newRedisClient} _, err := c.Connect(tc.args.ctx, tc.args.mg) if diff := cmp.Diff(tc.want, err, test.EquateErrors()); diff != "" { t.Errorf("\n%s\nc.Connect(...) -want error, +got error:\n%s\n", tc.reason, diff) @@ -257,7 +261,7 @@ func TestConnector(t *testing.T) { } func TestObserve(t *testing.T) { - e := &external{client: &fakeRedisClient{}} + e := &external{redisClient: &fakeRedisClient{}} type want struct { ResourceExists bool ResourceUpToDate bool @@ -272,13 +276,15 @@ func TestObserve(t *testing.T) { mg: &v1alpha1.RedisInstance{ ObjectMeta: metav1.ObjectMeta{ Name: testName, + Annotations: map[string]string{ + crossplanemeta.AnnotationKeyExternalName: testId, + }, }, Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{}, }, Status: v1alpha1.RedisInstanceStatus{ AtProvider: v1alpha1.RedisInstanceObservation{ - DBInstanceID: testName, DBInstanceStatus: testStatus, Endpoint: testEndpoint, }, @@ -292,15 +298,17 @@ func TestObserve(t *testing.T) { mg: &v1alpha1.RedisInstance{ ObjectMeta: metav1.ObjectMeta{ Name: testName, + Annotations: map[string]string{ + crossplanemeta.AnnotationKeyExternalName: testId, + }, }, Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{ - Port: &testPort, + Port: &testPortInt, }, }, Status: v1alpha1.RedisInstanceStatus{ AtProvider: v1alpha1.RedisInstanceObservation{ - DBInstanceID: testName, DBInstanceStatus: testStatus, Endpoint: testEndpoint, }, @@ -329,7 +337,7 @@ func TestObserve(t *testing.T) { } func TestCreate(t *testing.T) { - e := &external{client: &fakeRedisClient{}} + e := &external{redisClient: &fakeRedisClient{}} type want struct { u managed.ExternalCreation err error @@ -345,25 +353,11 @@ func TestCreate(t *testing.T) { u: managed.ExternalCreation{}, err: errors.New(errNotInstance), }, }, - "DBInstanceStatus is creating": { - mg: &v1alpha1.RedisInstance{ - Status: v1alpha1.RedisInstanceStatus{ - AtProvider: v1alpha1.RedisInstanceObservation{ - DBInstanceStatus: v1alpha1.RedisInstanceStateCreating, - DBInstanceID: testName, - Endpoint: testEndpoint, - }, - }, - }, - want: want{ - u: managed.ExternalCreation{}, err: nil, - }, - }, "Successfully create a managed resource": { mg: &v1alpha1.RedisInstance{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - crossplanemeta.AnnotationKeyExternalName: testName, + crossplanemeta.AnnotationKeyExternalName: testId, }, Name: testName, }, @@ -371,7 +365,7 @@ func TestCreate(t *testing.T) { ForProvider: v1alpha1.RedisInstanceParameters{ EngineVersion: "5.0", InstanceClass: "redis.logic.sharding.2g.8db.0rodb.8proxy.default", - Port: &testPort, + Port: &testPortInt, // PubliclyAccessible: true, }, }, @@ -379,9 +373,10 @@ func TestCreate(t *testing.T) { want: want{ u: managed.ExternalCreation{ ConnectionDetails: map[string][]byte{ - "username": []byte(testName), - "endpoint": []byte("172.0.0.1"), - "port": []byte(strconv.Itoa(8888)), + "username": []byte(testId), + "password": []byte(testPassword), + "endpoint": []byte(testAddress), + "port": []byte(strconv.Itoa(testPortInt)), }}, err: nil, }, @@ -403,7 +398,7 @@ func TestCreate(t *testing.T) { } func TestUpdate(t *testing.T) { - e := &external{client: &fakeRedisClient{}} + e := &external{redisClient: &fakeRedisClient{}} type want struct { u managed.ExternalUpdate err error @@ -422,7 +417,7 @@ func TestUpdate(t *testing.T) { "Successfully update a managed resource": { mg: &v1alpha1.RedisInstance{ ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{crossplanemeta.AnnotationKeyExternalName: testName}, + Annotations: map[string]string{crossplanemeta.AnnotationKeyExternalName: testId}, }, Spec: v1alpha1.RedisInstanceSpec{ ForProvider: v1alpha1.RedisInstanceParameters{ @@ -450,7 +445,7 @@ func TestUpdate(t *testing.T) { } func TestDelete(t *testing.T) { - e := &external{client: &fakeRedisClient{}} + e := &external{redisClient: &fakeRedisClient{}} type want struct { err error } @@ -470,7 +465,6 @@ func TestDelete(t *testing.T) { Status: v1alpha1.RedisInstanceStatus{ AtProvider: v1alpha1.RedisInstanceObservation{ DBInstanceStatus: v1alpha1.RedisInstanceStateDeleting, - DBInstanceID: testName, Endpoint: testEndpoint, }, }, @@ -482,11 +476,10 @@ func TestDelete(t *testing.T) { "Successfully delete a managed resource": { mg: &v1alpha1.RedisInstance{ ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{crossplanemeta.AnnotationKeyExternalName: testName}, + Annotations: map[string]string{crossplanemeta.AnnotationKeyExternalName: testId}, }, Status: v1alpha1.RedisInstanceStatus{ AtProvider: v1alpha1.RedisInstanceObservation{ - DBInstanceID: testName, DBInstanceStatus: testStatus, Endpoint: testEndpoint, }, @@ -511,7 +504,7 @@ func TestDelete(t *testing.T) { func TestGetConnectionDetails(t *testing.T) { address := testEndpoint.Address port := testEndpoint.Port - password := "super-secret" + password := testPassword type args struct { pw string @@ -529,22 +522,8 @@ func TestGetConnectionDetails(t *testing.T) { "SuccessfulNoPassword": { args: args{ pw: "", - cr: &v1alpha1.RedisInstance{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - crossplanemeta.AnnotationKeyExternalName: testName, - }, - }, - Spec: v1alpha1.RedisInstanceSpec{ - ForProvider: v1alpha1.RedisInstanceParameters{}, - }, - Status: v1alpha1.RedisInstanceStatus{ - AtProvider: v1alpha1.RedisInstanceObservation{ - Endpoint: testEndpoint, - }, - }, - }, i: &redis.DBInstance{ + ID: testId, Endpoint: &v1alpha1.Endpoint{ Address: address, Port: port, @@ -553,7 +532,7 @@ func TestGetConnectionDetails(t *testing.T) { }, want: want{ conn: managed.ConnectionDetails{ - xpv1.ResourceCredentialsSecretUserKey: []byte(testName), + xpv1.ResourceCredentialsSecretUserKey: []byte(testId), xpv1.ResourceCredentialsSecretEndpointKey: []byte(address), xpv1.ResourceCredentialsSecretPortKey: []byte(port), }, @@ -562,27 +541,13 @@ func TestGetConnectionDetails(t *testing.T) { "SuccessfulNoEndpoint": { args: args{ pw: password, - cr: &v1alpha1.RedisInstance{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - crossplanemeta.AnnotationKeyExternalName: testName, - }, - Name: testName, - }, - Spec: v1alpha1.RedisInstanceSpec{ - ForProvider: v1alpha1.RedisInstanceParameters{}, - }, - Status: v1alpha1.RedisInstanceStatus{ - AtProvider: v1alpha1.RedisInstanceObservation{ - DBInstanceID: testName, - }, - }, + i: &redis.DBInstance{ + ID: testId, }, - i: &redis.DBInstance{}, }, want: want{ conn: managed.ConnectionDetails{ - xpv1.ResourceCredentialsSecretUserKey: []byte(testName), + xpv1.ResourceCredentialsSecretUserKey: []byte(testId), xpv1.ResourceCredentialsSecretPasswordKey: []byte(password), }, }, @@ -590,24 +555,8 @@ func TestGetConnectionDetails(t *testing.T) { "Successful": { args: args{ pw: password, - cr: &v1alpha1.RedisInstance{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - crossplanemeta.AnnotationKeyExternalName: testName, - }, - Name: testName, - }, - Spec: v1alpha1.RedisInstanceSpec{ - ForProvider: v1alpha1.RedisInstanceParameters{}, - }, - Status: v1alpha1.RedisInstanceStatus{ - AtProvider: v1alpha1.RedisInstanceObservation{ - DBInstanceID: testName, - Endpoint: testEndpoint, - }, - }, - }, i: &redis.DBInstance{ + ID: testId, Endpoint: &v1alpha1.Endpoint{ Address: address, Port: port, @@ -616,7 +565,7 @@ func TestGetConnectionDetails(t *testing.T) { }, want: want{ conn: managed.ConnectionDetails{ - xpv1.ResourceCredentialsSecretUserKey: []byte(testName), + xpv1.ResourceCredentialsSecretUserKey: []byte(testId), xpv1.ResourceCredentialsSecretPasswordKey: []byte(password), xpv1.ResourceCredentialsSecretEndpointKey: []byte(address), xpv1.ResourceCredentialsSecretPortKey: []byte(port), @@ -627,7 +576,7 @@ func TestGetConnectionDetails(t *testing.T) { for name, tc := range cases { t.Run(name, func(t *testing.T) { - conn := getConnectionDetails(tc.args.pw, tc.args.cr, tc.args.i) + conn := getConnectionDetails(tc.args.pw, tc.args.i) if diff := cmp.Diff(tc.want.conn, conn); diff != "" { t.Errorf("getConnectionDetails(...): -want, +got:\n%s", diff) } @@ -638,62 +587,62 @@ func TestGetConnectionDetails(t *testing.T) { type fakeRedisClient struct{} func (c *fakeRedisClient) DescribeDBInstance(id string) (*redis.DBInstance, error) { - if id != testName { + if id != testId { return nil, errors.New("DescribeRedisInstance: client doesn't work") } return &redis.DBInstance{ ID: id, Status: v1alpha1.RedisInstanceStateRunning, Endpoint: &v1alpha1.Endpoint{ - Address: "172.0.0.1", - Port: "8888", + Address: testAddress, + Port: testPort, }, }, nil } -func (c *fakeRedisClient) CreateDBInstance(instanceName string, p *v1alpha1.RedisInstanceParameters) (*redis.DBInstance, error) { +func (c *fakeRedisClient) CreateDBInstance(instanceName string, p *v1alpha1.RedisInstanceParameters) (*redis.DBInstance, string, error) { if instanceName != testName { - return nil, errors.New("CreateRedisInstance: client doesn't work") + return nil, "", errors.New("CreateRedisInstance: client doesn't work") } return &redis.DBInstance{ - ID: testName, + ID: testId, Endpoint: &v1alpha1.Endpoint{ - Address: "172.0.0.1", - Port: "8888", + Address: testAddress, + Port: testPort, }, - }, nil + }, testPassword, nil } func (c *fakeRedisClient) CreateAccount(id, user, pw string) error { - if id != testName { + if id != testId { return errors.New("CreateAccount: client doesn't work") } return nil } func (c *fakeRedisClient) DeleteDBInstance(id string) error { - if id != testName { + if id != testId { return errors.New("DeleteRedisInstance: client doesn't work") } return nil } -func (c *fakeRedisClient) AllocateInstancePublicConnection(id string, port int) (string, error) { - if id != testName { - return "nil", errors.New("AllocateInstancePublicConnection: client doesn't work") - } - return "", nil -} +// func (c *fakeRedisClient) AllocateInstancePublicConnection(id string, port int) (string, error) { +// if id != testId { +// return "nil", errors.New("AllocateInstancePublicConnection: client doesn't work") +// } +// return "", nil +// } -func (c *fakeRedisClient) ModifyDBInstanceConnectionString(id string, port int) (string, error) { - if id != testName { - return "nil", errors.New("ModifyDBInstanceConnectionString: client doesn't work") - } - return "", nil -} +// func (c *fakeRedisClient) ModifyDBInstanceConnectionString(id string, port int) (string, error) { +// if id != testId { +// return "nil", errors.New("ModifyDBInstanceConnectionString: client doesn't work") +// } +// return "", nil +// } func (c *fakeRedisClient) Update(id string, req *redis.ModifyRedisInstanceRequest) error { - if id != testName { + if id != testId { return errors.New("Update: client doesn't work") } return nil From 37a3ac5dae80db7c5bddaeead05053017ecdc4c5 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Wed, 29 May 2024 17:10:55 -0700 Subject: [PATCH 17/30] modify logger to use ISO8601 format Signed-off-by: Henry Zeng --- cmd/provider/main.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/provider/main.go b/cmd/provider/main.go index 1918e6e..ca65f25 100644 --- a/cmd/provider/main.go +++ b/cmd/provider/main.go @@ -20,6 +20,7 @@ import ( "os" "path/filepath" + "go.uber.org/zap/zapcore" "gopkg.in/alecthomas/kingpin.v2" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/log/zap" @@ -39,7 +40,7 @@ func main() { ) kingpin.MustParse(app.Parse(os.Args[1:])) - zl := zap.New(zap.UseDevMode(*debug)) + zl := zap.New(zap.UseDevMode(*debug), UseISO8601()) log := logging.NewLogrLogger(zl.WithName("provider-alibaba")) if *debug { // The controller-runtime runs with a no-op logger by default. It is @@ -64,3 +65,10 @@ func main() { kingpin.FatalIfError(controller.Setup(mgr, log), "Cannot setup Alibaba Cloud controllers") kingpin.FatalIfError(mgr.Start(ctrl.SetupSignalHandler()), "Cannot start controller manager") } + +// UseISO8601 sets the logger to use ISO8601 timestamp format +func UseISO8601() zap.Opts { + return func(o *zap.Options) { + o.TimeEncoder = zapcore.ISO8601TimeEncoder + } +} From 47f53d86c6d24be970ff731d1ce9f9327c53fd2c Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Thu, 30 May 2024 11:45:12 -0700 Subject: [PATCH 18/30] fix unit tests Signed-off-by: Henry Zeng --- pkg/controller/redis/redisinstance_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/controller/redis/redisinstance_test.go b/pkg/controller/redis/redisinstance_test.go index 79d2b21..798e451 100644 --- a/pkg/controller/redis/redisinstance_test.go +++ b/pkg/controller/redis/redisinstance_test.go @@ -337,7 +337,12 @@ func TestObserve(t *testing.T) { } func TestCreate(t *testing.T) { - e := &external{redisClient: &fakeRedisClient{}} + e := &external{redisClient: &fakeRedisClient{}, kubeClient: &test.MockClient{ + MockStatusUpdate: test.NewMockStatusUpdateFn(nil, func(obj client.Object) error { + return nil + }), + }} + type want struct { u managed.ExternalCreation err error @@ -462,6 +467,9 @@ func TestDelete(t *testing.T) { }, "Managed resource is already in a delete state": { mg: &v1alpha1.RedisInstance{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{crossplanemeta.AnnotationKeyExternalName: testId}, + }, Status: v1alpha1.RedisInstanceStatus{ AtProvider: v1alpha1.RedisInstanceObservation{ DBInstanceStatus: v1alpha1.RedisInstanceStateDeleting, From 5b538752173bba534f6f1377b8e8fc6e4884e8c3 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Thu, 30 May 2024 14:52:26 -0700 Subject: [PATCH 19/30] rename redis client functions to be more meaningful Signed-off-by: Henry Zeng --- apis/redis/v1alpha1/redis_types.go | 3 - pkg/clients/redis/redis.go | 72 +++++++--------------- pkg/clients/redis/redis_test.go | 2 +- pkg/controller/redis/redis_instance.go | 10 +-- pkg/controller/redis/redisinstance_test.go | 27 +++----- 5 files changed, 39 insertions(+), 75 deletions(-) diff --git a/apis/redis/v1alpha1/redis_types.go b/apis/redis/v1alpha1/redis_types.go index 6065a06..783b0ea 100644 --- a/apis/redis/v1alpha1/redis_types.go +++ b/apis/redis/v1alpha1/redis_types.go @@ -348,9 +348,6 @@ type RedisInstanceObservation struct { // DBInstanceStatus specifies the current state of this database. DBInstanceStatus string `json:"dbInstanceStatus,omitempty"` - // AccountReady specifies whether the initial user account (username + password) is ready - AccountReady bool `json:"accountReady"` - // ConnectionReady specifies whether the network connect is ready ConnectionReady bool `json:"connectionReady"` diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index dd48623..4496ded 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -20,7 +20,6 @@ import ( "context" "encoding/json" "strconv" - "time" "github.com/crossplane/crossplane-runtime/pkg/password" "github.com/pkg/errors" @@ -33,23 +32,17 @@ import ( ) var ( - // ErrDBInstanceNotFound indicates DBInstance not found - ErrDBInstanceNotFound = errors.New("DBInstanceNotFound") +// ErrDBInstanceNotFound indicates DBInstance not found +// ErrDBInstanceNotFound = errors.New("DBInstanceNotFound") ) const ( - // DefaultReadTime indicates default connect timeout number - DefaultReadTime = 60 * time.Second - - DefaultConnectTime = 60 * time.Second - - // Default Account privilege - DefaultAccountPrivilege = "RoleReadWrite" - // HTTPSScheme indicates request scheme HTTPSScheme = "https" // Errors + errInstanceNotFound = "DBInstanceNotFound" + errDescribeInstanceFailed = "cannot describe instance attributes" errGeneratePasswordFailed = "cannot generate a password" ) @@ -64,17 +57,16 @@ type CleanedServerError struct { // Client defines Redis client operations type Client interface { - DescribeDBInstance(id string) (*DBInstance, error) - // CreateAccount(id, username, password string) error - CreateDBInstance(externalName string, parameters *v1alpha1.RedisInstanceParameters) (*DBInstance, string, error) - DeleteDBInstance(id string) error + DescribeInstance(id string) (*Instance, error) + CreateInstance(name string, parameters *v1alpha1.RedisInstanceParameters) (*Instance, string, error) + DeleteInstance(id string) error // AllocateInstancePublicConnection(id string, port int) (string, error) // ModifyDBInstanceConnectionString(id string, port int) (string, error) - Update(id string, req *ModifyRedisInstanceRequest) error + UpdateInstance(id string, req *ModifyRedisInstanceRequest) error } -// DBInstance defines the DB instance information -type DBInstance struct { +// DBInstance defines the instance information +type Instance struct { // Instance ID ID string @@ -104,7 +96,7 @@ func NewClient(ctx context.Context, accessKeyID, accessKeySecret, region string) return c, nil } -func (c *client) DescribeDBInstance(id string) (*DBInstance, error) { +func (c *client) DescribeInstance(id string) (*Instance, error) { request := aliredis.CreateDescribeInstancesRequest() request.Scheme = HTTPSScheme @@ -112,13 +104,13 @@ func (c *client) DescribeDBInstance(id string) (*DBInstance, error) { response, err := c.redisCli.DescribeInstances(request) if err != nil { - return nil, errors.Wrap(CleanError(err), "cannot describe redis instance") + return nil, errors.Wrap(CleanError(err), errDescribeInstanceFailed) } if len(response.Instances.KVStoreInstance) == 0 { - return nil, ErrDBInstanceNotFound + return nil, errors.New(errInstanceNotFound) } rsp := response.Instances.KVStoreInstance[0] - in := &DBInstance{ + in := &Instance{ ID: rsp.InstanceId, Status: rsp.InstanceStatus, Endpoint: &v1alpha1.Endpoint{ @@ -130,13 +122,9 @@ func (c *client) DescribeDBInstance(id string) (*DBInstance, error) { return in, nil } -func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstanceParameters) (*DBInstance, string, error) { +func (c *client) CreateInstance(externalName string, p *v1alpha1.RedisInstanceParameters) (*Instance, string, error) { request := aliredis.CreateCreateInstanceRequest() - // request.Scheme = HTTPSScheme - request.ConnectTimeout = DefaultConnectTime - request.ReadTimeout = DefaultReadTime - // Seems regionID will be by default from the first part ZoneID // request.RegionID = p.RegionID request.Token = p.Token @@ -209,7 +197,7 @@ func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstance return nil, "", CleanError(err) } - return &DBInstance{ + return &Instance{ ID: resp.InstanceId, Endpoint: &v1alpha1.Endpoint{ Address: resp.ConnectionDomain, @@ -218,20 +206,7 @@ func (c *client) CreateDBInstance(externalName string, p *v1alpha1.RedisInstance }, pw, nil } -func (c *client) CreateAccount(id, user, pw string) error { - request := aliredis.CreateCreateAccountRequest() - request.Scheme = HTTPSScheme - request.InstanceId = id - request.AccountName = user - request.AccountPassword = pw - request.ReadTimeout = DefaultReadTime - // request.AccountPrivilege = DefaultAccountPrivilege - - _, err := c.redisCli.CreateAccount(request) - return CleanError(err) -} - -func (c *client) DeleteDBInstance(id string) error { +func (c *client) DeleteInstance(id string) error { request := aliredis.CreateDeleteInstanceRequest() request.Scheme = HTTPSScheme @@ -243,12 +218,12 @@ func (c *client) DeleteDBInstance(id string) error { // GenerateObservation is used to produce v1alpha1.RedisInstanceObservation from // redis.DBInstance. -func GenerateObservation(db *DBInstance) v1alpha1.RedisInstanceObservation { +func GenerateObservation(instance *Instance) v1alpha1.RedisInstanceObservation { return v1alpha1.RedisInstanceObservation{ - DBInstanceStatus: db.Status, + DBInstanceStatus: instance.Status, Endpoint: v1alpha1.Endpoint{ - Address: db.Endpoint.Address, - Port: db.Endpoint.Port, + Address: instance.Endpoint.Address, + Port: instance.Endpoint.Port, }, } } @@ -261,7 +236,7 @@ func IsErrorNotFound(err error) bool { // If the instance is already removed, errors should be ignored when deleting it. var srverr *sdkerrors.ServerError if !errors.As(err, &srverr) { - return false || errors.Is(err, ErrDBInstanceNotFound) + return false || errors.Is(err, errors.New(errInstanceNotFound)) } return srverr.ErrorCode() == "InvalidInstanceId.NotFound" @@ -295,7 +270,7 @@ func IsErrorNotFound(err error) bool { // return request.CurrentConnectionString, err // } -func (c *client) Update(id string, req *ModifyRedisInstanceRequest) error { +func (c *client) UpdateInstance(id string, req *ModifyRedisInstanceRequest) error { if req.InstanceClass == "" { return errors.New("modify instances spec is require") } @@ -310,7 +285,6 @@ func (c *client) modifyInstanceSpec(id string, req *ModifyRedisInstanceRequest) request.Scheme = HTTPSScheme request.InstanceId = id request.InstanceClass = req.InstanceClass - request.ReadTimeout = DefaultReadTime _, err := c.redisCli.ModifyInstanceSpec(request) return CleanError(err) } diff --git a/pkg/clients/redis/redis_test.go b/pkg/clients/redis/redis_test.go index d287285..ab41374 100644 --- a/pkg/clients/redis/redis_test.go +++ b/pkg/clients/redis/redis_test.go @@ -10,7 +10,7 @@ import ( ) func TestGenerateObservation(t *testing.T) { - ob := GenerateObservation(&DBInstance{ + ob := GenerateObservation(&Instance{ Status: v1alpha1.RedisInstanceStateRunning, ID: "test-id", Endpoint: &v1alpha1.Endpoint{ diff --git a/pkg/controller/redis/redis_instance.go b/pkg/controller/redis/redis_instance.go index 5311586..089dcfb 100644 --- a/pkg/controller/redis/redis_instance.go +++ b/pkg/controller/redis/redis_instance.go @@ -167,7 +167,7 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex }, nil } - instance, err := e.redisClient.DescribeDBInstance(instanceId) + instance, err := e.redisClient.DescribeInstance(instanceId) if err != nil { fmt.Print(err.Error(), resource.Ignore(redis.IsErrorNotFound, err)) return managed.ExternalObservation{}, errors.Wrap(resource.Ignore(redis.IsErrorNotFound, err), errDescribeFailed) @@ -301,7 +301,7 @@ func (e *external) Create(ctx context.Context, mg resource.Managed) (managed.Ext return managed.ExternalCreation{}, errors.Wrap(err, errStatusUpdate) } - instance, pw, err := e.redisClient.CreateDBInstance(cr.GetObjectMeta().GetName(), &cr.Spec.ForProvider) + instance, pw, err := e.redisClient.CreateInstance(cr.GetObjectMeta().GetName(), &cr.Spec.ForProvider) if err != nil { return managed.ExternalCreation{}, errors.Wrap(err, errCreateFailed) } @@ -324,7 +324,7 @@ func (e *external) Update(ctx context.Context, mg resource.Managed) (managed.Ext modifyReq := &redis.ModifyRedisInstanceRequest{ InstanceClass: description.InstanceClass, } - err := e.redisClient.Update(meta.GetExternalName(cr), modifyReq) + err := e.redisClient.UpdateInstance(meta.GetExternalName(cr), modifyReq) return managed.ExternalUpdate{}, err } @@ -337,11 +337,11 @@ func (e *external) Delete(ctx context.Context, mg resource.Managed) error { cr.SetConditions(xpv1.Deleting()) - err := e.redisClient.DeleteDBInstance(meta.GetExternalName(cr)) + err := e.redisClient.DeleteInstance(meta.GetExternalName(cr)) return errors.Wrap(resource.Ignore(redis.IsErrorNotFound, err), errDeleteFailed) } -func getConnectionDetails(password string, instance *redis.DBInstance) managed.ConnectionDetails { +func getConnectionDetails(password string, instance *redis.Instance) managed.ConnectionDetails { cd := managed.ConnectionDetails{} // By default, a master user will be created with the instanceId diff --git a/pkg/controller/redis/redisinstance_test.go b/pkg/controller/redis/redisinstance_test.go index 798e451..70e1634 100644 --- a/pkg/controller/redis/redisinstance_test.go +++ b/pkg/controller/redis/redisinstance_test.go @@ -517,7 +517,7 @@ func TestGetConnectionDetails(t *testing.T) { type args struct { pw string cr *v1alpha1.RedisInstance - i *redis.DBInstance + i *redis.Instance } type want struct { conn managed.ConnectionDetails @@ -530,7 +530,7 @@ func TestGetConnectionDetails(t *testing.T) { "SuccessfulNoPassword": { args: args{ pw: "", - i: &redis.DBInstance{ + i: &redis.Instance{ ID: testId, Endpoint: &v1alpha1.Endpoint{ Address: address, @@ -549,7 +549,7 @@ func TestGetConnectionDetails(t *testing.T) { "SuccessfulNoEndpoint": { args: args{ pw: password, - i: &redis.DBInstance{ + i: &redis.Instance{ ID: testId, }, }, @@ -563,7 +563,7 @@ func TestGetConnectionDetails(t *testing.T) { "Successful": { args: args{ pw: password, - i: &redis.DBInstance{ + i: &redis.Instance{ ID: testId, Endpoint: &v1alpha1.Endpoint{ Address: address, @@ -594,11 +594,11 @@ func TestGetConnectionDetails(t *testing.T) { type fakeRedisClient struct{} -func (c *fakeRedisClient) DescribeDBInstance(id string) (*redis.DBInstance, error) { +func (c *fakeRedisClient) DescribeInstance(id string) (*redis.Instance, error) { if id != testId { return nil, errors.New("DescribeRedisInstance: client doesn't work") } - return &redis.DBInstance{ + return &redis.Instance{ ID: id, Status: v1alpha1.RedisInstanceStateRunning, Endpoint: &v1alpha1.Endpoint{ @@ -608,11 +608,11 @@ func (c *fakeRedisClient) DescribeDBInstance(id string) (*redis.DBInstance, erro }, nil } -func (c *fakeRedisClient) CreateDBInstance(instanceName string, p *v1alpha1.RedisInstanceParameters) (*redis.DBInstance, string, error) { +func (c *fakeRedisClient) CreateInstance(instanceName string, p *v1alpha1.RedisInstanceParameters) (*redis.Instance, string, error) { if instanceName != testName { return nil, "", errors.New("CreateRedisInstance: client doesn't work") } - return &redis.DBInstance{ + return &redis.Instance{ ID: testId, Endpoint: &v1alpha1.Endpoint{ Address: testAddress, @@ -621,14 +621,7 @@ func (c *fakeRedisClient) CreateDBInstance(instanceName string, p *v1alpha1.Redi }, testPassword, nil } -func (c *fakeRedisClient) CreateAccount(id, user, pw string) error { - if id != testId { - return errors.New("CreateAccount: client doesn't work") - } - return nil -} - -func (c *fakeRedisClient) DeleteDBInstance(id string) error { +func (c *fakeRedisClient) DeleteInstance(id string) error { if id != testId { return errors.New("DeleteRedisInstance: client doesn't work") } @@ -649,7 +642,7 @@ func (c *fakeRedisClient) DeleteDBInstance(id string) error { // return "", nil // } -func (c *fakeRedisClient) Update(id string, req *redis.ModifyRedisInstanceRequest) error { +func (c *fakeRedisClient) UpdateInstance(id string, req *redis.ModifyRedisInstanceRequest) error { if id != testId { return errors.New("Update: client doesn't work") } From bf7f08960b525b766ea505c2f050044b068096c9 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Thu, 30 May 2024 16:06:03 -0700 Subject: [PATCH 20/30] make redis instance describe to return instance attribute Signed-off-by: Henry Zeng --- apis/generate.go | 3 +- go.mod | 2 +- ...alibaba.crossplane.io_providerconfigs.yaml | 41 ++-- ...ba.crossplane.io_providerconfigusages.yaml | 14 +- ...se.alibaba.crossplane.io_rdsinstances.yaml | 83 +++++-- ....alibaba.crossplane.io_nasfilesystems.yaml | 53 +++-- ...alibaba.crossplane.io_nasmounttargets.yaml | 56 +++-- .../oss.alibaba.crossplane.io_buckets.yaml | 50 ++-- ....alibaba.crossplane.io_redisinstances.yaml | 224 +++++++++++++----- .../crds/slb.alibaba.crossplane.io_clbs.yaml | 97 ++++++-- ...alibaba.crossplane.io_logstoreindices.yaml | 54 +++-- .../sls.alibaba.crossplane.io_logstores.yaml | 62 +++-- .../sls.alibaba.crossplane.io_logtails.yaml | 56 +++-- ...ba.crossplane.io_machinegroupbindings.yaml | 62 +++-- ...s.alibaba.crossplane.io_machinegroups.yaml | 53 +++-- .../sls.alibaba.crossplane.io_projects.yaml | 59 +++-- pkg/clients/redis/redis.go | 61 ++--- pkg/clients/redis/redis_test.go | 13 +- pkg/controller/redis/redis_instance.go | 27 ++- pkg/controller/redis/redisinstance_test.go | 59 +++-- 20 files changed, 773 insertions(+), 356 deletions(-) diff --git a/apis/generate.go b/apis/generate.go index e020fe9..48b6628 100644 --- a/apis/generate.go +++ b/apis/generate.go @@ -1,3 +1,4 @@ +//go:build generate // +build generate /* @@ -23,7 +24,7 @@ limitations under the License. //go:generate rm -rf ../package/crds // Generate deepcopy methodsets and CRD manifests -//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd:trivialVersions=true,crdVersions=v1 output:artifacts:config=../package/crds +//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd:crdVersions=v1 output:artifacts:config=../package/crds // Generate crossplane-runtime methodsets (resource.Claim, etc) //go:generate go run -tags generate github.com/crossplane/crossplane-tools/cmd/angryjet generate-methodsets --header-file=../hack/boilerplate.go.txt ./... diff --git a/go.mod b/go.mod index ba5dd81..6a2d422 100644 --- a/go.mod +++ b/go.mod @@ -14,6 +14,7 @@ require ( github.com/crossplane/crossplane-tools v0.0.0-20201007233256-88b291e145bb github.com/google/go-cmp v0.5.6 github.com/pkg/errors v0.9.1 + go.uber.org/zap v1.19.1 golang.org/x/net v0.0.0-20210825183410-e898025ed96a gopkg.in/alecthomas/kingpin.v2 v2.2.6 gopkg.in/yaml.v2 v2.4.0 @@ -74,7 +75,6 @@ require ( github.com/tjfoc/gmsm v1.3.2 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.19.1 // indirect golang.org/x/mod v0.4.2 // indirect golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec // indirect diff --git a/package/crds/alibaba.crossplane.io_providerconfigs.yaml b/package/crds/alibaba.crossplane.io_providerconfigs.yaml index 8a51512..dc5f178 100644 --- a/package/crds/alibaba.crossplane.io_providerconfigs.yaml +++ b/package/crds/alibaba.crossplane.io_providerconfigs.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: providerconfigs.alibaba.crossplane.io spec: @@ -31,13 +30,18 @@ spec: name: v1beta1 schema: openAPIV3Schema: - description: A ProviderConfig configures an Alibaba Cloud 'provider', i.e. a connection to a particular cloud account. + description: A ProviderConfig configures an Alibaba Cloud 'provider', i.e. + a connection to a particular cloud account. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -48,7 +52,8 @@ spec: description: Credentials required to authenticate to this provider. properties: env: - description: Env is a reference to an environment variable that contains credentials that must be used to connect to the provider. + description: Env is a reference to an environment variable that + contains credentials that must be used to connect to the provider. properties: name: description: Name is the name of an environment variable. @@ -57,7 +62,8 @@ spec: - name type: object fs: - description: Fs is a reference to a filesystem location that contains credentials that must be used to connect to the provider. + description: Fs is a reference to a filesystem location that contains + credentials that must be used to connect to the provider. properties: path: description: Path is a filesystem path. @@ -66,7 +72,8 @@ spec: - path type: object secretRef: - description: A SecretRef is a reference to a secret key that contains the credentials that must be used to connect to the provider. + description: A SecretRef is a reference to a secret key that contains + the credentials that must be used to connect to the provider. properties: key: description: The key to select. @@ -94,7 +101,8 @@ spec: - source type: object region: - description: Region for managed resources created using this Alibaba Cloud provider, e.g. "cn-hangzhou". + description: Region for managed resources created using this Alibaba + Cloud provider, e.g. "cn-hangzhou". type: string required: - credentials @@ -109,20 +117,25 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. + description: LastTransitionTime is the last time this condition + transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's last transition from one status to another, if any. + description: A Message containing details about this condition's + last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from one status to another. + description: A Reason for this condition's last transition from + one status to another. type: string status: - description: Status of this condition; is it currently True, False, or Unknown? + description: Status of this condition; is it currently True, + False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/package/crds/alibaba.crossplane.io_providerconfigusages.yaml b/package/crds/alibaba.crossplane.io_providerconfigusages.yaml index b3a1e16..755607c 100644 --- a/package/crds/alibaba.crossplane.io_providerconfigusages.yaml +++ b/package/crds/alibaba.crossplane.io_providerconfigusages.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: providerconfigusages.alibaba.crossplane.io spec: @@ -39,10 +38,14 @@ spec: description: A ProviderConfigUsage indicates that a resource is using a ProviderConfig. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -56,7 +59,8 @@ spec: - name type: object resourceRef: - description: ResourceReference to the managed resource using the provider config. + description: ResourceReference to the managed resource using the provider + config. properties: apiVersion: description: APIVersion of the referenced object. diff --git a/package/crds/database.alibaba.crossplane.io_rdsinstances.yaml b/package/crds/database.alibaba.crossplane.io_rdsinstances.yaml index 60629da..5a426aa 100644 --- a/package/crds/database.alibaba.crossplane.io_rdsinstances.yaml +++ b/package/crds/database.alibaba.crossplane.io_rdsinstances.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: rdsinstances.database.alibaba.crossplane.io spec: @@ -45,10 +44,14 @@ spec: description: An RDSInstance is a managed resource that represents an RDS instance. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -56,28 +59,43 @@ spec: description: An RDSInstanceSpec defines the desired state of an RDSInstance. properties: deletionPolicy: - description: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. The "Delete" policy is the default when no policy is specified. + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. enum: - Orphan - Delete type: string forProvider: - description: RDSInstanceParameters define the desired state of an RDS instance. + description: RDSInstanceParameters define the desired state of an + RDS instance. properties: dbInstanceClass: - description: DBInstanceClass is the machine class of the instance, e.g. "rds.pg.s1.small" + description: DBInstanceClass is the machine class of the instance, + e.g. "rds.pg.s1.small" type: string dbInstanceStorageInGB: - description: DBInstanceStorageInGB indicates the size of the storage in GB. Increments by 5GB. For "rds.pg.s1.small", the range is 20-600 (GB). See https://help.aliyun.com/document_detail/26312.html + description: DBInstanceStorageInGB indicates the size of the storage + in GB. Increments by 5GB. For "rds.pg.s1.small", the range is + 20-600 (GB). See https://help.aliyun.com/document_detail/26312.html type: integer engine: - description: Engine is the name of the database engine to be used for this instance. Engine is a required field. + description: Engine is the name of the database engine to be used + for this instance. Engine is a required field. type: string engineVersion: - description: EngineVersion indicates the database engine version. MySQL:5.5/5.6/5.7/8.0 PostgreSQL:9.4/10.0/11.0/12.0 + description: EngineVersion indicates the database engine version. + MySQL:5.5/5.6/5.7/8.0 PostgreSQL:9.4/10.0/11.0/12.0 type: string masterUsername: - description: 'MasterUsername is the name for the master user. MySQL Constraints: * Required for MySQL. * Must be 1 to 16 letters or numbers. * First character must be a letter. * Cannot be a reserved word for the chosen database engine. PostgreSQL Constraints: * Required for PostgreSQL. * Must be 1 to 63 letters or numbers. * First character must be a letter. * Cannot be a reserved word for the chosen database engine.' + description: 'MasterUsername is the name for the master user. + MySQL Constraints: * Required for MySQL. * Must be 1 to 16 letters + or numbers. * First character must be a letter. * Cannot be + a reserved word for the chosen database engine. PostgreSQL Constraints: + * Required for PostgreSQL. * Must be 1 to 63 letters or numbers. + * First character must be a letter. * Cannot be a reserved word + for the chosen database engine.' type: string securityIPList: description: SecurityIPList is the IP whitelist for RDS instances @@ -90,7 +108,11 @@ spec: - securityIPList type: object providerConfigRef: - description: ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. properties: name: description: Name of the referenced object. @@ -99,7 +121,9 @@ spec: - name type: object providerRef: - description: 'ProviderReference specifies the provider that will be used to create, observe, update, and delete this managed resource. Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' properties: name: description: Name of the referenced object. @@ -108,7 +132,11 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. properties: name: description: Name of the secret. @@ -124,19 +152,23 @@ spec: - forProvider type: object status: - description: An RDSInstanceStatus represents the observed state of an RDSInstance. + description: An RDSInstanceStatus represents the observed state of an + RDSInstance. properties: atProvider: - description: RDSInstanceObservation is the representation of the current state that is observed. + description: RDSInstanceObservation is the representation of the current + state that is observed. properties: accountReady: - description: AccountReady specifies whether the initial user account (username + password) is ready + description: AccountReady specifies whether the initial user account + (username + password) is ready type: boolean dbInstanceID: description: DBInstanceID specifies the DB instance ID. type: string dbInstanceStatus: - description: DBInstanceStatus specifies the current state of this database. + description: DBInstanceStatus specifies the current state of this + database. type: string required: - accountReady @@ -148,20 +180,25 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. + description: LastTransitionTime is the last time this condition + transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's last transition from one status to another, if any. + description: A Message containing details about this condition's + last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from one status to another. + description: A Reason for this condition's last transition from + one status to another. type: string status: - description: Status of this condition; is it currently True, False, or Unknown? + description: Status of this condition; is it currently True, + False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/package/crds/nas.alibaba.crossplane.io_nasfilesystems.yaml b/package/crds/nas.alibaba.crossplane.io_nasfilesystems.yaml index 4af21ca..39227d9 100644 --- a/package/crds/nas.alibaba.crossplane.io_nasfilesystems.yaml +++ b/package/crds/nas.alibaba.crossplane.io_nasfilesystems.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: nasfilesystems.nas.alibaba.crossplane.io spec: @@ -38,13 +37,18 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: NASFileSystem is a managed resource that represents an NASFileSystem instance + description: NASFileSystem is a managed resource that represents an NASFileSystem + instance properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -54,7 +58,10 @@ spec: chargeType: type: string deletionPolicy: - description: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. The "Delete" policy is the default when no policy is specified. + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. enum: - Orphan - Delete @@ -64,7 +71,11 @@ spec: protocolType: type: string providerConfigRef: - description: ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. properties: name: description: Name of the referenced object. @@ -73,7 +84,9 @@ spec: - name type: object providerRef: - description: 'ProviderReference specifies the provider that will be used to create, observe, update, and delete this managed resource. Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' properties: name: description: Name of the referenced object. @@ -88,7 +101,11 @@ spec: vpcId: type: string writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. properties: name: description: Name of the secret. @@ -108,7 +125,8 @@ spec: description: NASFileSystemStatus defines the observed state of NASFileSystem properties: atProvider: - description: NASFileSystemObservation is the representation of the current state that is observed. + description: NASFileSystemObservation is the representation of the + current state that is observed. properties: fileSystemID: type: string @@ -121,20 +139,25 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. + description: LastTransitionTime is the last time this condition + transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's last transition from one status to another, if any. + description: A Message containing details about this condition's + last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from one status to another. + description: A Reason for this condition's last transition from + one status to another. type: string status: - description: Status of this condition; is it currently True, False, or Unknown? + description: Status of this condition; is it currently True, + False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/package/crds/nas.alibaba.crossplane.io_nasmounttargets.yaml b/package/crds/nas.alibaba.crossplane.io_nasmounttargets.yaml index 7f0f95a..f81f160 100644 --- a/package/crds/nas.alibaba.crossplane.io_nasmounttargets.yaml +++ b/package/crds/nas.alibaba.crossplane.io_nasmounttargets.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: nasmounttargets.nas.alibaba.crossplane.io spec: @@ -38,13 +37,18 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: NASMountTarget is a managed resource that represents an NASMountTarget instance + description: NASMountTarget is a managed resource that represents an NASMountTarget + instance properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -52,13 +56,17 @@ spec: description: NASMountTargetSpec defines the desired state of NASMountTarget properties: deletionPolicy: - description: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. The "Delete" policy is the default when no policy is specified. + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. enum: - Orphan - Delete type: string forProvider: - description: NASMountTargetParameter is the isolated place to store files + description: NASMountTargetParameter is the isolated place to store + files properties: accessGroupName: type: string @@ -77,7 +85,11 @@ spec: - networkType type: object providerConfigRef: - description: ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. properties: name: description: Name of the referenced object. @@ -86,7 +98,9 @@ spec: - name type: object providerRef: - description: 'ProviderReference specifies the provider that will be used to create, observe, update, and delete this managed resource. Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' properties: name: description: Name of the referenced object. @@ -95,7 +109,11 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. properties: name: description: Name of the secret. @@ -114,7 +132,8 @@ spec: description: NASMountTargetStatus defines the observed state of NASMountTarget properties: atProvider: - description: NASMountTargetObservation is the representation of the current state that is observed. + description: NASMountTargetObservation is the representation of the + current state that is observed. properties: mountTargetDomain: type: string @@ -125,20 +144,25 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. + description: LastTransitionTime is the last time this condition + transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's last transition from one status to another, if any. + description: A Message containing details about this condition's + last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from one status to another. + description: A Reason for this condition's last transition from + one status to another. type: string status: - description: Status of this condition; is it currently True, False, or Unknown? + description: Status of this condition; is it currently True, + False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/package/crds/oss.alibaba.crossplane.io_buckets.yaml b/package/crds/oss.alibaba.crossplane.io_buckets.yaml index 4b45dd2..ee0cf59 100644 --- a/package/crds/oss.alibaba.crossplane.io_buckets.yaml +++ b/package/crds/oss.alibaba.crossplane.io_buckets.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: buckets.oss.alibaba.crossplane.io spec: @@ -39,10 +38,14 @@ spec: description: Bucket is a managed resource that represents an Bucket instance properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -54,7 +57,10 @@ spec: dataRedundancyType: type: string deletionPolicy: - description: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. The "Delete" policy is the default when no policy is specified. + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. enum: - Orphan - Delete @@ -64,7 +70,11 @@ spec: type: object x-kubernetes-preserve-unknown-fields: true providerConfigRef: - description: ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. properties: name: description: Name of the referenced object. @@ -73,7 +83,9 @@ spec: - name type: object providerRef: - description: 'ProviderReference specifies the provider that will be used to create, observe, update, and delete this managed resource. Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' properties: name: description: Name of the referenced object. @@ -84,7 +96,11 @@ spec: storageClass: type: string writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. properties: name: description: Name of the secret. @@ -101,7 +117,8 @@ spec: description: BucketStatus defines the observed state of Bucket properties: atProvider: - description: BucketObservation is the representation of the current state that is observed. + description: BucketObservation is the representation of the current + state that is observed. properties: extranetEndpoint: type: string @@ -116,20 +133,25 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. + description: LastTransitionTime is the last time this condition + transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's last transition from one status to another, if any. + description: A Message containing details about this condition's + last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from one status to another. + description: A Reason for this condition's last transition from + one status to another. type: string status: - description: Status of this condition; is it currently True, False, or Unknown? + description: Status of this condition; is it currently True, + False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml index 1b04286..2310c8c 100644 --- a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml +++ b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: redisinstances.redis.alibaba.crossplane.io spec: @@ -42,13 +41,18 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: RedisInstance is the Schema for the redisinstances API An RedisInstance is a managed resource that represents an Redis instance. + description: RedisInstance is the Schema for the redisinstances API An RedisInstance + is a managed resource that represents an Redis instance. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -56,112 +60,196 @@ spec: description: RedisInstanceSpec defines the desired state of RedisInstance properties: deletionPolicy: - description: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. The "Delete" policy is the default when no policy is specified. + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. enum: - Orphan - Delete type: string forProvider: - description: RedisInstanceParameters define the desired state of an Redis instance. Detailed information can be found in https://www.alibabacloud.com/help/en/redis/developer-reference/api-r-kvstore-2015-01-01-createinstance-redis + description: RedisInstanceParameters define the desired state of an + Redis instance. Detailed information can be found in https://www.alibabacloud.com/help/en/redis/developer-reference/api-r-kvstore-2015-01-01-createinstance-redis properties: appendonly: - description: "Specifies whether to enable append-only file (AOF) persistence for the instance. Valid values: \t\tyes (default): enables AOF persistence \t\tno: disables AOF persistence Description: \t\tThis parameter is applicable to classic instances, and is unavailable for cloud-native instances." + description: 'Specifies whether to enable append-only file (AOF) + persistence for the instance. Valid values: yes (default): enables + AOF persistence no: disables AOF persistence Description: This + parameter is applicable to classic instances, and is unavailable + for cloud-native instances.' type: string autoRenew: - description: "Specifies whether to enable auto-renewal for the instance. Default value: \t\tfalse \tValid values: \t\ttrue: enables auto-renewal \t\tfalse: disables auto-renewal" + description: 'Specifies whether to enable auto-renewal for the + instance. Default value: false Valid values: true: enables auto-renewal + false: disables auto-renewal' type: string autoRenewPeriod: - description: "The subscription duration that is supported by auto-renewal. Unit: months. Valid values: \t\t1, 2, 3, 6, and 12 Note: \t\tThis parameter is required only if the AutoRenew parameter is set to true." + description: 'The subscription duration that is supported by auto-renewal. + Unit: months. Valid values: 1, 2, 3, 6, and 12 Note: This parameter + is required only if the AutoRenew parameter is set to true.' type: string autoUseCoupon: - description: "Specifies whether to use a coupon. Default value: \t\tfalse Valid values: \t\ttrue: uses a coupon \t\tfalse: does not use a coupon" + description: 'Specifies whether to use a coupon. Default value: + false Valid values: true: uses a coupon false: does not use + a coupon' type: string backupId: - description: "The ID of the backup file of the original instance. If you want to create an instance based on a backup file of a specified instance, you can specify this parameter after you specify the SrcDBInstanceId parameter. Then, the system creates an instance based on the backup file that is specified by this parameter. Note: \t\tAfter you specify the SrcDBInstanceId parameter, \t\tyou must use the BackupId or RestoreTime parameter to specify the backup file." + description: 'The ID of the backup file of the original instance. + If you want to create an instance based on a backup file of + a specified instance, you can specify this parameter after you + specify the SrcDBInstanceId parameter. Then, the system creates + an instance based on the backup file that is specified by this + parameter. Note: After you specify the SrcDBInstanceId parameter, + you must use the BackupId or RestoreTime parameter to specify + the backup file.' type: string businessInfo: description: The ID of the promotional event or business information. type: string capacity: - description: 'The storage capacity of the instance. Unit: MB. Note: You must specify at least one of the Capacity and InstanceClass parameters when you call this operation.' + description: 'The storage capacity of the instance. Unit: MB. + Note: You must specify at least one of the Capacity and InstanceClass + parameters when you call this operation.' type: integer chargeType: - description: "ChargeType is indicates payment type Default value: PrePaid. Valid values: \t\tPrePaid: subscription \t\tPostPaid: pay-as-you-go" + description: 'ChargeType is indicates payment type Default value: + PrePaid. Valid values: PrePaid: subscription PostPaid: pay-as-you-go' type: string clusterBackupId: description: The backup set ID. type: string connectionStringPrefix: - description: The operation that you want to perform. Set the value to AllocateInstancePublicConnection. + description: The operation that you want to perform. Set the value + to AllocateInstancePublicConnection. type: string couponNo: - description: "The coupon code. Default value: \t\tdefault." + description: 'The coupon code. Default value: default.' type: string dedicatedHostGroupId: - description: The ID of the dedicated cluster. This parameter is required if you create an instance in a dedicated cluster. + description: The ID of the dedicated cluster. This parameter is + required if you create an instance in a dedicated cluster. type: string engineVersion: - description: "The database engine version of the instance. Valid values: \t\t4.0 \t\t5.0 \t\t6.0 \t\t7.0" + description: 'The database engine version of the instance. Valid + values: 4.0 5.0 6.0 7.0' type: string globalInstance: - description: "Specifies whether to use the new instance as the first child instance of the distributed instance. Default value: \t\tfalse Valid values: \t\ttrue: uses the new instance as the first child instance \t\tfalse: does not use the new instance as the first child instance If you want to create an ApsaraDB for Redis Enhanced Edition (Tair) DRAM-based instance that runs Redis 5.0, you must set this parameter to true. This parameter is available only on the China site (aliyun.com)." + description: 'Specifies whether to use the new instance as the + first child instance of the distributed instance. Default value: + false Valid values: true: uses the new instance as the first + child instance false: does not use the new instance as the first + child instance If you want to create an ApsaraDB for Redis Enhanced + Edition (Tair) DRAM-based instance that runs Redis 5.0, you + must set this parameter to true. This parameter is available + only on the China site (aliyun.com).' type: boolean globalInstanceId: - description: The ID of the distributed instance. This parameter is available only on the China site (aliyun.com). + description: The ID of the distributed instance. This parameter + is available only on the China site (aliyun.com). type: string globalSecurityGroupIds: - description: The global IP whitelist template for the instance. Multiple IP whitelist templates should be separated by English commas (,) and cannot be duplicated. + description: The global IP whitelist template for the instance. + Multiple IP whitelist templates should be separated by English + commas (,) and cannot be duplicated. type: string instanceClass: - description: The instance type. For example, redis.master.small.default indicates a Community Edition standard master-replica instance that has 1 GB of memory. For more information, see https://www.alibabacloud.com/help/en/redis/product-overview/overview-4. + description: The instance type. For example, redis.master.small.default + indicates a Community Edition standard master-replica instance + that has 1 GB of memory. For more information, see https://www.alibabacloud.com/help/en/redis/product-overview/overview-4. type: string instanceName: - description: 'The name of the instance. The name must be 2 to 80 characters in length and must start with a letter. It cannot contain spaces or specific special characters. These special characters include @ / : = " < > { [ ] }' + description: 'The name of the instance. The name must be 2 to + 80 characters in length and must start with a letter. It cannot + contain spaces or specific special characters. These special + characters include @ / : = " < > { [ ] }' type: string instanceType: - description: "The category of the instance. \tDefault value: \t\tRedis \tValid values: \t\tRedis \t\tMemcache" + description: 'The category of the instance. Default value: Redis + Valid values: Redis Memcache' type: string networkType: - description: "The network type of the instance. Default value: \t\tVPC Valid values: \t\tVPC" + description: 'The network type of the instance. Default value: + VPC Valid values: VPC' type: string nodeType: - description: "The node type. Valid values: \t\tMASTER_SLAVE: high availability (master-replica) \t\tSTAND_ALONE: standalone \t\tdouble: master-replica \t\tsingle: standalone Note: To create a cloud-native instance, set this parameter to MASTER_SLAVE or STAND_ALONE. To create a classic instance, set this parameter to double or single." + description: 'The node type. Valid values: MASTER_SLAVE: high + availability (master-replica) STAND_ALONE: standalone double: + master-replica single: standalone Note: To create a cloud-native + instance, set this parameter to MASTER_SLAVE or STAND_ALONE. + To create a classic instance, set this parameter to double or + single.' type: string paramGroupId: - description: The parameter template ID, which must be globally unique. + description: The parameter template ID, which must be globally + unique. type: string password: - description: 'The password that is used to connect to the instance. The password must be 8 to 32 characters in length and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and specific special characters. These special characters include ! @ # $ % ^ & * ( ) _ + - =' + description: 'The password that is used to connect to the instance. + The password must be 8 to 32 characters in length and must contain + at least three of the following character types: uppercase letters, + lowercase letters, digits, and specific special characters. + These special characters include ! @ # $ % ^ & * ( ) _ + - =' type: string period: - description: "The subscription duration. Valid values: \t\t1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24,36, and 60. Unit: \t\tmonths. Note: This parameter is available and required only if the ChargeType parameter is set to PrePaid." + description: 'The subscription duration. Valid values: 1, 2, 3, + 4, 5, 6, 7, 8, 9, 12, 24,36, and 60. Unit: months. Note: This + parameter is available and required only if the ChargeType parameter + is set to PrePaid.' type: string port: - description: "Port is indicates the database service port Valid values: \t\t1024 to 65535 Default value: \t\t6379" + description: 'Port is indicates the database service port Valid + values: 1024 to 65535 Default value: 6379' type: integer privateIpAddress: - description: "The private IP address of the instance. Note: \t\tThe private IP address must be available within the CIDR block \t\tof the vSwitch to which to connect the instance." + description: 'The private IP address of the instance. Note: The + private IP address must be available within the CIDR block of + the vSwitch to which to connect the instance.' type: string readOnlyCount: - description: "The number of read-only nodes in the instance. This parameter is available only if you create a read/write splitting instance that uses cloud disks. Valid values: \t\t1 to 5" + description: 'The number of read-only nodes in the instance. This + parameter is available only if you create a read/write splitting + instance that uses cloud disks. Valid values: 1 to 5' type: integer regionId: - description: The ID of the region where you want to create the instance. + description: The ID of the region where you want to create the + instance. type: string resourceGroupId: description: The ID of the resource group. type: string restoreTime: - description: "The point in time at which the specified original instance is backed up. The point in time must be within the retention period of backup files of the original instance. If you want to create an instance based on a backup file of a specified instance, you can set this parameter to specify a point in time after you set the SrcDBInstanceId parameter. Then, the system creates an instance based on the backup file that was created at the specified point in time for the original instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Note: \t\tAfter you specify the SrcDBInstanceId parameter, you must use the BackupId or \t\tRestoreTime parameter to specify the backup file." + description: 'The point in time at which the specified original + instance is backed up. The point in time must be within the + retention period of backup files of the original instance. If + you want to create an instance based on a backup file of a specified + instance, you can set this parameter to specify a point in time + after you set the SrcDBInstanceId parameter. Then, the system + creates an instance based on the backup file that was created + at the specified point in time for the original instance. Specify + the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ + format. The time must be in UTC. Note: After you specify the + SrcDBInstanceId parameter, you must use the BackupId or RestoreTime + parameter to specify the backup file.' type: string secondaryZoneId: - description: "The secondary zone ID of the instance. The master node and replica node of the instance can be deployed in different zones and disaster recovery is implemented across zones. Note: \t\tIf you specify this parameter, the master node and replica node of the instance can be \t\tdeployed in different zones and disaster recovery is implemented across zones. \t\tThe instance can withstand failures in data centers." + description: 'The secondary zone ID of the instance. The master + node and replica node of the instance can be deployed in different + zones and disaster recovery is implemented across zones. Note: + If you specify this parameter, the master node and replica node + of the instance can be deployed in different zones and disaster + recovery is implemented across zones. The instance can withstand + failures in data centers.' type: string shardCount: - description: The number of data shards. This parameter is available only if you create a cluster instance that uses cloud disks. + description: The number of data shards. This parameter is available + only if you create a cluster instance that uses cloud disks. type: integer srcDBInstanceId: - description: The ID of the original instance. If you want to create an instance based on a backup file of a specified instance, you can specify this parameter and use the BackupId or RestoreTime parameter to specify the backup file. + description: The ID of the original instance. If you want to create + an instance based on a backup file of a specified instance, + you can specify this parameter and use the BackupId or RestoreTime + parameter to specify the backup file. type: string tag: description: The tags of the instance. @@ -179,10 +267,15 @@ spec: type: object type: array token: - description: The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the token is unique among different requests. The token is case-sensitive. The token can contain only ASCII characters and cannot exceed 64 characters in length. + description: The client token that is used to ensure the idempotence + of the request. You can use the client to generate the value, + but you must make sure that the token is unique among different + requests. The token is case-sensitive. The token can contain + only ASCII characters and cannot exceed 64 characters in length. type: string vSwitchId: - description: The ID of the vSwitch to which you want the instance to connect. + description: The ID of the vSwitch to which you want the instance + to connect. type: string vpcId: description: The ID of the virtual private cloud (VPC). @@ -192,7 +285,11 @@ spec: type: string type: object providerConfigRef: - description: ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. properties: name: description: Name of the referenced object. @@ -201,7 +298,9 @@ spec: - name type: object providerRef: - description: 'ProviderReference specifies the provider that will be used to create, observe, update, and delete this managed resource. Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' properties: name: description: Name of the referenced object. @@ -210,7 +309,11 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. properties: name: description: Name of the secret. @@ -229,29 +332,31 @@ spec: description: RedisInstanceStatus defines the observed state of RedisInstance properties: atProvider: - description: RedisInstanceObservation is the representation of the current state that is observed. + description: RedisInstanceObservation is the representation of the + current state that is observed. properties: - accountReady: - description: AccountReady specifies whether the initial user account (username + password) is ready - type: boolean connectionReady: - description: ConnectionReady specifies whether the network connect is ready + description: ConnectionReady specifies whether the network connect + is ready type: boolean dbInstanceStatus: - description: DBInstanceStatus specifies the current state of this database. + description: DBInstanceStatus specifies the current state of this + database. type: string endpoint: - description: Endpoint contains address and port used to connect with the Redis instance + description: Endpoint contains address and port used to connect + with the Redis instance properties: address: - description: Address specifies the DNS address of the Redis instance. + description: Address specifies the DNS address of the Redis + instance. type: string port: - description: Port specifies the port that the database engine is listening on. + description: Port specifies the port that the database engine + is listening on. type: string type: object required: - - accountReady - connectionReady - endpoint type: object @@ -261,20 +366,25 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. + description: LastTransitionTime is the last time this condition + transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's last transition from one status to another, if any. + description: A Message containing details about this condition's + last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from one status to another. + description: A Reason for this condition's last transition from + one status to another. type: string status: - description: Status of this condition; is it currently True, False, or Unknown? + description: Status of this condition; is it currently True, + False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/package/crds/slb.alibaba.crossplane.io_clbs.yaml b/package/crds/slb.alibaba.crossplane.io_clbs.yaml index 4456cde..94cdf45 100644 --- a/package/crds/slb.alibaba.crossplane.io_clbs.yaml +++ b/package/crds/slb.alibaba.crossplane.io_clbs.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: clbs.slb.alibaba.crossplane.io spec: @@ -38,10 +37,14 @@ spec: description: CLB is a managed resource that represents an CLB instance properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -49,7 +52,10 @@ spec: description: CLBSpec defines the desired state of CLB properties: deletionPolicy: - description: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. The "Delete" policy is the default when no policy is specified. + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. enum: - Orphan - Delete @@ -63,16 +69,34 @@ spec: addressIPVersion: type: string addressType: - description: 'AddressType is the type of IP address that the SLB instance uses to provide services. Valid values: internet: After an Internet-facing SLB instance is created, the system assigns a public IP address to the SLB instance. Then, the SLB instance can forward requests from the Internet. intranet: After an internal-facing SLB instance is created, the system assigns a private IP address to the SLB instance. Then, the SLB instance can forward only internal requests.' + description: 'AddressType is the type of IP address that the SLB + instance uses to provide services. Valid values: internet: After + an Internet-facing SLB instance is created, the system assigns + a public IP address to the SLB instance. Then, the SLB instance + can forward requests from the Internet. intranet: After an internal-facing + SLB instance is created, the system assigns a private IP address + to the SLB instance. Then, the SLB instance can forward only + internal requests.' type: string autoPay: type: boolean bandwidth: - description: 'Bandwidth is the maximum bandwidth value of the listener. Unit: Mbit/s. Valid values: -1 and 1 to 5120. -1: For a pay-by-data-transfer Internet-facing SLB instance, you can set the value to -1. This indicates that the bandwidth is unlimited. 1 to 5120: For a pay-by-bandwidth Internet-facing SLB instance, you can specify a bandwidth cap for each listener. The sum of bandwidth limit values of all listeners cannot exceed the maximum bandwidth value of the SLB instance.' + description: 'Bandwidth is the maximum bandwidth value of the + listener. Unit: Mbit/s. Valid values: -1 and 1 to 5120. -1: + For a pay-by-data-transfer Internet-facing SLB instance, you + can set the value to -1. This indicates that the bandwidth is + unlimited. 1 to 5120: For a pay-by-bandwidth Internet-facing + SLB instance, you can specify a bandwidth cap for each listener. + The sum of bandwidth limit values of all listeners cannot exceed + the maximum bandwidth value of the SLB instance.' format: int32 type: integer clientToken: - description: ClientToken that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. + description: ClientToken that is used to ensure the idempotence + of the request. You can use the client to generate the value, + but you must ensure that it is unique among different requests. + The token can contain only ASCII characters and cannot exceed + 64 characters in length. type: string deleteProtection: type: string @@ -81,10 +105,14 @@ spec: type: integer internetChargeType: default: paybytraffic - description: 'InternetChargeType is the metering method of the Internet-facing SLB instance. Valid values: paybytraffic (default): pay-by-data-transfer' + description: 'InternetChargeType is the metering method of the + Internet-facing SLB instance. Valid values: paybytraffic (default): + pay-by-data-transfer' type: string loadBalancerSpec: - description: LoadBalancerSpec is the specification of the SLB instance. The types of SLB instance that you can create vary by region. + description: LoadBalancerSpec is the specification of the SLB + instance. The types of SLB instance that you can create vary + by region. enum: - slb.s1.small - slb.s2.small @@ -109,7 +137,8 @@ spec: pricingCycle: type: string region: - description: Region is the ID of the region where you want to create the SLB instance. + description: Region is the ID of the region where you want to + create the SLB instance. type: string resourceGroupId: type: string @@ -121,16 +150,25 @@ spec: slaveZoneId: type: string vSwitchId: - description: VSwitchID is the ID of the vSwitch to which the SLB instance is attached. To create an SLB instance that is deployed in a VPC, you must set this parameter. If you specify this parameter, the value of the AddressType parameter is set to intranet by default. + description: VSwitchID is the ID of the vSwitch to which the SLB + instance is attached. To create an SLB instance that is deployed + in a VPC, you must set this parameter. If you specify this parameter, + the value of the AddressType parameter is set to intranet by + default. type: string vpcId: - description: VpcID is the ID of the virtual private cloud (VPC) to which the SLB instance belongs. + description: VpcID is the ID of the virtual private cloud (VPC) + to which the SLB instance belongs. type: string required: - region type: object providerConfigRef: - description: ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. properties: name: description: Name of the referenced object. @@ -139,7 +177,9 @@ spec: - name type: object providerRef: - description: 'ProviderReference specifies the provider that will be used to create, observe, update, and delete this managed resource. Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' properties: name: description: Name of the referenced object. @@ -148,7 +188,11 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. properties: name: description: Name of the secret. @@ -167,7 +211,8 @@ spec: description: CLBStatus defines the observed state of CLB properties: atProvider: - description: CLBObservation is the representation of the current state that is observed. + description: CLBObservation is the representation of the current state + that is observed. properties: CreateTime: type: string @@ -186,7 +231,8 @@ spec: ResourceGroupId: type: string address: - description: Though `Address` is one of the Parameter, but if the parameter it's not set, it still can be generated. + description: Though `Address` is one of the Parameter, but if + the parameter it's not set, it still can be generated. type: string loadBalancerID: type: string @@ -197,20 +243,25 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. + description: LastTransitionTime is the last time this condition + transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's last transition from one status to another, if any. + description: A Message containing details about this condition's + last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from one status to another. + description: A Reason for this condition's last transition from + one status to another. type: string status: - description: Status of this condition; is it currently True, False, or Unknown? + description: Status of this condition; is it currently True, + False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/package/crds/sls.alibaba.crossplane.io_logstoreindices.yaml b/package/crds/sls.alibaba.crossplane.io_logstoreindices.yaml index 9b4a648..d2d3d96 100644 --- a/package/crds/sls.alibaba.crossplane.io_logstoreindices.yaml +++ b/package/crds/sls.alibaba.crossplane.io_logstoreindices.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: logstoreindices.sls.alibaba.crossplane.io spec: @@ -38,10 +37,14 @@ spec: description: LogstoreIndex is the Schema for the SLS LogstoreIndex API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -49,7 +52,10 @@ spec: description: LogstoreIndexSpec defines the desired state of SLS LogstoreIndex properties: deletionPolicy: - description: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. The "Delete" policy is the default when no policy is specified. + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. enum: - Orphan - Delete @@ -59,7 +65,9 @@ spec: properties: keys: additionalProperties: - description: IndexKey is the index by key. Copied most of these fields from sdk.IndexKey and leave out the field `JsonKeys` which is not supported per SLS developer + description: IndexKey is the index by key. Copied most of these + fields from sdk.IndexKey and leave out the field `JsonKeys` + which is not supported per SLS developer properties: alias: type: string @@ -91,7 +99,11 @@ spec: - projectName type: object providerConfigRef: - description: ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. properties: name: description: Name of the referenced object. @@ -100,7 +112,9 @@ spec: - name type: object providerRef: - description: 'ProviderReference specifies the provider that will be used to create, observe, update, and delete this managed resource. Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' properties: name: description: Name of the referenced object. @@ -109,7 +123,11 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. properties: name: description: Name of the secret. @@ -128,7 +146,8 @@ spec: description: LogstoreIndexStatus defines the observed state of SLS LogstoreIndex properties: atProvider: - description: LogstoreIndexObservation is the representation of the current state that is observed. + description: LogstoreIndexObservation is the representation of the + current state that is observed. type: object conditions: description: Conditions of the resource. @@ -136,20 +155,25 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. + description: LastTransitionTime is the last time this condition + transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's last transition from one status to another, if any. + description: A Message containing details about this condition's + last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from one status to another. + description: A Reason for this condition's last transition from + one status to another. type: string status: - description: Status of this condition; is it currently True, False, or Unknown? + description: Status of this condition; is it currently True, + False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/package/crds/sls.alibaba.crossplane.io_logstores.yaml b/package/crds/sls.alibaba.crossplane.io_logstores.yaml index 7610a70..eedad5a 100644 --- a/package/crds/sls.alibaba.crossplane.io_logstores.yaml +++ b/package/crds/sls.alibaba.crossplane.io_logstores.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: logstores.sls.alibaba.crossplane.io spec: @@ -36,10 +35,14 @@ spec: description: LogStore is the Schema for the SLS Stores API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -47,17 +50,22 @@ spec: description: LogStoreSpec defines the desired state of SLS LogStore properties: deletionPolicy: - description: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. The "Delete" policy is the default when no policy is specified. + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. enum: - Orphan - Delete type: string forProvider: - description: ForProvider field is where use set parameters for SLS LogStore + description: ForProvider field is where use set parameters for SLS + LogStore properties: autoSplit: default: false - description: 'Specifies whether to enable automatic sharding. Default value: false.' + description: 'Specifies whether to enable automatic sharding. + Default value: false.' type: boolean maxSplitShard: description: The maximum number of shards for automatic sharding. @@ -73,7 +81,8 @@ spec: minimum: 1 type: integer ttl: - description: 'The data retention period. Unit: days. If you set the value to 3650, the data is permanently stored' + description: 'The data retention period. Unit: days. If you set + the value to 3650, the data is permanently stored' maximum: 3650 minimum: 1 type: integer @@ -83,7 +92,11 @@ spec: - ttl type: object providerConfigRef: - description: ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. properties: name: description: Name of the referenced object. @@ -92,7 +105,9 @@ spec: - name type: object providerRef: - description: 'ProviderReference specifies the provider that will be used to create, observe, update, and delete this managed resource. Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' properties: name: description: Name of the referenced object. @@ -101,7 +116,11 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. properties: name: description: Name of the secret. @@ -120,14 +139,16 @@ spec: description: LogStoreStatus defines the observed state of SLS LogStore properties: atProvider: - description: StoreObservation is the representation of the current state that is observed. + description: StoreObservation is the representation of the current + state that is observed. properties: createTime: description: CreateTime is the time when the store was created format: int32 type: integer lastModifyTime: - description: LastModifyTime is the time when the store was last modified + description: LastModifyTime is the time when the store was last + modified format: int32 type: integer required: @@ -140,20 +161,25 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. + description: LastTransitionTime is the last time this condition + transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's last transition from one status to another, if any. + description: A Message containing details about this condition's + last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from one status to another. + description: A Reason for this condition's last transition from + one status to another. type: string status: - description: Status of this condition; is it currently True, False, or Unknown? + description: Status of this condition; is it currently True, + False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/package/crds/sls.alibaba.crossplane.io_logtails.yaml b/package/crds/sls.alibaba.crossplane.io_logtails.yaml index b4a6a2d..310ee80 100644 --- a/package/crds/sls.alibaba.crossplane.io_logtails.yaml +++ b/package/crds/sls.alibaba.crossplane.io_logtails.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: logtails.sls.alibaba.crossplane.io spec: @@ -38,10 +37,14 @@ spec: description: Logtail is the Schema for the SLS Logtail API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -49,7 +52,10 @@ spec: description: LogtailSpec defines the desired state of SLS Logtail properties: deletionPolicy: - description: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. The "Delete" policy is the default when no policy is specified. + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. enum: - Orphan - Delete @@ -58,7 +64,8 @@ spec: description: ForProvider field is SLS Logtail parameters properties: inputDetail: - description: InputDetail defines all file input detail's basic config + description: InputDetail defines all file input detail's basic + config properties: delaySkipBytes: type: integer @@ -149,7 +156,11 @@ spec: - outputType type: object providerConfigRef: - description: ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. properties: name: description: Name of the referenced object. @@ -158,7 +169,9 @@ spec: - name type: object providerRef: - description: 'ProviderReference specifies the provider that will be used to create, observe, update, and delete this managed resource. Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' properties: name: description: Name of the referenced object. @@ -167,7 +180,11 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. properties: name: description: Name of the secret. @@ -186,14 +203,16 @@ spec: description: LogtailStatus defines the observed state of SLS Logtail properties: atProvider: - description: LogtailObservation is the representation of the current state that is observed. + description: LogtailObservation is the representation of the current + state that is observed. properties: createTime: description: CreateTime is the time the resource was created format: int32 type: integer lastModifyTime: - description: LastModifyTime is the time when the resource was last modified + description: LastModifyTime is the time when the resource was + last modified format: int32 type: integer required: @@ -206,20 +225,25 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. + description: LastTransitionTime is the last time this condition + transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's last transition from one status to another, if any. + description: A Message containing details about this condition's + last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from one status to another. + description: A Reason for this condition's last transition from + one status to another. type: string status: - description: Status of this condition; is it currently True, False, or Unknown? + description: Status of this condition; is it currently True, + False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/package/crds/sls.alibaba.crossplane.io_machinegroupbindings.yaml b/package/crds/sls.alibaba.crossplane.io_machinegroupbindings.yaml index 135ed1f..b7c0694 100644 --- a/package/crds/sls.alibaba.crossplane.io_machinegroupbindings.yaml +++ b/package/crds/sls.alibaba.crossplane.io_machinegroupbindings.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: machinegroupbindings.sls.alibaba.crossplane.io spec: @@ -33,27 +32,37 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: MachineGroupBinding is the Schema for the SLS MachineGroupBindings API + description: MachineGroupBinding is the Schema for the SLS MachineGroupBindings + API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object spec: - description: MachineGroupBindingSpec defines the desired state of SLS MachineGroupBinding + description: MachineGroupBindingSpec defines the desired state of SLS + MachineGroupBinding properties: deletionPolicy: - description: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. The "Delete" policy is the default when no policy is specified. + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. enum: - Orphan - Delete type: string forProvider: - description: ForProvider field is where use set parameters for SLS MachineGroupBinding + description: ForProvider field is where use set parameters for SLS + MachineGroupBinding properties: configName: type: string @@ -70,7 +79,11 @@ spec: - projectName type: object providerConfigRef: - description: ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. properties: name: description: Name of the referenced object. @@ -79,7 +92,9 @@ spec: - name type: object providerRef: - description: 'ProviderReference specifies the provider that will be used to create, observe, update, and delete this managed resource. Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' properties: name: description: Name of the referenced object. @@ -88,7 +103,11 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. properties: name: description: Name of the secret. @@ -104,10 +123,12 @@ spec: - forProvider type: object status: - description: MachineGroupBindingStatus defines the observed state of SLS MachineGroupBinding + description: MachineGroupBindingStatus defines the observed state of SLS + MachineGroupBinding properties: atProvider: - description: MachineGroupBindingObservation is the representation of the current state that is observed. + description: MachineGroupBindingObservation is the representation + of the current state that is observed. properties: configs: items: @@ -122,20 +143,25 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. + description: LastTransitionTime is the last time this condition + transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's last transition from one status to another, if any. + description: A Message containing details about this condition's + last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from one status to another. + description: A Reason for this condition's last transition from + one status to another. type: string status: - description: Status of this condition; is it currently True, False, or Unknown? + description: Status of this condition; is it currently True, + False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/package/crds/sls.alibaba.crossplane.io_machinegroups.yaml b/package/crds/sls.alibaba.crossplane.io_machinegroups.yaml index d75598b..6d550ed 100644 --- a/package/crds/sls.alibaba.crossplane.io_machinegroups.yaml +++ b/package/crds/sls.alibaba.crossplane.io_machinegroups.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: machinegroups.sls.alibaba.crossplane.io spec: @@ -38,10 +37,14 @@ spec: description: MachineGroup is the Schema for the SLS MachineGroup API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -49,7 +52,10 @@ spec: description: MachineGroupSpec defines the desired state of SLS MachineGroup properties: deletionPolicy: - description: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. The "Delete" policy is the default when no policy is specified. + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. enum: - Orphan - Delete @@ -88,7 +94,11 @@ spec: - project type: object providerConfigRef: - description: ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. properties: name: description: Name of the referenced object. @@ -97,7 +107,9 @@ spec: - name type: object providerRef: - description: 'ProviderReference specifies the provider that will be used to create, observe, update, and delete this managed resource. Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' properties: name: description: Name of the referenced object. @@ -106,7 +118,11 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. properties: name: description: Name of the secret. @@ -125,14 +141,16 @@ spec: description: MachineGroupStatus defines the observed state of SLS MachineGroup properties: atProvider: - description: MachineGroupObservation is the representation of the current state that is observed. + description: MachineGroupObservation is the representation of the + current state that is observed. properties: createTime: description: CreateTime is the time the resource was created format: int32 type: integer lastModifyTime: - description: LastModifyTime is the time when the resource was last modified + description: LastModifyTime is the time when the resource was + last modified format: int32 type: integer required: @@ -145,20 +163,25 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. + description: LastTransitionTime is the last time this condition + transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's last transition from one status to another, if any. + description: A Message containing details about this condition's + last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from one status to another. + description: A Reason for this condition's last transition from + one status to another. type: string status: - description: Status of this condition; is it currently True, False, or Unknown? + description: Status of this condition; is it currently True, + False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/package/crds/sls.alibaba.crossplane.io_projects.yaml b/package/crds/sls.alibaba.crossplane.io_projects.yaml index 45a361d..040bc4b 100644 --- a/package/crds/sls.alibaba.crossplane.io_projects.yaml +++ b/package/crds/sls.alibaba.crossplane.io_projects.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: projects.sls.alibaba.crossplane.io spec: @@ -36,10 +35,14 @@ spec: description: Project is the Schema for the SLS Projects API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -47,13 +50,17 @@ spec: description: ProjectSpec defines the desired state of SLS Project properties: deletionPolicy: - description: DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" or "Orphan" the external resource. The "Delete" policy is the default when no policy is specified. + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. enum: - Orphan - Delete type: string forProvider: - description: ForProvider field is where use set parameters for SLS project + description: ForProvider field is where use set parameters for SLS + project properties: description: type: string @@ -61,7 +68,11 @@ spec: - description type: object providerConfigRef: - description: ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. properties: name: description: Name of the referenced object. @@ -70,7 +81,9 @@ spec: - name type: object providerRef: - description: 'ProviderReference specifies the provider that will be used to create, observe, update, and delete this managed resource. Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' properties: name: description: Name of the referenced object. @@ -79,7 +92,11 @@ spec: - name type: object writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. properties: name: description: Name of the secret. @@ -98,16 +115,19 @@ spec: description: ProjectStatus defines the observed state of SLS Project properties: atProvider: - description: ProjectObservation is the representation of the current state that is observed. + description: ProjectObservation is the representation of the current + state that is observed. properties: createTime: description: CreateTime is the time when the project was created type: string lastModifyTime: - description: LastModifyTime is the time when the project was last modified + description: LastModifyTime is the time when the project was last + modified type: string owner: - description: Owner is the ID of the Alibaba Cloud account that was used to create the project + description: Owner is the ID of the Alibaba Cloud account that + was used to create the project type: string region: description: Region is the region to which the project belongs @@ -128,20 +148,25 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. + description: LastTransitionTime is the last time this condition + transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's last transition from one status to another, if any. + description: A Message containing details about this condition's + last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from one status to another. + description: A Reason for this condition's last transition from + one status to another. type: string status: - description: Status of this condition; is it currently True, False, or Unknown? + description: Status of this condition; is it currently True, + False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index 4496ded..5c8a909 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -31,11 +31,6 @@ import ( "github.com/crossplane-contrib/provider-alibaba/apis/redis/v1alpha1" ) -var ( -// ErrDBInstanceNotFound indicates DBInstance not found -// ErrDBInstanceNotFound = errors.New("DBInstanceNotFound") -) - const ( // HTTPSScheme indicates request scheme HTTPSScheme = "https" @@ -57,8 +52,8 @@ type CleanedServerError struct { // Client defines Redis client operations type Client interface { - DescribeInstance(id string) (*Instance, error) - CreateInstance(name string, parameters *v1alpha1.RedisInstanceParameters) (*Instance, string, error) + DescribeInstance(id string) (*aliredis.DBInstanceAttribute, error) + CreateInstance(name string, parameters *v1alpha1.RedisInstanceParameters) (*CreateInstanceResponse, error) DeleteInstance(id string) error // AllocateInstancePublicConnection(id string, port int) (string, error) // ModifyDBInstanceConnectionString(id string, port int) (string, error) @@ -66,12 +61,12 @@ type Client interface { } // DBInstance defines the instance information -type Instance struct { +type CreateInstanceResponse struct { // Instance ID - ID string + Id string - // Instance status - Status string + // Default password for the admin user + Password string // Endpoint specifies the connection endpoint. Endpoint *v1alpha1.Endpoint @@ -96,33 +91,26 @@ func NewClient(ctx context.Context, accessKeyID, accessKeySecret, region string) return c, nil } -func (c *client) DescribeInstance(id string) (*Instance, error) { - request := aliredis.CreateDescribeInstancesRequest() +func (c *client) DescribeInstance(id string) (*aliredis.DBInstanceAttribute, error) { + request := aliredis.CreateDescribeInstanceAttributeRequest() request.Scheme = HTTPSScheme - request.InstanceIds = id + request.InstanceId = id - response, err := c.redisCli.DescribeInstances(request) + response, err := c.redisCli.DescribeInstanceAttribute(request) if err != nil { return nil, errors.Wrap(CleanError(err), errDescribeInstanceFailed) } - if len(response.Instances.KVStoreInstance) == 0 { + if len(response.Instances.DBInstanceAttribute) == 0 { return nil, errors.New(errInstanceNotFound) } - rsp := response.Instances.KVStoreInstance[0] - in := &Instance{ - ID: rsp.InstanceId, - Status: rsp.InstanceStatus, - Endpoint: &v1alpha1.Endpoint{ - Address: rsp.ConnectionDomain, - Port: strconv.FormatInt(rsp.Port, 10), - }, - } - return in, nil + attr := response.Instances.DBInstanceAttribute[0] + + return &attr, nil } -func (c *client) CreateInstance(externalName string, p *v1alpha1.RedisInstanceParameters) (*Instance, string, error) { +func (c *client) CreateInstance(externalName string, p *v1alpha1.RedisInstanceParameters) (*CreateInstanceResponse, error) { request := aliredis.CreateCreateInstanceRequest() // Seems regionID will be by default from the first part ZoneID @@ -181,7 +169,7 @@ func (c *client) CreateInstance(externalName string, p *v1alpha1.RedisInstancePa if p.Password == "" { pw, err = password.Generate() if err != nil { - return nil, "", errors.Wrap(err, errGeneratePasswordFailed) + return nil, errors.Wrap(err, errGeneratePasswordFailed) } } request.Password = pw @@ -194,16 +182,17 @@ func (c *client) CreateInstance(externalName string, p *v1alpha1.RedisInstancePa resp, err := c.redisCli.CreateInstance(request) if err != nil { - return nil, "", CleanError(err) + return nil, CleanError(err) } - return &Instance{ - ID: resp.InstanceId, + return &CreateInstanceResponse{ + Id: resp.InstanceId, + Password: pw, Endpoint: &v1alpha1.Endpoint{ Address: resp.ConnectionDomain, Port: strconv.Itoa(resp.Port), }, - }, pw, nil + }, nil } func (c *client) DeleteInstance(id string) error { @@ -218,12 +207,12 @@ func (c *client) DeleteInstance(id string) error { // GenerateObservation is used to produce v1alpha1.RedisInstanceObservation from // redis.DBInstance. -func GenerateObservation(instance *Instance) v1alpha1.RedisInstanceObservation { +func GenerateObservation(attr *aliredis.DBInstanceAttribute) v1alpha1.RedisInstanceObservation { return v1alpha1.RedisInstanceObservation{ - DBInstanceStatus: instance.Status, + DBInstanceStatus: attr.InstanceStatus, Endpoint: v1alpha1.Endpoint{ - Address: instance.Endpoint.Address, - Port: instance.Endpoint.Port, + Address: attr.ConnectionDomain, + Port: strconv.FormatInt(attr.Port, 10), }, } } diff --git a/pkg/clients/redis/redis_test.go b/pkg/clients/redis/redis_test.go index ab41374..5e4d9b5 100644 --- a/pkg/clients/redis/redis_test.go +++ b/pkg/clients/redis/redis_test.go @@ -5,18 +5,17 @@ import ( "testing" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors" + aliredis "github.com/aliyun/alibaba-cloud-sdk-go/services/r-kvstore" "github.com/crossplane-contrib/provider-alibaba/apis/redis/v1alpha1" ) func TestGenerateObservation(t *testing.T) { - ob := GenerateObservation(&Instance{ - Status: v1alpha1.RedisInstanceStateRunning, - ID: "test-id", - Endpoint: &v1alpha1.Endpoint{ - Address: "test-address", - Port: "test-port", - }, + ob := GenerateObservation(&aliredis.DBInstanceAttribute{ + InstanceStatus: v1alpha1.RedisInstanceStateRunning, + InstanceId: "test-id", + ConnectionDomain: "test-address", + Port: 8080, }) if ob.DBInstanceStatus != v1alpha1.RedisInstanceStateRunning { t.Errorf("RedisInstanceStatus: want=%v, get=%v", v1alpha1.RedisInstanceStateRunning, ob.DBInstanceStatus) diff --git a/pkg/controller/redis/redis_instance.go b/pkg/controller/redis/redis_instance.go index 089dcfb..306a455 100644 --- a/pkg/controller/redis/redis_instance.go +++ b/pkg/controller/redis/redis_instance.go @@ -19,6 +19,7 @@ package redis import ( "context" "fmt" + "strconv" "time" xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" @@ -167,13 +168,13 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex }, nil } - instance, err := e.redisClient.DescribeInstance(instanceId) + attr, err := e.redisClient.DescribeInstance(instanceId) if err != nil { fmt.Print(err.Error(), resource.Ignore(redis.IsErrorNotFound, err)) return managed.ExternalObservation{}, errors.Wrap(resource.Ignore(redis.IsErrorNotFound, err), errDescribeFailed) } - cr.Status.AtProvider = redis.GenerateObservation(instance) + cr.Status.AtProvider = redis.GenerateObservation(attr) switch cr.Status.AtProvider.DBInstanceStatus { case v1alpha1.RedisInstanceStateRunning: @@ -189,7 +190,7 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex return managed.ExternalObservation{ ResourceExists: true, ResourceUpToDate: true, - ConnectionDetails: getConnectionDetails("", instance), + ConnectionDetails: getConnectionDetails("", "", &v1alpha1.Endpoint{Address: attr.ConnectionDomain, Port: strconv.FormatInt(attr.Port, 10)}), }, nil } @@ -301,15 +302,15 @@ func (e *external) Create(ctx context.Context, mg resource.Managed) (managed.Ext return managed.ExternalCreation{}, errors.Wrap(err, errStatusUpdate) } - instance, pw, err := e.redisClient.CreateInstance(cr.GetObjectMeta().GetName(), &cr.Spec.ForProvider) + resp, err := e.redisClient.CreateInstance(cr.GetObjectMeta().GetName(), &cr.Spec.ForProvider) if err != nil { return managed.ExternalCreation{}, errors.Wrap(err, errCreateFailed) } - meta.SetExternalName(cr, instance.ID) + meta.SetExternalName(cr, resp.Id) // Any connection details emitted in ExternalClient are cumulative. - return managed.ExternalCreation{ConnectionDetails: getConnectionDetails(pw, instance)}, nil + return managed.ExternalCreation{ConnectionDetails: getConnectionDetails(resp.Id, resp.Password, resp.Endpoint)}, nil } func (e *external) Update(ctx context.Context, mg resource.Managed) (managed.ExternalUpdate, error) { @@ -341,11 +342,11 @@ func (e *external) Delete(ctx context.Context, mg resource.Managed) error { return errors.Wrap(resource.Ignore(redis.IsErrorNotFound, err), errDeleteFailed) } -func getConnectionDetails(password string, instance *redis.Instance) managed.ConnectionDetails { +func getConnectionDetails(id string, password string, endpoint *v1alpha1.Endpoint) managed.ConnectionDetails { cd := managed.ConnectionDetails{} // By default, a master user will be created with the instanceId - username := instance.ID + username := id if username != "" { cd[xpv1.ResourceCredentialsSecretUserKey] = []byte(username) @@ -355,12 +356,12 @@ func getConnectionDetails(password string, instance *redis.Instance) managed.Con cd[xpv1.ResourceCredentialsSecretPasswordKey] = []byte(password) } - if instance.Endpoint != nil { - if instance.Endpoint.Address != "" { - cd[xpv1.ResourceCredentialsSecretEndpointKey] = []byte(instance.Endpoint.Address) + if endpoint != nil { + if endpoint.Address != "" { + cd[xpv1.ResourceCredentialsSecretEndpointKey] = []byte(endpoint.Address) } - if instance.Endpoint.Port != "" { - cd[xpv1.ResourceCredentialsSecretPortKey] = []byte(instance.Endpoint.Port) + if endpoint.Port != "" { + cd[xpv1.ResourceCredentialsSecretPortKey] = []byte(endpoint.Port) } } diff --git a/pkg/controller/redis/redisinstance_test.go b/pkg/controller/redis/redisinstance_test.go index 70e1634..9ac03a9 100644 --- a/pkg/controller/redis/redisinstance_test.go +++ b/pkg/controller/redis/redisinstance_test.go @@ -5,6 +5,7 @@ import ( "strconv" "testing" + aliredis "github.com/aliyun/alibaba-cloud-sdk-go/services/r-kvstore" xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" crossplanemeta "github.com/crossplane/crossplane-runtime/pkg/meta" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" @@ -515,9 +516,10 @@ func TestGetConnectionDetails(t *testing.T) { password := testPassword type args struct { - pw string - cr *v1alpha1.RedisInstance - i *redis.Instance + id string + pw string + cr *v1alpha1.RedisInstance + endpoint *v1alpha1.Endpoint } type want struct { conn managed.ConnectionDetails @@ -529,13 +531,11 @@ func TestGetConnectionDetails(t *testing.T) { }{ "SuccessfulNoPassword": { args: args{ + id: testId, pw: "", - i: &redis.Instance{ - ID: testId, - Endpoint: &v1alpha1.Endpoint{ - Address: address, - Port: port, - }, + endpoint: &v1alpha1.Endpoint{ + Address: address, + Port: port, }, }, want: want{ @@ -548,10 +548,8 @@ func TestGetConnectionDetails(t *testing.T) { }, "SuccessfulNoEndpoint": { args: args{ + id: testId, pw: password, - i: &redis.Instance{ - ID: testId, - }, }, want: want{ conn: managed.ConnectionDetails{ @@ -562,13 +560,11 @@ func TestGetConnectionDetails(t *testing.T) { }, "Successful": { args: args{ + id: testId, pw: password, - i: &redis.Instance{ - ID: testId, - Endpoint: &v1alpha1.Endpoint{ - Address: address, - Port: port, - }, + endpoint: &v1alpha1.Endpoint{ + Address: address, + Port: port, }, }, want: want{ @@ -584,7 +580,7 @@ func TestGetConnectionDetails(t *testing.T) { for name, tc := range cases { t.Run(name, func(t *testing.T) { - conn := getConnectionDetails(tc.args.pw, tc.args.i) + conn := getConnectionDetails(tc.args.id, tc.args.pw, tc.args.endpoint) if diff := cmp.Diff(tc.want.conn, conn); diff != "" { t.Errorf("getConnectionDetails(...): -want, +got:\n%s", diff) } @@ -594,31 +590,30 @@ func TestGetConnectionDetails(t *testing.T) { type fakeRedisClient struct{} -func (c *fakeRedisClient) DescribeInstance(id string) (*redis.Instance, error) { +func (c *fakeRedisClient) DescribeInstance(id string) (*aliredis.DBInstanceAttribute, error) { if id != testId { return nil, errors.New("DescribeRedisInstance: client doesn't work") } - return &redis.Instance{ - ID: id, - Status: v1alpha1.RedisInstanceStateRunning, - Endpoint: &v1alpha1.Endpoint{ - Address: testAddress, - Port: testPort, - }, + return &aliredis.DBInstanceAttribute{ + InstanceId: id, + InstanceStatus: v1alpha1.RedisInstanceStateRunning, + ConnectionDomain: testAddress, + Port: int64(testPortInt), }, nil } -func (c *fakeRedisClient) CreateInstance(instanceName string, p *v1alpha1.RedisInstanceParameters) (*redis.Instance, string, error) { +func (c *fakeRedisClient) CreateInstance(instanceName string, p *v1alpha1.RedisInstanceParameters) (*redis.CreateInstanceResponse, error) { if instanceName != testName { - return nil, "", errors.New("CreateRedisInstance: client doesn't work") + return nil, errors.New("CreateRedisInstance: client doesn't work") } - return &redis.Instance{ - ID: testId, + return &redis.CreateInstanceResponse{ + Id: testId, + Password: testPassword, Endpoint: &v1alpha1.Endpoint{ Address: testAddress, Port: testPort, }, - }, testPassword, nil + }, nil } func (c *fakeRedisClient) DeleteInstance(id string) error { From 0a7dee45660cc49d8311d529e9b6726bd55132ca Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Fri, 31 May 2024 11:28:12 -0700 Subject: [PATCH 21/30] prepare for controller update loop to accept more parameters Signed-off-by: Henry Zeng --- apis/redis/v1alpha1/redis_types.go | 20 +-- apis/redis/v1alpha1/zz_generated.deepcopy.go | 16 --- ....alibaba.crossplane.io_redisinstances.yaml | 32 ++--- pkg/clients/redis/redis.go | 99 +++++-------- pkg/clients/redis/redis_test.go | 6 +- pkg/controller/redis/redis_instance.go | 136 +++--------------- pkg/controller/redis/redisinstance_test.go | 101 +++++++------ 7 files changed, 129 insertions(+), 281 deletions(-) diff --git a/apis/redis/v1alpha1/redis_types.go b/apis/redis/v1alpha1/redis_types.go index 783b0ea..35561d3 100644 --- a/apis/redis/v1alpha1/redis_types.go +++ b/apis/redis/v1alpha1/redis_types.go @@ -27,7 +27,7 @@ import ( // An RedisInstance is a managed resource that represents an Redis instance. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" -// +kubebuilder:printcolumn:name="STATE",type="string",JSONPath=".status.atProvider.dbInstanceStatus" +// +kubebuilder:printcolumn:name="STATE",type="string",JSONPath=".status.atProvider.InstanceStatus" // +kubebuilder:printcolumn:name="INSTANCE_TYPE",type="string",JSONPath=".spec.forProvider.instanceType" // +kubebuilder:printcolumn:name="VERSION",type="string",JSONPath=".spec.forProvider.engineVersion" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" @@ -345,21 +345,15 @@ type RedisInstanceParameters struct { // RedisInstanceObservation is the representation of the current state that is observed. type RedisInstanceObservation struct { - // DBInstanceStatus specifies the current state of this database. - DBInstanceStatus string `json:"dbInstanceStatus,omitempty"` + // InstanceStatus specifies the current state of this database. + InstanceStatus string `json:"InstanceStatus,omitempty"` // ConnectionReady specifies whether the network connect is ready - ConnectionReady bool `json:"connectionReady"` + ConnectionReady bool `json:"connectionReady,omitempty"` - // Endpoint contains address and port used to connect with the Redis instance - Endpoint Endpoint `json:"endpoint"` -} - -// Endpoint is the redis endpoint -type Endpoint struct { - // Address specifies the DNS address of the Redis instance. - Address string `json:"address,omitempty"` + // ConnectionDomain contains domain name used to connect with the Redis instance + ConnectionDomain string `json:"connectionDomain,omitempty"` - // Port specifies the port that the database engine is listening on. + // Port contains the port number used to connect with the Redis instance Port string `json:"port,omitempty"` } diff --git a/apis/redis/v1alpha1/zz_generated.deepcopy.go b/apis/redis/v1alpha1/zz_generated.deepcopy.go index 476ccf7..a3bb4cd 100644 --- a/apis/redis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/redis/v1alpha1/zz_generated.deepcopy.go @@ -25,21 +25,6 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Endpoint) DeepCopyInto(out *Endpoint) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint. -func (in *Endpoint) DeepCopy() *Endpoint { - if in == nil { - return nil - } - out := new(Endpoint) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RedisInstance) DeepCopyInto(out *RedisInstance) { *out = *in @@ -102,7 +87,6 @@ func (in *RedisInstanceList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RedisInstanceObservation) DeepCopyInto(out *RedisInstanceObservation) { *out = *in - out.Endpoint = in.Endpoint } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisInstanceObservation. diff --git a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml index 2310c8c..5657ac0 100644 --- a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml +++ b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml @@ -26,7 +26,7 @@ spec: - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string - - jsonPath: .status.atProvider.dbInstanceStatus + - jsonPath: .status.atProvider.InstanceStatus name: STATE type: string - jsonPath: .spec.forProvider.instanceType @@ -335,30 +335,22 @@ spec: description: RedisInstanceObservation is the representation of the current state that is observed. properties: + InstanceStatus: + description: InstanceStatus specifies the current state of this + database. + type: string + connectionDomain: + description: ConnectionDomain contains domain name used to connect + with the Redis instance + type: string connectionReady: description: ConnectionReady specifies whether the network connect is ready type: boolean - dbInstanceStatus: - description: DBInstanceStatus specifies the current state of this - database. + port: + description: Port contains the port number used to connect with + the Redis instance type: string - endpoint: - description: Endpoint contains address and port used to connect - with the Redis instance - properties: - address: - description: Address specifies the DNS address of the Redis - instance. - type: string - port: - description: Port specifies the port that the database engine - is listening on. - type: string - type: object - required: - - connectionReady - - endpoint type: object conditions: description: Conditions of the resource. diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index 5c8a909..96bb9e5 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -37,6 +37,7 @@ const ( // Errors errInstanceNotFound = "DBInstanceNotFound" + errInstanceNotFoundCode = "InvalidInstanceId.NotFound" errDescribeInstanceFailed = "cannot describe instance attributes" errGeneratePasswordFailed = "cannot generate a password" ) @@ -52,26 +53,12 @@ type CleanedServerError struct { // Client defines Redis client operations type Client interface { - DescribeInstance(id string) (*aliredis.DBInstanceAttribute, error) - CreateInstance(name string, parameters *v1alpha1.RedisInstanceParameters) (*CreateInstanceResponse, error) + DescribeInstance(id string) (*aliredis.DBInstanceAttribute, *RedisConnection, error) + CreateInstance(name string, parameters *v1alpha1.RedisInstanceParameters) (*aliredis.CreateInstanceResponse, *RedisConnection, error) DeleteInstance(id string) error - // AllocateInstancePublicConnection(id string, port int) (string, error) - // ModifyDBInstanceConnectionString(id string, port int) (string, error) UpdateInstance(id string, req *ModifyRedisInstanceRequest) error } -// DBInstance defines the instance information -type CreateInstanceResponse struct { - // Instance ID - Id string - - // Default password for the admin user - Password string - - // Endpoint specifies the connection endpoint. - Endpoint *v1alpha1.Endpoint -} - // ModifyRedisInstanceRequest defines the request info to modify DB Instance type ModifyRedisInstanceRequest struct { InstanceClass string @@ -81,6 +68,13 @@ type client struct { redisCli *aliredis.Client } +type RedisConnection struct { + Username string + Password string + ConnectionDomain string + Port string +} + // NewClient creates new Redis RedisClient func NewClient(ctx context.Context, accessKeyID, accessKeySecret, region string) (Client, error) { redisCli, err := aliredis.NewClientWithAccessKey(region, accessKeyID, accessKeySecret) @@ -91,7 +85,7 @@ func NewClient(ctx context.Context, accessKeyID, accessKeySecret, region string) return c, nil } -func (c *client) DescribeInstance(id string) (*aliredis.DBInstanceAttribute, error) { +func (c *client) DescribeInstance(id string) (*aliredis.DBInstanceAttribute, *RedisConnection, error) { request := aliredis.CreateDescribeInstanceAttributeRequest() request.Scheme = HTTPSScheme @@ -99,18 +93,23 @@ func (c *client) DescribeInstance(id string) (*aliredis.DBInstanceAttribute, err response, err := c.redisCli.DescribeInstanceAttribute(request) if err != nil { - return nil, errors.Wrap(CleanError(err), errDescribeInstanceFailed) + return nil, nil, errors.Wrap(CleanError(err), errDescribeInstanceFailed) } if len(response.Instances.DBInstanceAttribute) == 0 { - return nil, errors.New(errInstanceNotFound) + return nil, nil, errors.New(errInstanceNotFound) } attr := response.Instances.DBInstanceAttribute[0] - return &attr, nil + conn := &RedisConnection{ + ConnectionDomain: attr.ConnectionDomain, + Port: strconv.FormatInt(attr.Port, 10), + } + + return &attr, conn, nil } -func (c *client) CreateInstance(externalName string, p *v1alpha1.RedisInstanceParameters) (*CreateInstanceResponse, error) { +func (c *client) CreateInstance(externalName string, p *v1alpha1.RedisInstanceParameters) (*aliredis.CreateInstanceResponse, *RedisConnection, error) { request := aliredis.CreateCreateInstanceRequest() // Seems regionID will be by default from the first part ZoneID @@ -169,7 +168,7 @@ func (c *client) CreateInstance(externalName string, p *v1alpha1.RedisInstancePa if p.Password == "" { pw, err = password.Generate() if err != nil { - return nil, errors.Wrap(err, errGeneratePasswordFailed) + return nil, nil, errors.Wrap(err, errGeneratePasswordFailed) } } request.Password = pw @@ -182,17 +181,17 @@ func (c *client) CreateInstance(externalName string, p *v1alpha1.RedisInstancePa resp, err := c.redisCli.CreateInstance(request) if err != nil { - return nil, CleanError(err) + return nil, nil, CleanError(err) } - return &CreateInstanceResponse{ - Id: resp.InstanceId, - Password: pw, - Endpoint: &v1alpha1.Endpoint{ - Address: resp.ConnectionDomain, - Port: strconv.Itoa(resp.Port), - }, - }, nil + conn := &RedisConnection{ + Username: resp.InstanceId, // By default user name will be the instance Id + Password: pw, + ConnectionDomain: resp.ConnectionDomain, + Port: strconv.Itoa(resp.Port), + } + + return resp, conn, nil } func (c *client) DeleteInstance(id string) error { @@ -209,11 +208,9 @@ func (c *client) DeleteInstance(id string) error { // redis.DBInstance. func GenerateObservation(attr *aliredis.DBInstanceAttribute) v1alpha1.RedisInstanceObservation { return v1alpha1.RedisInstanceObservation{ - DBInstanceStatus: attr.InstanceStatus, - Endpoint: v1alpha1.Endpoint{ - Address: attr.ConnectionDomain, - Port: strconv.FormatInt(attr.Port, 10), - }, + InstanceStatus: attr.InstanceStatus, + ConnectionDomain: attr.ConnectionDomain, + Port: strconv.FormatInt(attr.Port, 10), } } @@ -228,37 +225,9 @@ func IsErrorNotFound(err error) bool { return false || errors.Is(err, errors.New(errInstanceNotFound)) } - return srverr.ErrorCode() == "InvalidInstanceId.NotFound" + return srverr.ErrorCode() == errInstanceNotFoundCode } -// func (c *client) AllocateInstancePublicConnection(id string, port int) (string, error) { -// request := aliredis.CreateAllocateInstancePublicConnectionRequest() -// request.Scheme = HTTPSScheme -// request.InstanceId = id -// request.ConnectionStringPrefix = id + PubilConnectionDomain -// request.Port = strconv.Itoa(port) -// request.ReadTimeout = DefaultReadTime -// _, err := c.redisCli.AllocateInstancePublicConnection(request) -// if err != nil { -// return "", CleanError(err) -// } -// return request.ConnectionStringPrefix, err -// } - -// func (c *client) ModifyDBInstanceConnectionString(id string, port int) (string, error) { -// request := aliredis.CreateModifyDBInstanceConnectionStringRequest() -// request.Scheme = HTTPSScheme -// request.DBInstanceId = id -// request.CurrentConnectionString = id + PubilConnectionDomain -// request.Port = strconv.Itoa(port) -// request.ReadTimeout = DefaultReadTime -// _, err := c.redisCli.ModifyDBInstanceConnectionString(request) -// if err != nil { -// return "", CleanError(err) -// } -// return request.CurrentConnectionString, err -// } - func (c *client) UpdateInstance(id string, req *ModifyRedisInstanceRequest) error { if req.InstanceClass == "" { return errors.New("modify instances spec is require") diff --git a/pkg/clients/redis/redis_test.go b/pkg/clients/redis/redis_test.go index 5e4d9b5..25a3915 100644 --- a/pkg/clients/redis/redis_test.go +++ b/pkg/clients/redis/redis_test.go @@ -17,14 +17,14 @@ func TestGenerateObservation(t *testing.T) { ConnectionDomain: "test-address", Port: 8080, }) - if ob.DBInstanceStatus != v1alpha1.RedisInstanceStateRunning { - t.Errorf("RedisInstanceStatus: want=%v, get=%v", v1alpha1.RedisInstanceStateRunning, ob.DBInstanceStatus) + if ob.InstanceStatus != v1alpha1.RedisInstanceStateRunning { + t.Errorf("RedisInstanceStatus: want=%v, get=%v", v1alpha1.RedisInstanceStateRunning, ob.InstanceStatus) } } func TestIsErrorNotFound(t *testing.T) { var response = make(map[string]string) - response["Code"] = "InvalidInstanceId.NotFound" + response["Code"] = errInstanceNotFoundCode responseContent, _ := json.Marshal(response) //nolint:errchkjson err := errors.NewServerError(404, string(responseContent), "comment") diff --git a/pkg/controller/redis/redis_instance.go b/pkg/controller/redis/redis_instance.go index 306a455..f7bb658 100644 --- a/pkg/controller/redis/redis_instance.go +++ b/pkg/controller/redis/redis_instance.go @@ -19,7 +19,6 @@ package redis import ( "context" "fmt" - "strconv" "time" xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" @@ -168,15 +167,15 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex }, nil } - attr, err := e.redisClient.DescribeInstance(instanceId) + resp, conn, err := e.redisClient.DescribeInstance(instanceId) if err != nil { fmt.Print(err.Error(), resource.Ignore(redis.IsErrorNotFound, err)) return managed.ExternalObservation{}, errors.Wrap(resource.Ignore(redis.IsErrorNotFound, err), errDescribeFailed) } - cr.Status.AtProvider = redis.GenerateObservation(attr) + cr.Status.AtProvider = redis.GenerateObservation(resp) - switch cr.Status.AtProvider.DBInstanceStatus { + switch cr.Status.AtProvider.InstanceStatus { case v1alpha1.RedisInstanceStateRunning: cr.Status.SetConditions(xpv1.Available()) case v1alpha1.RedisInstanceStateCreating: @@ -190,107 +189,10 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex return managed.ExternalObservation{ ResourceExists: true, ResourceUpToDate: true, - ConnectionDetails: getConnectionDetails("", "", &v1alpha1.Endpoint{Address: attr.ConnectionDomain, Port: strconv.FormatInt(attr.Port, 10)}), + ConnectionDetails: getConnectionDetails(conn), }, nil } -// Henry: No need to support for public access -// We don't need to call this method as the port and address are automatically configured now -// func (e *external) createConnectionIfNeeded(cr *v1alpha1.RedisInstance) (string, string, error) { - -// if cr.Spec.ForProvider.PubliclyAccessible { -// return e.createPublicConnectionIfNeeded(cr) -// } -// return e.createPrivateConnectionIfNeeded(cr) -// } - -// func (e *external) createPrivateConnectionIfNeeded(cr *v1alpha1.RedisInstance) (string, string, error) { -// domain := cr.Status.AtProvider.DBInstanceID + ".redis.rds.aliyuncs.com" -// if cr.Spec.ForProvider.Port == 0 { -// return domain, defaultRedisPort, nil -// } -// port := strconv.Itoa(cr.Spec.ForProvider.Port) -// if cr.Status.AtProvider.ConnectionReady { -// return domain, port, nil -// } -// connectionDomain, err := e.client.ModifyDBInstanceConnectionString(cr.Status.AtProvider.DBInstanceID, cr.Spec.ForProvider.Port) -// if err != nil { -// // The previous request might fail due to timeout. That's fine we will eventually reconcile it. -// var sdkerr sdkerror.Error -// if errors.As(err, &sdkerr) { -// if sdkerr.ErrorCode() == errDuplicateConnectionPort { -// cr.Status.AtProvider.ConnectionReady = true -// return domain, port, nil -// } -// } -// return "", "", err -// } - -// cr.Status.AtProvider.ConnectionReady = true -// return connectionDomain, port, nil -// } - -// func (e *external) createPublicConnectionIfNeeded(cr *v1alpha1.RedisInstance) (string, string, error) { -// domain := cr.Status.AtProvider.DBInstanceID + redis.PubilConnectionDomain -// if cr.Status.AtProvider.ConnectionReady { -// return domain, "", nil -// } -// port := defaultRedisPort -// if cr.Spec.ForProvider.InstancePort != 0 { -// port = strconv.Itoa(cr.Spec.ForProvider.InstancePort) -// } -// _, err := e.client.AllocateInstancePublicConnection(cr.Status.AtProvider.DBInstanceID, cr.Spec.ForProvider.InstancePort) -// if err != nil { -// // The previous request might fail due to timeout. That's fine we will eventually reconcile it. -// var sdkerr sdkerror.Error -// if errors.As(err, &sdkerr) { -// if sdkerr.ErrorCode() == errDuplicateConnectionPort || sdkerr.ErrorCode() == "NetTypeExists" { -// cr.Status.AtProvider.ConnectionReady = true -// return domain, port, nil -// } -// } -// return "", "", err -// } - -// cr.Status.AtProvider.ConnectionReady = true -// return domain, port, nil -// } - -// func (e *external) createAccount(cr *v1alpha1.RedisInstance) (string, error) { -// if cr.Status.AtProvider.AccountReady { -// return "", nil -// } - -// pw, err := password.Generate() -// if err != nil { -// return "", err -// } - -// instanceId, err := getInstanceId(cr) -// if err != nil { -// return "", err -// } - -// username := getUsername(cr) - -// // Use the instance name as the default user -// err = e.client.CreateAccount(instanceId, username, pw) -// if err != nil { -// // The previous request might fail due to timeout. That's fine we will eventually reconcile it. -// var sdkerr sdkerror.Error -// if errors.As(err, &sdkerr) { -// if sdkerr.ErrorCode() == errAccountNameDuplicate { -// cr.Status.AtProvider.AccountReady = true -// return "", nil -// } -// } -// return "", err -// } - -// cr.Status.AtProvider.AccountReady = true -// return pw, nil -// } - func (e *external) Create(ctx context.Context, mg resource.Managed) (managed.ExternalCreation, error) { cr, ok := mg.(*v1alpha1.RedisInstance) if !ok { @@ -302,15 +204,15 @@ func (e *external) Create(ctx context.Context, mg resource.Managed) (managed.Ext return managed.ExternalCreation{}, errors.Wrap(err, errStatusUpdate) } - resp, err := e.redisClient.CreateInstance(cr.GetObjectMeta().GetName(), &cr.Spec.ForProvider) + resp, conn, err := e.redisClient.CreateInstance(cr.GetObjectMeta().GetName(), &cr.Spec.ForProvider) if err != nil { return managed.ExternalCreation{}, errors.Wrap(err, errCreateFailed) } - meta.SetExternalName(cr, resp.Id) + meta.SetExternalName(cr, resp.InstanceId) // Any connection details emitted in ExternalClient are cumulative. - return managed.ExternalCreation{ConnectionDetails: getConnectionDetails(resp.Id, resp.Password, resp.Endpoint)}, nil + return managed.ExternalCreation{ConnectionDetails: getConnectionDetails(conn)}, nil } func (e *external) Update(ctx context.Context, mg resource.Managed) (managed.ExternalUpdate, error) { @@ -342,27 +244,23 @@ func (e *external) Delete(ctx context.Context, mg resource.Managed) error { return errors.Wrap(resource.Ignore(redis.IsErrorNotFound, err), errDeleteFailed) } -func getConnectionDetails(id string, password string, endpoint *v1alpha1.Endpoint) managed.ConnectionDetails { +func getConnectionDetails(c *redis.RedisConnection) managed.ConnectionDetails { cd := managed.ConnectionDetails{} - // By default, a master user will be created with the instanceId - username := id + if c.Username != "" { + cd[xpv1.ResourceCredentialsSecretUserKey] = []byte(c.Username) + } - if username != "" { - cd[xpv1.ResourceCredentialsSecretUserKey] = []byte(username) + if c.Password != "" { + cd[xpv1.ResourceCredentialsSecretPasswordKey] = []byte(c.Password) } - if password != "" { - cd[xpv1.ResourceCredentialsSecretPasswordKey] = []byte(password) + if c.ConnectionDomain != "" { + cd[xpv1.ResourceCredentialsSecretEndpointKey] = []byte(c.ConnectionDomain) } - if endpoint != nil { - if endpoint.Address != "" { - cd[xpv1.ResourceCredentialsSecretEndpointKey] = []byte(endpoint.Address) - } - if endpoint.Port != "" { - cd[xpv1.ResourceCredentialsSecretPortKey] = []byte(endpoint.Port) - } + if c.Port != "" { + cd[xpv1.ResourceCredentialsSecretPortKey] = []byte(c.Port) } return cd diff --git a/pkg/controller/redis/redisinstance_test.go b/pkg/controller/redis/redisinstance_test.go index 9ac03a9..a159b66 100644 --- a/pkg/controller/redis/redisinstance_test.go +++ b/pkg/controller/redis/redisinstance_test.go @@ -31,7 +31,6 @@ const testPort = "8080" const testAddress = "172.0.0.1" var testPortInt = 8080 -var testEndpoint = v1alpha1.Endpoint{Address: testAddress, Port: testPort} func TestConnector(t *testing.T) { errBoom := errors.New("boom") @@ -286,8 +285,9 @@ func TestObserve(t *testing.T) { }, Status: v1alpha1.RedisInstanceStatus{ AtProvider: v1alpha1.RedisInstanceObservation{ - DBInstanceStatus: testStatus, - Endpoint: testEndpoint, + InstanceStatus: testStatus, + ConnectionDomain: testAddress, + Port: testPort, }, }, }, @@ -310,8 +310,9 @@ func TestObserve(t *testing.T) { }, Status: v1alpha1.RedisInstanceStatus{ AtProvider: v1alpha1.RedisInstanceObservation{ - DBInstanceStatus: testStatus, - Endpoint: testEndpoint, + InstanceStatus: testStatus, + ConnectionDomain: testAddress, + Port: testPort, }, }, }, @@ -372,6 +373,7 @@ func TestCreate(t *testing.T) { EngineVersion: "5.0", InstanceClass: "redis.logic.sharding.2g.8db.0rodb.8proxy.default", Port: &testPortInt, + Password: testPassword, // PubliclyAccessible: true, }, }, @@ -473,8 +475,9 @@ func TestDelete(t *testing.T) { }, Status: v1alpha1.RedisInstanceStatus{ AtProvider: v1alpha1.RedisInstanceObservation{ - DBInstanceStatus: v1alpha1.RedisInstanceStateDeleting, - Endpoint: testEndpoint, + InstanceStatus: v1alpha1.RedisInstanceStateDeleting, + ConnectionDomain: testAddress, + Port: testPort, }, }, }, @@ -489,8 +492,9 @@ func TestDelete(t *testing.T) { }, Status: v1alpha1.RedisInstanceStatus{ AtProvider: v1alpha1.RedisInstanceObservation{ - DBInstanceStatus: testStatus, - Endpoint: testEndpoint, + InstanceStatus: testStatus, + ConnectionDomain: testAddress, + Port: testPort, }, }, }, @@ -511,15 +515,15 @@ func TestDelete(t *testing.T) { } func TestGetConnectionDetails(t *testing.T) { - address := testEndpoint.Address - port := testEndpoint.Port + address := testAddress + port := testPort password := testPassword type args struct { - id string - pw string - cr *v1alpha1.RedisInstance - endpoint *v1alpha1.Endpoint + id string + pw string + domain string + port string } type want struct { conn managed.ConnectionDetails @@ -531,12 +535,10 @@ func TestGetConnectionDetails(t *testing.T) { }{ "SuccessfulNoPassword": { args: args{ - id: testId, - pw: "", - endpoint: &v1alpha1.Endpoint{ - Address: address, - Port: port, - }, + id: testId, + pw: "", + domain: address, + port: port, }, want: want{ conn: managed.ConnectionDetails{ @@ -560,12 +562,10 @@ func TestGetConnectionDetails(t *testing.T) { }, "Successful": { args: args{ - id: testId, - pw: password, - endpoint: &v1alpha1.Endpoint{ - Address: address, - Port: port, - }, + id: testId, + pw: password, + domain: address, + port: port, }, want: want{ conn: managed.ConnectionDetails{ @@ -580,7 +580,12 @@ func TestGetConnectionDetails(t *testing.T) { for name, tc := range cases { t.Run(name, func(t *testing.T) { - conn := getConnectionDetails(tc.args.id, tc.args.pw, tc.args.endpoint) + conn := getConnectionDetails(&redis.RedisConnection{ + Username: tc.args.id, + Password: tc.args.pw, + ConnectionDomain: tc.args.domain, + Port: tc.args.port, + }) if diff := cmp.Diff(tc.want.conn, conn); diff != "" { t.Errorf("getConnectionDetails(...): -want, +got:\n%s", diff) } @@ -590,30 +595,36 @@ func TestGetConnectionDetails(t *testing.T) { type fakeRedisClient struct{} -func (c *fakeRedisClient) DescribeInstance(id string) (*aliredis.DBInstanceAttribute, error) { +func (c *fakeRedisClient) DescribeInstance(id string) (*aliredis.DBInstanceAttribute, *redis.RedisConnection, error) { if id != testId { - return nil, errors.New("DescribeRedisInstance: client doesn't work") + return nil, nil, errors.New("DescribeRedisInstance: client doesn't work") } return &aliredis.DBInstanceAttribute{ - InstanceId: id, - InstanceStatus: v1alpha1.RedisInstanceStateRunning, - ConnectionDomain: testAddress, - Port: int64(testPortInt), - }, nil + InstanceId: id, + InstanceStatus: v1alpha1.RedisInstanceStateRunning, + ConnectionDomain: testAddress, + Port: int64(testPortInt), + }, &redis.RedisConnection{ + ConnectionDomain: testAddress, + Port: testPort, + }, nil } -func (c *fakeRedisClient) CreateInstance(instanceName string, p *v1alpha1.RedisInstanceParameters) (*redis.CreateInstanceResponse, error) { +func (c *fakeRedisClient) CreateInstance(instanceName string, p *v1alpha1.RedisInstanceParameters) (*aliredis.CreateInstanceResponse, *redis.RedisConnection, error) { if instanceName != testName { - return nil, errors.New("CreateRedisInstance: client doesn't work") + return nil, nil, errors.New("CreateRedisInstance: client doesn't work") } - return &redis.CreateInstanceResponse{ - Id: testId, - Password: testPassword, - Endpoint: &v1alpha1.Endpoint{ - Address: testAddress, - Port: testPort, - }, - }, nil + return &aliredis.CreateInstanceResponse{ + InstanceId: testId, + InstanceName: instanceName, + ConnectionDomain: testAddress, + Port: *p.Port, + }, &redis.RedisConnection{ + Username: testId, + Password: p.Password, + ConnectionDomain: testAddress, + Port: strconv.Itoa(*p.Port), + }, nil } func (c *fakeRedisClient) DeleteInstance(id string) error { From 6330fc5cacde4901227544a1af40cb947c8ea892 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Fri, 31 May 2024 16:11:06 -0700 Subject: [PATCH 22/30] automate securityIp after instance creation Signed-off-by: Henry Zeng --- apis/redis/v1alpha1/redis_types.go | 8 ++-- ....alibaba.crossplane.io_redisinstances.yaml | 8 ++-- pkg/clients/redis/redis.go | 11 ++++- pkg/clients/redis/security_ips.go | 37 ++++++++++++++++ pkg/clients/redis/security_ips_test.go | 1 + pkg/controller/redis/redis_instance.go | 44 +++++++++++++++---- pkg/controller/redis/redisinstance_test.go | 21 +++------ 7 files changed, 98 insertions(+), 32 deletions(-) create mode 100644 pkg/clients/redis/security_ips.go create mode 100644 pkg/clients/redis/security_ips_test.go diff --git a/apis/redis/v1alpha1/redis_types.go b/apis/redis/v1alpha1/redis_types.go index 35561d3..a486d7d 100644 --- a/apis/redis/v1alpha1/redis_types.go +++ b/apis/redis/v1alpha1/redis_types.go @@ -341,6 +341,11 @@ type RedisInstanceParameters struct { // The backup set ID. // +optional ClusterBackupId string `json:"clusterBackupId,omitempty"` + + // A list of IP addresses should be whitelisted. + // Separate multiple IP addresses with a comma (,). + // +optional + SecurityIps string `json:"securityIps,omitempty"` } // RedisInstanceObservation is the representation of the current state that is observed. @@ -348,9 +353,6 @@ type RedisInstanceObservation struct { // InstanceStatus specifies the current state of this database. InstanceStatus string `json:"InstanceStatus,omitempty"` - // ConnectionReady specifies whether the network connect is ready - ConnectionReady bool `json:"connectionReady,omitempty"` - // ConnectionDomain contains domain name used to connect with the Redis instance ConnectionDomain string `json:"connectionDomain,omitempty"` diff --git a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml index 5657ac0..430aea7 100644 --- a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml +++ b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml @@ -241,6 +241,10 @@ spec: recovery is implemented across zones. The instance can withstand failures in data centers.' type: string + securityIps: + description: A list of IP addresses should be whitelisted. Separate + multiple IP addresses with a comma (,). + type: string shardCount: description: The number of data shards. This parameter is available only if you create a cluster instance that uses cloud disks. @@ -343,10 +347,6 @@ spec: description: ConnectionDomain contains domain name used to connect with the Redis instance type: string - connectionReady: - description: ConnectionReady specifies whether the network connect - is ready - type: boolean port: description: Port contains the port number used to connect with the Redis instance diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index 96bb9e5..c6140f9 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -20,6 +20,7 @@ import ( "context" "encoding/json" "strconv" + "time" "github.com/crossplane/crossplane-runtime/pkg/password" "github.com/pkg/errors" @@ -33,10 +34,12 @@ import ( const ( // HTTPSScheme indicates request scheme - HTTPSScheme = "https" + HTTPSScheme = "https" + ConnectTimeOut = 60 * time.Second + ReadTimeOut = 60 * time.Second // Errors - errInstanceNotFound = "DBInstanceNotFound" + errInstanceNotFound = "InstanceNotFound" errInstanceNotFoundCode = "InvalidInstanceId.NotFound" errDescribeInstanceFailed = "cannot describe instance attributes" errGeneratePasswordFailed = "cannot generate a password" @@ -57,6 +60,8 @@ type Client interface { CreateInstance(name string, parameters *v1alpha1.RedisInstanceParameters) (*aliredis.CreateInstanceResponse, *RedisConnection, error) DeleteInstance(id string) error UpdateInstance(id string, req *ModifyRedisInstanceRequest) error + + ModifySecurityIps(id string, ips string) error } // ModifyRedisInstanceRequest defines the request info to modify DB Instance @@ -111,6 +116,8 @@ func (c *client) DescribeInstance(id string) (*aliredis.DBInstanceAttribute, *Re func (c *client) CreateInstance(externalName string, p *v1alpha1.RedisInstanceParameters) (*aliredis.CreateInstanceResponse, *RedisConnection, error) { request := aliredis.CreateCreateInstanceRequest() + request.ConnectTimeout = ConnectTimeOut + request.ReadTimeout = ReadTimeOut // Seems regionID will be by default from the first part ZoneID // request.RegionID = p.RegionID diff --git a/pkg/clients/redis/security_ips.go b/pkg/clients/redis/security_ips.go new file mode 100644 index 0000000..131d3ed --- /dev/null +++ b/pkg/clients/redis/security_ips.go @@ -0,0 +1,37 @@ +package redis + +import ( + "strings" + + aliredis "github.com/aliyun/alibaba-cloud-sdk-go/services/r-kvstore" +) + +const DefaultModifyMode = "Cover" + +func (c *client) ModifySecurityIps(id string, ips string) error { + req := aliredis.CreateModifySecurityIpsRequest() + + req.InstanceId = id + req.SecurityIps = ips + req.ModifyMode = DefaultModifyMode + + _, err := c.redisCli.ModifySecurityIps(req) + return CleanError(err) +} + +// Check if the whitelist IPs (IPv4) in Redis parameters are different than what are actually configured +// Return true if there are differences +func SecurityIpsNeedUpdate(configuredIps string, parameterIps string) bool { + if parameterIps == "" { + return false + } + + ips := strings.Split(configuredIps, ",") + for _, ip := range ips { + if !strings.Contains(parameterIps, ip) { + return true + } + } + + return false +} diff --git a/pkg/clients/redis/security_ips_test.go b/pkg/clients/redis/security_ips_test.go new file mode 100644 index 0000000..65a229e --- /dev/null +++ b/pkg/clients/redis/security_ips_test.go @@ -0,0 +1 @@ +package redis diff --git a/pkg/controller/redis/redis_instance.go b/pkg/controller/redis/redis_instance.go index f7bb658..e6a5755 100644 --- a/pkg/controller/redis/redis_instance.go +++ b/pkg/controller/redis/redis_instance.go @@ -18,7 +18,6 @@ package redis import ( "context" - "fmt" "time" xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" @@ -169,7 +168,6 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex resp, conn, err := e.redisClient.DescribeInstance(instanceId) if err != nil { - fmt.Print(err.Error(), resource.Ignore(redis.IsErrorNotFound, err)) return managed.ExternalObservation{}, errors.Wrap(resource.Ignore(redis.IsErrorNotFound, err), errDescribeFailed) } @@ -186,9 +184,19 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex cr.Status.SetConditions(xpv1.Unavailable()) } + // TODO: Check for Spec update + + // TODO: Check for parameter update + + // Check for whitelist IPs update + var securityIpsNeedUpdate bool + if cr.Status.AtProvider.InstanceStatus == v1alpha1.RedisInstanceStateRunning { + securityIpsNeedUpdate = redis.SecurityIpsNeedUpdate(resp.SecurityIPList, cr.Spec.ForProvider.SecurityIps) + } + return managed.ExternalObservation{ ResourceExists: true, - ResourceUpToDate: true, + ResourceUpToDate: !securityIpsNeedUpdate, ConnectionDetails: getConnectionDetails(conn), }, nil } @@ -221,15 +229,33 @@ func (e *external) Update(ctx context.Context, mg resource.Managed) (managed.Ext return managed.ExternalUpdate{}, errors.New(errNotInstance) } - cr.Status.SetConditions(xpv1.Creating()) + instanceId := meta.GetExternalName(cr) + + resp, _, err := e.redisClient.DescribeInstance(instanceId) + if err != nil { + return managed.ExternalUpdate{}, err + } + + // Only update the instance when it's in normal state + if resp.InstanceStatus != v1alpha1.RedisInstanceStateRunning { + return managed.ExternalUpdate{}, nil + } + + // TODO: Check and update spec if needed + + // TODO: Check and update parameters if needed + + // Check and update security IPs if needed + if redis.SecurityIpsNeedUpdate(resp.SecurityIPList, cr.Spec.ForProvider.SecurityIps) { + err = e.redisClient.ModifySecurityIps(instanceId, cr.Spec.ForProvider.SecurityIps) + if err != nil { + return managed.ExternalUpdate{}, err + } - description := cr.Spec.ForProvider - modifyReq := &redis.ModifyRedisInstanceRequest{ - InstanceClass: description.InstanceClass, + return managed.ExternalUpdate{}, nil } - err := e.redisClient.UpdateInstance(meta.GetExternalName(cr), modifyReq) - return managed.ExternalUpdate{}, err + return managed.ExternalUpdate{}, nil } func (e *external) Delete(ctx context.Context, mg resource.Managed) error { diff --git a/pkg/controller/redis/redisinstance_test.go b/pkg/controller/redis/redisinstance_test.go index a159b66..8d1f484 100644 --- a/pkg/controller/redis/redisinstance_test.go +++ b/pkg/controller/redis/redisinstance_test.go @@ -634,23 +634,16 @@ func (c *fakeRedisClient) DeleteInstance(id string) error { return nil } -// func (c *fakeRedisClient) AllocateInstancePublicConnection(id string, port int) (string, error) { -// if id != testId { -// return "nil", errors.New("AllocateInstancePublicConnection: client doesn't work") -// } -// return "", nil -// } - -// func (c *fakeRedisClient) ModifyDBInstanceConnectionString(id string, port int) (string, error) { -// if id != testId { -// return "nil", errors.New("ModifyDBInstanceConnectionString: client doesn't work") -// } -// return "", nil -// } - func (c *fakeRedisClient) UpdateInstance(id string, req *redis.ModifyRedisInstanceRequest) error { if id != testId { return errors.New("Update: client doesn't work") } return nil } + +func (c *fakeRedisClient) ModifySecurityIps(id string, ips string) error { + if id != testId { + return errors.New("ModifySecurityIps: client doesn't work") + } + return nil +} From cb7b09c65e6105c8e059e4ad681504084b7459f0 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Tue, 4 Jun 2024 15:16:19 -0700 Subject: [PATCH 23/30] support spec updates Signed-off-by: Henry Zeng --- apis/redis/v1alpha1/redis_types.go | 6 ++ ....alibaba.crossplane.io_redisinstances.yaml | 6 ++ pkg/clients/redis/redis.go | 86 ++++++++++++++++++- pkg/clients/redis/security_ips.go | 37 -------- pkg/clients/redis/security_ips_test.go | 1 - pkg/controller/redis/redis_instance.go | 50 +++++++---- pkg/controller/redis/redisinstance_test.go | 7 ++ 7 files changed, 132 insertions(+), 61 deletions(-) delete mode 100644 pkg/clients/redis/security_ips.go delete mode 100644 pkg/clients/redis/security_ips_test.go diff --git a/apis/redis/v1alpha1/redis_types.go b/apis/redis/v1alpha1/redis_types.go index a486d7d..2b59ca9 100644 --- a/apis/redis/v1alpha1/redis_types.go +++ b/apis/redis/v1alpha1/redis_types.go @@ -346,6 +346,12 @@ type RedisInstanceParameters struct { // Separate multiple IP addresses with a comma (,). // +optional SecurityIps string `json:"securityIps,omitempty"` + + // Effective time for Instance Updates + // Valid values: + // Immediately (default): The configurations are immediately changed + // MaintainTime: The configurations are changed within the maintenance window. + EffectiveTime string `json:"effectiveTime,omitempty"` } // RedisInstanceObservation is the representation of the current state that is observed. diff --git a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml index 430aea7..2ff5a0f 100644 --- a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml +++ b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml @@ -130,6 +130,12 @@ spec: description: The ID of the dedicated cluster. This parameter is required if you create an instance in a dedicated cluster. type: string + effectiveTime: + description: 'Effective time for Instance Updates Valid values: + Immediately (default): The configurations are immediately changed + MaintainTime: The configurations are changed within the maintenance + window.' + type: string engineVersion: description: 'The database engine version of the instance. Valid values: 4.0 5.0 6.0 7.0' diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index c6140f9..0b47cff 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -20,6 +20,7 @@ import ( "context" "encoding/json" "strconv" + "strings" "time" "github.com/crossplane/crossplane-runtime/pkg/password" @@ -34,9 +35,15 @@ import ( const ( // HTTPSScheme indicates request scheme - HTTPSScheme = "https" - ConnectTimeOut = 60 * time.Second - ReadTimeOut = 60 * time.Second + HTTPSScheme = "https" + ConnectTimeOut = 60 * time.Second + ReadTimeOut = 60 * time.Second + DefaultIPModifyMode = "Cover" + + // Effective time for Spec update + EffectiveTimeImmediate = "Immediately" + EffectiveTimeMaintain = "MaintainTime" + DefaultEffectiveTime = "Immediately" // Errors errInstanceNotFound = "InstanceNotFound" @@ -59,8 +66,8 @@ type Client interface { DescribeInstance(id string) (*aliredis.DBInstanceAttribute, *RedisConnection, error) CreateInstance(name string, parameters *v1alpha1.RedisInstanceParameters) (*aliredis.CreateInstanceResponse, *RedisConnection, error) DeleteInstance(id string) error - UpdateInstance(id string, req *ModifyRedisInstanceRequest) error + ModifyInstanceSpec(id string, req *aliredis.ModifyInstanceSpecRequest) error ModifySecurityIps(id string, ips string) error } @@ -254,6 +261,77 @@ func (c *client) modifyInstanceSpec(id string, req *ModifyRedisInstanceRequest) return CleanError(err) } +// Check if the whitelist IPs (IPv4) in Redis parameters are different than what are actually configured +// Return true if there are differences +func SecurityIpsNeedUpdate(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) bool { + if p.SecurityIps == "" { + return false + } + + ips := strings.Split(attr.SecurityIPList, ",") + for _, ip := range ips { + if !strings.Contains(p.SecurityIps, ip) { + return true + } + } + + return false +} + +// Send Modify IP request +func (c *client) ModifySecurityIps(id string, ips string) error { + req := aliredis.CreateModifySecurityIpsRequest() + + req.InstanceId = id + req.SecurityIps = ips + req.ModifyMode = DefaultIPModifyMode + + _, err := c.redisCli.ModifySecurityIps(req) + return CleanError(err) +} + +// Check if the Redis instance spec needs to be updated +// Return nil if there is no difference, else return the modify instance spec request +func SpecsNeedUpdate(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) *aliredis.ModifyInstanceSpecRequest { + return calculateSpecDiff(attr, p) +} + +// Calculate the difference between the resource spec and what's actually configured +// Note that Major and Minor versions should be set by separate calls +// Only support certain updates on specs, and we update the specs one by one to avoid conflicts +func calculateSpecDiff(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) *aliredis.ModifyInstanceSpecRequest { + diff := aliredis.CreateModifyInstanceSpecRequest() + + // By default, effective time is "Immediately" + if p.EffectiveTime != "" { + diff.EffectiveTime = p.EffectiveTime + } + + if attr.InstanceClass != p.InstanceClass { + diff.InstanceClass = p.InstanceClass + return diff + } + + if p.ShardCount != nil && attr.ShardCount != *p.ShardCount { + diff.ShardCount = requests.NewInteger(*p.ShardCount) + return diff + } + + if p.ReadOnlyCount != nil && attr.ReadOnlyCount != *p.ReadOnlyCount { + diff.ReadOnlyCount = requests.NewInteger(*p.ReadOnlyCount) + return diff + } + + return nil +} + +// Send Modify Spec request +func (c *client) ModifyInstanceSpec(id string, req *aliredis.ModifyInstanceSpecRequest) error { + req.InstanceId = id + _, err := c.redisCli.ModifyInstanceSpec(req) + return CleanError(err) +} + // 2024-05-14: Henry // Try to remove requestID from AliCloud SDK errors // Returning error with requestID will cause Crossplane reconciler to treat the errors diff --git a/pkg/clients/redis/security_ips.go b/pkg/clients/redis/security_ips.go deleted file mode 100644 index 131d3ed..0000000 --- a/pkg/clients/redis/security_ips.go +++ /dev/null @@ -1,37 +0,0 @@ -package redis - -import ( - "strings" - - aliredis "github.com/aliyun/alibaba-cloud-sdk-go/services/r-kvstore" -) - -const DefaultModifyMode = "Cover" - -func (c *client) ModifySecurityIps(id string, ips string) error { - req := aliredis.CreateModifySecurityIpsRequest() - - req.InstanceId = id - req.SecurityIps = ips - req.ModifyMode = DefaultModifyMode - - _, err := c.redisCli.ModifySecurityIps(req) - return CleanError(err) -} - -// Check if the whitelist IPs (IPv4) in Redis parameters are different than what are actually configured -// Return true if there are differences -func SecurityIpsNeedUpdate(configuredIps string, parameterIps string) bool { - if parameterIps == "" { - return false - } - - ips := strings.Split(configuredIps, ",") - for _, ip := range ips { - if !strings.Contains(parameterIps, ip) { - return true - } - } - - return false -} diff --git a/pkg/clients/redis/security_ips_test.go b/pkg/clients/redis/security_ips_test.go deleted file mode 100644 index 65a229e..0000000 --- a/pkg/clients/redis/security_ips_test.go +++ /dev/null @@ -1 +0,0 @@ -package redis diff --git a/pkg/controller/redis/redis_instance.go b/pkg/controller/redis/redis_instance.go index e6a5755..3125832 100644 --- a/pkg/controller/redis/redis_instance.go +++ b/pkg/controller/redis/redis_instance.go @@ -42,16 +42,18 @@ const ( // Fall to connection instance error description errCreateInstanceConnectionFailed = "cannot instance connection" - errNotInstance = "managed resource is not an instance custom resource" - errNoProvider = "no provider config or provider specified" - errCreateClient = "cannot create redis client" - errGetProviderConfig = "cannot get provider config" - errTrackUsage = "cannot track provider config usage" - errNoConnectionSecret = "no connection secret specified" - errGetConnectionSecret = "cannot get connection secret" - errInstanceIdEmpty = "instance id is empty, maybe it's not created" - errInstanceAlreadyCreated = "instance id is not empty, maybe it's already been created" - errStatusUpdate = "failed to update CR status" + errNotInstance = "managed resource is not an instance custom resource" + errNoProvider = "no provider config or provider specified" + errCreateClient = "cannot create redis client" + errGetProviderConfig = "cannot get provider config" + errTrackUsage = "cannot track provider config usage" + errNoConnectionSecret = "no connection secret specified" + errGetConnectionSecret = "cannot get connection secret" + errInstanceIdEmpty = "instance id is empty, maybe it's not created" + errInstanceAlreadyCreated = "instance id is not empty, maybe it's already been created" + errStatusUpdate = "failed to update CR status" + errInstanceUpdateIPFailed = "failed to update instance security IP list" + errInstanceUpdateSpecFailed = "failed to update instance spec" errCreateFailed = "cannot create redis instance" errCreateAccountFailed = "cannot create redis account" @@ -184,19 +186,21 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex cr.Status.SetConditions(xpv1.Unavailable()) } - // TODO: Check for Spec update - - // TODO: Check for parameter update - - // Check for whitelist IPs update var securityIpsNeedUpdate bool + var specsNeedUpdate bool if cr.Status.AtProvider.InstanceStatus == v1alpha1.RedisInstanceStateRunning { - securityIpsNeedUpdate = redis.SecurityIpsNeedUpdate(resp.SecurityIPList, cr.Spec.ForProvider.SecurityIps) + // TODO: Check for Spec update + + // TODO: Check for parameter update + specsNeedUpdate = redis.SpecsNeedUpdate(resp, &cr.Spec.ForProvider) != nil + + // Check for whitelist IPs update + securityIpsNeedUpdate = redis.SecurityIpsNeedUpdate(resp, &cr.Spec.ForProvider) } return managed.ExternalObservation{ ResourceExists: true, - ResourceUpToDate: !securityIpsNeedUpdate, + ResourceUpToDate: !securityIpsNeedUpdate && !specsNeedUpdate, ConnectionDetails: getConnectionDetails(conn), }, nil } @@ -242,14 +246,22 @@ func (e *external) Update(ctx context.Context, mg resource.Managed) (managed.Ext } // TODO: Check and update spec if needed + specsUpdateRequest := redis.SpecsNeedUpdate(resp, &cr.Spec.ForProvider) + if specsUpdateRequest != nil { + err = e.redisClient.ModifyInstanceSpec(instanceId, specsUpdateRequest) + if err != nil { + return managed.ExternalUpdate{}, errors.Wrap(err, errInstanceUpdateSpecFailed) + } + return managed.ExternalUpdate{}, nil + } // TODO: Check and update parameters if needed // Check and update security IPs if needed - if redis.SecurityIpsNeedUpdate(resp.SecurityIPList, cr.Spec.ForProvider.SecurityIps) { + if redis.SecurityIpsNeedUpdate(resp, &cr.Spec.ForProvider) { err = e.redisClient.ModifySecurityIps(instanceId, cr.Spec.ForProvider.SecurityIps) if err != nil { - return managed.ExternalUpdate{}, err + return managed.ExternalUpdate{}, errors.Wrap(err, errInstanceUpdateIPFailed) } return managed.ExternalUpdate{}, nil diff --git a/pkg/controller/redis/redisinstance_test.go b/pkg/controller/redis/redisinstance_test.go index 8d1f484..715d0de 100644 --- a/pkg/controller/redis/redisinstance_test.go +++ b/pkg/controller/redis/redisinstance_test.go @@ -647,3 +647,10 @@ func (c *fakeRedisClient) ModifySecurityIps(id string, ips string) error { } return nil } + +func (c *fakeRedisClient) ModifyInstanceSpec(id string, req *aliredis.ModifyInstanceSpecRequest) error { + if id != testId { + return errors.New("ModifyInstanceSpec: client doesn't work") + } + return nil +} From 5466964b9a01b0d4699a15d2f540fbd383b21bb0 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Tue, 4 Jun 2024 15:37:11 -0700 Subject: [PATCH 24/30] modify ip change Signed-off-by: Henry Zeng --- pkg/clients/redis/redis.go | 49 ++++++++++++++++------ pkg/controller/redis/redis_instance.go | 22 ++++++---- pkg/controller/redis/redisinstance_test.go | 12 +++--- 3 files changed, 55 insertions(+), 28 deletions(-) diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index 0b47cff..d1f102b 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -67,8 +67,9 @@ type Client interface { CreateInstance(name string, parameters *v1alpha1.RedisInstanceParameters) (*aliredis.CreateInstanceResponse, *RedisConnection, error) DeleteInstance(id string) error - ModifyInstanceSpec(id string, req *aliredis.ModifyInstanceSpecRequest) error - ModifySecurityIps(id string, ips string) error + ModifyInstanceSpecs(id string, req *aliredis.ModifyInstanceSpecRequest) error + ModifyInstanceParams(id string, req *aliredis.ModifyInstanceParameterRequest) error + ModifySecurityIps(id string, req *aliredis.ModifySecurityIpsRequest) error } // ModifyRedisInstanceRequest defines the request info to modify DB Instance @@ -263,29 +264,33 @@ func (c *client) modifyInstanceSpec(id string, req *ModifyRedisInstanceRequest) // Check if the whitelist IPs (IPv4) in Redis parameters are different than what are actually configured // Return true if there are differences -func SecurityIpsNeedUpdate(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) bool { +func SecurityIpsNeedUpdate(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) *aliredis.ModifySecurityIpsRequest { if p.SecurityIps == "" { - return false + return nil } ips := strings.Split(attr.SecurityIPList, ",") + needUpdate := false for _, ip := range ips { if !strings.Contains(p.SecurityIps, ip) { - return true + needUpdate = true + break } } - return false + if needUpdate { + req := aliredis.CreateModifySecurityIpsRequest() + req.SecurityIps = p.SecurityIps + req.ModifyMode = DefaultIPModifyMode + return req + } + + return nil } // Send Modify IP request -func (c *client) ModifySecurityIps(id string, ips string) error { - req := aliredis.CreateModifySecurityIpsRequest() - +func (c *client) ModifySecurityIps(id string, req *aliredis.ModifySecurityIpsRequest) error { req.InstanceId = id - req.SecurityIps = ips - req.ModifyMode = DefaultIPModifyMode - _, err := c.redisCli.ModifySecurityIps(req) return CleanError(err) } @@ -326,12 +331,30 @@ func calculateSpecDiff(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInst } // Send Modify Spec request -func (c *client) ModifyInstanceSpec(id string, req *aliredis.ModifyInstanceSpecRequest) error { +func (c *client) ModifyInstanceSpecs(id string, req *aliredis.ModifyInstanceSpecRequest) error { req.InstanceId = id _, err := c.redisCli.ModifyInstanceSpec(req) return CleanError(err) } +// Check if the Parameter configuration needs to be updated +// Return empty string if there is no difference, else return the modify instance param request +func ParamsNeedUpdate(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) *aliredis.ModifyInstanceParameterRequest { + return calculateParamDiff(attr, p) +} + +// Calculate the difference between the resource parameter configuration and what's actually configured +func calculateParamDiff(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) *aliredis.ModifyInstanceParameterRequest { + return nil +} + +// Send Modify Param request +func (c *client) ModifyInstanceParams(id string, req *aliredis.ModifyInstanceParameterRequest) error { + req.InstanceId = id + _, err := c.redisCli.ModifyInstanceParameter(req) + return CleanError(err) +} + // 2024-05-14: Henry // Try to remove requestID from AliCloud SDK errors // Returning error with requestID will cause Crossplane reconciler to treat the errors diff --git a/pkg/controller/redis/redis_instance.go b/pkg/controller/redis/redis_instance.go index 3125832..ae6d7b7 100644 --- a/pkg/controller/redis/redis_instance.go +++ b/pkg/controller/redis/redis_instance.go @@ -188,19 +188,21 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex var securityIpsNeedUpdate bool var specsNeedUpdate bool + var paramsNeedUpdate bool if cr.Status.AtProvider.InstanceStatus == v1alpha1.RedisInstanceStateRunning { - // TODO: Check for Spec update + // Check for Spec update + paramsNeedUpdate = redis.ParamsNeedUpdate(resp, &cr.Spec.ForProvider) != nil - // TODO: Check for parameter update + // Check for parameter update specsNeedUpdate = redis.SpecsNeedUpdate(resp, &cr.Spec.ForProvider) != nil // Check for whitelist IPs update - securityIpsNeedUpdate = redis.SecurityIpsNeedUpdate(resp, &cr.Spec.ForProvider) + securityIpsNeedUpdate = redis.SecurityIpsNeedUpdate(resp, &cr.Spec.ForProvider) != nil } return managed.ExternalObservation{ ResourceExists: true, - ResourceUpToDate: !securityIpsNeedUpdate && !specsNeedUpdate, + ResourceUpToDate: !securityIpsNeedUpdate && !specsNeedUpdate && !paramsNeedUpdate, ConnectionDetails: getConnectionDetails(conn), }, nil } @@ -245,21 +247,23 @@ func (e *external) Update(ctx context.Context, mg resource.Managed) (managed.Ext return managed.ExternalUpdate{}, nil } - // TODO: Check and update spec if needed + // Check and update spec if needed specsUpdateRequest := redis.SpecsNeedUpdate(resp, &cr.Spec.ForProvider) if specsUpdateRequest != nil { - err = e.redisClient.ModifyInstanceSpec(instanceId, specsUpdateRequest) + err = e.redisClient.ModifyInstanceSpecs(instanceId, specsUpdateRequest) if err != nil { return managed.ExternalUpdate{}, errors.Wrap(err, errInstanceUpdateSpecFailed) } return managed.ExternalUpdate{}, nil } - // TODO: Check and update parameters if needed + // Check and update parameters if needed + // paramsNeedUpdate := // Check and update security IPs if needed - if redis.SecurityIpsNeedUpdate(resp, &cr.Spec.ForProvider) { - err = e.redisClient.ModifySecurityIps(instanceId, cr.Spec.ForProvider.SecurityIps) + securityIpsUpdate := redis.SecurityIpsNeedUpdate(resp, &cr.Spec.ForProvider) + if securityIpsUpdate != nil { + err = e.redisClient.ModifySecurityIps(instanceId, securityIpsUpdate) if err != nil { return managed.ExternalUpdate{}, errors.Wrap(err, errInstanceUpdateIPFailed) } diff --git a/pkg/controller/redis/redisinstance_test.go b/pkg/controller/redis/redisinstance_test.go index 715d0de..20661b6 100644 --- a/pkg/controller/redis/redisinstance_test.go +++ b/pkg/controller/redis/redisinstance_test.go @@ -634,23 +634,23 @@ func (c *fakeRedisClient) DeleteInstance(id string) error { return nil } -func (c *fakeRedisClient) UpdateInstance(id string, req *redis.ModifyRedisInstanceRequest) error { +func (c *fakeRedisClient) ModifySecurityIps(id string, req *aliredis.ModifySecurityIpsRequest) error { if id != testId { - return errors.New("Update: client doesn't work") + return errors.New("ModifySecurityIps: client doesn't work") } return nil } -func (c *fakeRedisClient) ModifySecurityIps(id string, ips string) error { +func (c *fakeRedisClient) ModifyInstanceSpecs(id string, req *aliredis.ModifyInstanceSpecRequest) error { if id != testId { - return errors.New("ModifySecurityIps: client doesn't work") + return errors.New("ModifyInstanceSpecs: client doesn't work") } return nil } -func (c *fakeRedisClient) ModifyInstanceSpec(id string, req *aliredis.ModifyInstanceSpecRequest) error { +func (c *fakeRedisClient) ModifyInstanceParams(id string, req *aliredis.ModifyInstanceParameterRequest) error { if id != testId { - return errors.New("ModifyInstanceSpec: client doesn't work") + return errors.New("ModifyInstanceParams: client doesn't work") } return nil } From 9ccb815e8fe1d7987545db83c6b725fc68cdfe95 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Tue, 4 Jun 2024 16:29:03 -0700 Subject: [PATCH 25/30] add param change support Signed-off-by: Henry Zeng --- apis/redis/v1alpha1/redis_types.go | 8 +++ ....alibaba.crossplane.io_redisinstances.yaml | 6 ++ pkg/clients/redis/redis.go | 59 ++++++++++++++++--- pkg/controller/redis/redis_instance.go | 47 ++++++++++----- 4 files changed, 97 insertions(+), 23 deletions(-) diff --git a/apis/redis/v1alpha1/redis_types.go b/apis/redis/v1alpha1/redis_types.go index 2b59ca9..23a186b 100644 --- a/apis/redis/v1alpha1/redis_types.go +++ b/apis/redis/v1alpha1/redis_types.go @@ -351,7 +351,15 @@ type RedisInstanceParameters struct { // Valid values: // Immediately (default): The configurations are immediately changed // MaintainTime: The configurations are changed within the maintenance window. + // +optional EffectiveTime string `json:"effectiveTime,omitempty"` + + // The instance parameter settings that you want to modify. + // Specify this parameter in the JSON format. + // The new value of a parameter overwrites the original value. + // Supported parameters can be found here: https://www.alibabacloud.com/help/en/redis/user-guide/supported-parameters + // +optional + ParameterConfig string `json:"parameterConfig,omitempty"` } // RedisInstanceObservation is the representation of the current state that is observed. diff --git a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml index 2ff5a0f..b9631e6 100644 --- a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml +++ b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml @@ -190,6 +190,12 @@ spec: description: The parameter template ID, which must be globally unique. type: string + parameterConfig: + description: 'The instance parameter settings that you want to + modify. Specify this parameter in the JSON format. The new value + of a parameter overwrites the original value. Supported parameters + can be found here: https://www.alibabacloud.com/help/en/redis/user-guide/supported-parameters' + type: string password: description: 'The password that is used to connect to the instance. The password must be 8 to 32 characters in length and must contain diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index d1f102b..bc7768a 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -46,10 +46,13 @@ const ( DefaultEffectiveTime = "Immediately" // Errors - errInstanceNotFound = "InstanceNotFound" - errInstanceNotFoundCode = "InvalidInstanceId.NotFound" - errDescribeInstanceFailed = "cannot describe instance attributes" - errGeneratePasswordFailed = "cannot generate a password" + errInstanceNotFound = "InstanceNotFound" + errInstanceNotFoundCode = "InvalidInstanceId.NotFound" + errDescribeInstanceFailed = "cannot describe instance attributes" + errGeneratePasswordFailed = "cannot generate a password" + errFailedToUnmarshalWantedConfig = "cannot unmarshal the json config from users input" + errFailedToUnmarshalRealConfig = "cannot unmarshal the json config from the real instance" + errFailedToMarshalConfig = "cannot marshal the json config for the update params request" ) // Same server error but without requestID @@ -339,13 +342,55 @@ func (c *client) ModifyInstanceSpecs(id string, req *aliredis.ModifyInstanceSpec // Check if the Parameter configuration needs to be updated // Return empty string if there is no difference, else return the modify instance param request -func ParamsNeedUpdate(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) *aliredis.ModifyInstanceParameterRequest { +func ParamsNeedUpdate(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) (*aliredis.ModifyInstanceParameterRequest, error) { return calculateParamDiff(attr, p) } // Calculate the difference between the resource parameter configuration and what's actually configured -func calculateParamDiff(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) *aliredis.ModifyInstanceParameterRequest { - return nil +func calculateParamDiff(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) (*aliredis.ModifyInstanceParameterRequest, error) { + if p.ParameterConfig == "" { + return nil, nil + } + + var actual, wanted map[string]string + var err error + err = json.Unmarshal([]byte(attr.Config), &actual) + if err != nil { + return nil, errors.Wrap(err, errFailedToUnmarshalRealConfig) + } + + err = json.Unmarshal([]byte(p.ParameterConfig), &wanted) + if err != nil { + return nil, errors.Wrap(err, errFailedToUnmarshalWantedConfig) + } + + needUpdate := false + for key, val := range wanted { + actualVal, ok := actual[key] + // Update if the param is different + if ok && actualVal != val { + actual[key] = val + needUpdate = true + } + // Create if the param does not exist + if !ok { + actual[key] = val + needUpdate = true + } + } + + configStr, err := json.Marshal(actual) + if err != nil { + return nil, errors.Wrap(err, errFailedToMarshalConfig) + } + + if needUpdate { + req := aliredis.CreateModifyInstanceParameterRequest() + req.Parameters = string(configStr) + return req, nil + } + + return nil, nil } // Send Modify Param request diff --git a/pkg/controller/redis/redis_instance.go b/pkg/controller/redis/redis_instance.go index ae6d7b7..57d14f7 100644 --- a/pkg/controller/redis/redis_instance.go +++ b/pkg/controller/redis/redis_instance.go @@ -42,18 +42,19 @@ const ( // Fall to connection instance error description errCreateInstanceConnectionFailed = "cannot instance connection" - errNotInstance = "managed resource is not an instance custom resource" - errNoProvider = "no provider config or provider specified" - errCreateClient = "cannot create redis client" - errGetProviderConfig = "cannot get provider config" - errTrackUsage = "cannot track provider config usage" - errNoConnectionSecret = "no connection secret specified" - errGetConnectionSecret = "cannot get connection secret" - errInstanceIdEmpty = "instance id is empty, maybe it's not created" - errInstanceAlreadyCreated = "instance id is not empty, maybe it's already been created" - errStatusUpdate = "failed to update CR status" - errInstanceUpdateIPFailed = "failed to update instance security IP list" - errInstanceUpdateSpecFailed = "failed to update instance spec" + errNotInstance = "managed resource is not an instance custom resource" + errNoProvider = "no provider config or provider specified" + errCreateClient = "cannot create redis client" + errGetProviderConfig = "cannot get provider config" + errTrackUsage = "cannot track provider config usage" + errNoConnectionSecret = "no connection secret specified" + errGetConnectionSecret = "cannot get connection secret" + errInstanceIdEmpty = "instance id is empty, maybe it's not created" + errInstanceAlreadyCreated = "instance id is not empty, maybe it's already been created" + errStatusUpdate = "failed to update CR status" + errInstanceUpdateIPFailed = "failed to update instance security IP list" + errInstanceUpdateSpecFailed = "failed to update instance spec" + errInstanceUpdateParamFailed = "failed to update instance parameters" errCreateFailed = "cannot create redis instance" errCreateAccountFailed = "cannot create redis account" @@ -191,10 +192,14 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex var paramsNeedUpdate bool if cr.Status.AtProvider.InstanceStatus == v1alpha1.RedisInstanceStateRunning { // Check for Spec update - paramsNeedUpdate = redis.ParamsNeedUpdate(resp, &cr.Spec.ForProvider) != nil + specsNeedUpdate = redis.SpecsNeedUpdate(resp, &cr.Spec.ForProvider) != nil // Check for parameter update - specsNeedUpdate = redis.SpecsNeedUpdate(resp, &cr.Spec.ForProvider) != nil + paramsUpdateRequest, err := redis.ParamsNeedUpdate(resp, &cr.Spec.ForProvider) + if err != nil { + return managed.ExternalObservation{}, err + } + paramsNeedUpdate = paramsUpdateRequest != nil // Check for whitelist IPs update securityIpsNeedUpdate = redis.SecurityIpsNeedUpdate(resp, &cr.Spec.ForProvider) != nil @@ -258,7 +263,18 @@ func (e *external) Update(ctx context.Context, mg resource.Managed) (managed.Ext } // Check and update parameters if needed - // paramsNeedUpdate := + paramsUpdateRequest, err := redis.ParamsNeedUpdate(resp, &cr.Spec.ForProvider) + if err != nil { + return managed.ExternalUpdate{}, err + } + + if paramsUpdateRequest != nil { + err = e.redisClient.ModifyInstanceParams(instanceId, paramsUpdateRequest) + if err != nil { + return managed.ExternalUpdate{}, errors.Wrap(err, errInstanceUpdateParamFailed) + } + return managed.ExternalUpdate{}, nil + } // Check and update security IPs if needed securityIpsUpdate := redis.SecurityIpsNeedUpdate(resp, &cr.Spec.ForProvider) @@ -267,7 +283,6 @@ func (e *external) Update(ctx context.Context, mg resource.Managed) (managed.Ext if err != nil { return managed.ExternalUpdate{}, errors.Wrap(err, errInstanceUpdateIPFailed) } - return managed.ExternalUpdate{}, nil } From 2e794c5fd0eb0ad1ff26baa1e92fb03a08ce5ff8 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Tue, 4 Jun 2024 16:37:22 -0700 Subject: [PATCH 26/30] use RealInstanceClass for cluster redis update' Signed-off-by: Henry Zeng --- pkg/clients/redis/redis.go | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index bc7768a..912d0b1 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -45,6 +45,11 @@ const ( EffectiveTimeMaintain = "MaintainTime" DefaultEffectiveTime = "Immediately" + // Architecture type + RedisArchTypeCluster = "cluster" + RedisArchTypeStandard = "standard" + RedisArchTypeRWSplit = "rwsplit" + // Errors errInstanceNotFound = "InstanceNotFound" errInstanceNotFoundCode = "InvalidInstanceId.NotFound" @@ -315,9 +320,17 @@ func calculateSpecDiff(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInst diff.EffectiveTime = p.EffectiveTime } - if attr.InstanceClass != p.InstanceClass { - diff.InstanceClass = p.InstanceClass - return diff + // The real instance class should be in the RealInstanceClass parameter if it's a sharded instance + if attr.ArchitectureType == RedisArchTypeCluster { + if attr.RealInstanceClass != p.InstanceClass { + diff.InstanceClass = p.InstanceClass + return diff + } + } else { + if attr.InstanceClass != p.InstanceClass { + diff.InstanceClass = p.InstanceClass + return diff + } } if p.ShardCount != nil && attr.ShardCount != *p.ShardCount { From dd044156e24735dad8d4820b34518ae118d48cc3 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Tue, 4 Jun 2024 16:41:50 -0700 Subject: [PATCH 27/30] remove shard updating from spec update Signed-off-by: Henry Zeng --- pkg/clients/redis/redis.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index 912d0b1..8af1cf7 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -310,8 +310,8 @@ func SpecsNeedUpdate(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstan } // Calculate the difference between the resource spec and what's actually configured -// Note that Major and Minor versions should be set by separate calls // Only support certain updates on specs, and we update the specs one by one to avoid conflicts +// Note that Major and Minor versions, adding or deleting shards should be set by separate calls func calculateSpecDiff(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) *aliredis.ModifyInstanceSpecRequest { diff := aliredis.CreateModifyInstanceSpecRequest() @@ -333,11 +333,6 @@ func calculateSpecDiff(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInst } } - if p.ShardCount != nil && attr.ShardCount != *p.ShardCount { - diff.ShardCount = requests.NewInteger(*p.ShardCount) - return diff - } - if p.ReadOnlyCount != nil && attr.ReadOnlyCount != *p.ReadOnlyCount { diff.ReadOnlyCount = requests.NewInteger(*p.ReadOnlyCount) return diff From 36d0d616ca715cd04c6a13fa0f431fdbe054b6b7 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Tue, 4 Jun 2024 22:35:07 -0700 Subject: [PATCH 28/30] fix parameter updates; add more entried in observation Signed-off-by: Henry Zeng --- apis/redis/v1alpha1/redis_types.go | 26 +++++++++++ ....alibaba.crossplane.io_redisinstances.yaml | 28 ++++++++++++ pkg/clients/redis/redis.go | 44 ++++++++++--------- pkg/controller/redis/redis_instance.go | 4 ++ pkg/controller/redis/redisinstance_test.go | 2 +- 5 files changed, 83 insertions(+), 21 deletions(-) diff --git a/apis/redis/v1alpha1/redis_types.go b/apis/redis/v1alpha1/redis_types.go index 23a186b..383891a 100644 --- a/apis/redis/v1alpha1/redis_types.go +++ b/apis/redis/v1alpha1/redis_types.go @@ -372,4 +372,30 @@ type RedisInstanceObservation struct { // Port contains the port number used to connect with the Redis instance Port string `json:"port,omitempty"` + + // Indicates whether password authentication is enabled. Valid values: + // Open: Password authentication is enabled. + // Close: Password authentication is disabled and password-free access is enabled. + VpcAuthMode string `json:"vpcAuthMode,omitempty"` + + // The architecture of the instance. Valid values: + // cluster: cluster architecture + // standard: standard architecture + // rwsplit: read/write splitting architecture + ArchitectureType string `json:"architectureType,omitempty"` + + // The parameter configurations of the instance in the JSON format. + // For more information, see Parameter descriptions: https://www.alibabacloud.com/help/en/redis/user-guide/supported-parameters + Config string `json:"config,omitempty"` + + // The IP addresses in the whitelist. + SecurityIPList string `json:"securityIPList,omitempty"` + + // The instance type + InstanceClass string `json:"instanceClass,omitempty"` + + // If the instance is a cluster instance that uses cloud disks, + // this parameter indicates the actual instance type of individual shards in the instance. + // The InstanceClass parameter indicates the virtual instance type. + RealInstanceClass string `json:"realInstanceClass,omitempty"` } diff --git a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml index b9631e6..d0584de 100644 --- a/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml +++ b/package/crds/redis.alibaba.crossplane.io_redisinstances.yaml @@ -355,14 +355,42 @@ spec: description: InstanceStatus specifies the current state of this database. type: string + architectureType: + description: 'The architecture of the instance. Valid values: + cluster: cluster architecture standard: standard architecture + rwsplit: read/write splitting architecture' + type: string + config: + description: 'The parameter configurations of the instance in + the JSON format. For more information, see Parameter descriptions: + https://www.alibabacloud.com/help/en/redis/user-guide/supported-parameters' + type: string connectionDomain: description: ConnectionDomain contains domain name used to connect with the Redis instance type: string + instanceClass: + description: The instance type + type: string port: description: Port contains the port number used to connect with the Redis instance type: string + realInstanceClass: + description: If the instance is a cluster instance that uses cloud + disks, this parameter indicates the actual instance type of + individual shards in the instance. The InstanceClass parameter + indicates the virtual instance type. + type: string + securityIPList: + description: The IP addresses in the whitelist. + type: string + vpcAuthMode: + description: 'Indicates whether password authentication is enabled. + Valid values: Open: Password authentication is enabled. Close: + Password authentication is disabled and password-free access + is enabled.' + type: string type: object conditions: description: Conditions of the resource. diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index 8af1cf7..86c5442 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -19,6 +19,7 @@ package redis import ( "context" "encoding/json" + "fmt" "strconv" "strings" "time" @@ -76,7 +77,7 @@ type Client interface { DeleteInstance(id string) error ModifyInstanceSpecs(id string, req *aliredis.ModifyInstanceSpecRequest) error - ModifyInstanceParams(id string, req *aliredis.ModifyInstanceParameterRequest) error + ModifyInstanceParams(id string, req *aliredis.ModifyInstanceConfigRequest) error ModifySecurityIps(id string, req *aliredis.ModifySecurityIpsRequest) error } @@ -231,9 +232,15 @@ func (c *client) DeleteInstance(id string) error { // redis.DBInstance. func GenerateObservation(attr *aliredis.DBInstanceAttribute) v1alpha1.RedisInstanceObservation { return v1alpha1.RedisInstanceObservation{ - InstanceStatus: attr.InstanceStatus, - ConnectionDomain: attr.ConnectionDomain, - Port: strconv.FormatInt(attr.Port, 10), + InstanceStatus: attr.InstanceStatus, + ConnectionDomain: attr.ConnectionDomain, + Port: strconv.FormatInt(attr.Port, 10), + VpcAuthMode: attr.VpcAuthMode, + ArchitectureType: attr.ArchitectureType, + Config: attr.Config, + SecurityIPList: attr.SecurityIPList, + InstanceClass: attr.InstanceClass, + RealInstanceClass: attr.RealInstanceClass, } } @@ -350,17 +357,17 @@ func (c *client) ModifyInstanceSpecs(id string, req *aliredis.ModifyInstanceSpec // Check if the Parameter configuration needs to be updated // Return empty string if there is no difference, else return the modify instance param request -func ParamsNeedUpdate(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) (*aliredis.ModifyInstanceParameterRequest, error) { +func ParamsNeedUpdate(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) (*aliredis.ModifyInstanceConfigRequest, error) { return calculateParamDiff(attr, p) } // Calculate the difference between the resource parameter configuration and what's actually configured -func calculateParamDiff(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) (*aliredis.ModifyInstanceParameterRequest, error) { +func calculateParamDiff(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisInstanceParameters) (*aliredis.ModifyInstanceConfigRequest, error) { if p.ParameterConfig == "" { return nil, nil } - var actual, wanted map[string]string + var actual, wanted, diff map[string]interface{} var err error err = json.Unmarshal([]byte(attr.Config), &actual) if err != nil { @@ -373,28 +380,24 @@ func calculateParamDiff(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisIns } needUpdate := false + diff = make(map[string]interface{}) for key, val := range wanted { actualVal, ok := actual[key] - // Update if the param is different - if ok && actualVal != val { - actual[key] = val - needUpdate = true - } - // Create if the param does not exist - if !ok { - actual[key] = val + // Update if the param is different, Or Create if the param does not exist + if (ok && actualVal != val) || !ok { + diff[key] = val needUpdate = true } } - configStr, err := json.Marshal(actual) + configStr, err := json.Marshal(diff) if err != nil { return nil, errors.Wrap(err, errFailedToMarshalConfig) } if needUpdate { - req := aliredis.CreateModifyInstanceParameterRequest() - req.Parameters = string(configStr) + req := aliredis.CreateModifyInstanceConfigRequest() + req.Config = string(configStr) return req, nil } @@ -402,9 +405,10 @@ func calculateParamDiff(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisIns } // Send Modify Param request -func (c *client) ModifyInstanceParams(id string, req *aliredis.ModifyInstanceParameterRequest) error { +func (c *client) ModifyInstanceParams(id string, req *aliredis.ModifyInstanceConfigRequest) error { req.InstanceId = id - _, err := c.redisCli.ModifyInstanceParameter(req) + println(fmt.Sprintf("Config is about to be updated: %s", req.Config)) + _, err := c.redisCli.ModifyInstanceConfig(req) return CleanError(err) } diff --git a/pkg/controller/redis/redis_instance.go b/pkg/controller/redis/redis_instance.go index 57d14f7..57c3586 100644 --- a/pkg/controller/redis/redis_instance.go +++ b/pkg/controller/redis/redis_instance.go @@ -194,6 +194,10 @@ func (e *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex // Check for Spec update specsNeedUpdate = redis.SpecsNeedUpdate(resp, &cr.Spec.ForProvider) != nil + // TODO: Check for Sharding update + + // TODO: Check for Version update + // Check for parameter update paramsUpdateRequest, err := redis.ParamsNeedUpdate(resp, &cr.Spec.ForProvider) if err != nil { diff --git a/pkg/controller/redis/redisinstance_test.go b/pkg/controller/redis/redisinstance_test.go index 20661b6..0fe3243 100644 --- a/pkg/controller/redis/redisinstance_test.go +++ b/pkg/controller/redis/redisinstance_test.go @@ -648,7 +648,7 @@ func (c *fakeRedisClient) ModifyInstanceSpecs(id string, req *aliredis.ModifyIns return nil } -func (c *fakeRedisClient) ModifyInstanceParams(id string, req *aliredis.ModifyInstanceParameterRequest) error { +func (c *fakeRedisClient) ModifyInstanceParams(id string, req *aliredis.ModifyInstanceConfigRequest) error { if id != testId { return errors.New("ModifyInstanceParams: client doesn't work") } From ef586cb70731516955dfadc8c65bc43fc5304da6 Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Tue, 4 Jun 2024 22:42:45 -0700 Subject: [PATCH 29/30] remove logging for testing Signed-off-by: Henry Zeng --- pkg/clients/redis/redis.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/clients/redis/redis.go b/pkg/clients/redis/redis.go index 86c5442..ef7c9be 100644 --- a/pkg/clients/redis/redis.go +++ b/pkg/clients/redis/redis.go @@ -19,7 +19,6 @@ package redis import ( "context" "encoding/json" - "fmt" "strconv" "strings" "time" @@ -407,7 +406,6 @@ func calculateParamDiff(attr *aliredis.DBInstanceAttribute, p *v1alpha1.RedisIns // Send Modify Param request func (c *client) ModifyInstanceParams(id string, req *aliredis.ModifyInstanceConfigRequest) error { req.InstanceId = id - println(fmt.Sprintf("Config is about to be updated: %s", req.Config)) _, err := c.redisCli.ModifyInstanceConfig(req) return CleanError(err) } From cb73e27cc163dede5da57a9ba10ec51153278c8c Mon Sep 17 00:00:00 2001 From: Henry Zeng Date: Fri, 5 Jul 2024 10:28:45 -0700 Subject: [PATCH 30/30] remove DS_Store file --- .gitignore | 2 ++ package/.DS_Store | Bin 6148 -> 0 bytes 2 files changed, 2 insertions(+) delete mode 100644 package/.DS_Store diff --git a/.gitignore b/.gitignore index 64f1304..36a7fa7 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ cover.out # ignore IDE folders .vscode/ .idea/ + +.DS_Store diff --git a/package/.DS_Store b/package/.DS_Store deleted file mode 100644 index 8d25c0c33b58e81b4be9f0aed7e6a782fd98352f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~F$w}f3`G;&La^D=avBfd4F=H@>;(h`8(BfodXDZ-CJ2t!BJu;tpJXO1`-+{7 zi0JxuSc&u^GJ~7S(n4d3ypz3L4M3`}dgXhH(h?7~0-B+w9;*1Wg-e+&OK|2Hj6Nq_|Y zjDU8VVY9|d#ohY$dRE^>)z$?L_2URHKLJSWDqg_du%B!J&7q|#Dlq;CI0gn1_$q-1 DHXRbb