diff --git a/slime-modules/limiter/.gitignore b/slime-modules/limiter/.gitignore deleted file mode 100644 index d97ffc51..00000000 --- a/slime-modules/limiter/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ - -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib -bin - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Kubernetes Generated files - skip generated files, except for vendored files - -!vendor/**/zz_generated.* - -# editor and IDE paraphernalia -.idea -*.swp -*.swo -*~ diff --git a/slime-modules/limiter/Dockerfile b/slime-modules/limiter/Dockerfile deleted file mode 100644 index 13899f90..00000000 --- a/slime-modules/limiter/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -# Use distroless as minimal base image to package the manager binary -# Refer to https://github.com/GoogleContainerTools/distroless for more details -FROM ubuntu:bionic -WORKDIR / -COPY manager.exe ./manager - -ENTRYPOINT ["/manager"] - - diff --git a/slime-modules/limiter/PROJECT b/slime-modules/limiter/PROJECT deleted file mode 100644 index df0778c0..00000000 --- a/slime-modules/limiter/PROJECT +++ /dev/null @@ -1,11 +0,0 @@ -domain: my.domain -multigroup: true -repo: slime.io/slime -resources: -- group: microservice.slime.io - kind: SmartLimiter - version: v1alpha1 -- group: networking.istio.io - kind: DestinationRule - version: v1alpha3 -version: "2" diff --git a/slime-modules/limiter/VERSION b/slime-modules/limiter/VERSION deleted file mode 100644 index 576b7771..00000000 --- a/slime-modules/limiter/VERSION +++ /dev/null @@ -1 +0,0 @@ -v0.2.3 diff --git a/slime-modules/limiter/api/v1alpha1/groupversion_info.go b/slime-modules/limiter/api/v1alpha1/groupversion_info.go deleted file mode 100644 index 5bd5f692..00000000 --- a/slime-modules/limiter/api/v1alpha1/groupversion_info.go +++ /dev/null @@ -1,36 +0,0 @@ -/* - - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package v1alpha1 contains API Schema definitions for the microservice.slime.io v1alpha1 API group -// +kubebuilder:object:generate=true -// +groupName=microservice.slime.io -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -var ( - // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "microservice.slime.io", Version: "v1alpha1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme -) diff --git a/slime-modules/limiter/api/v1alpha1/smart_limiter.pb.go b/slime-modules/limiter/api/v1alpha1/smart_limiter.pb.go deleted file mode 100644 index 049a86b3..00000000 --- a/slime-modules/limiter/api/v1alpha1/smart_limiter.pb.go +++ /dev/null @@ -1,622 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/v1alpha1/smart_limiter.proto - -package v1alpha1 - -import ( - fmt "fmt" - math "math" - - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -type SmartLimiterSpec struct { - Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` - // subset rate-limit,the key is subset name. - Sets map[string]*SmartLimitDescriptors `protobuf:"bytes,2,rep,name=sets,proto3" json:"sets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SmartLimiterSpec) Reset() { *m = SmartLimiterSpec{} } -func (m *SmartLimiterSpec) String() string { return proto.CompactTextString(m) } -func (*SmartLimiterSpec) ProtoMessage() {} -func (*SmartLimiterSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83a0b1a1f579dff8, []int{0} -} - -func (m *SmartLimiterSpec) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SmartLimiterSpec.Unmarshal(m, b) -} - -func (m *SmartLimiterSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SmartLimiterSpec.Marshal(b, m, deterministic) -} - -func (m *SmartLimiterSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_SmartLimiterSpec.Merge(m, src) -} - -func (m *SmartLimiterSpec) XXX_Size() int { - return xxx_messageInfo_SmartLimiterSpec.Size(m) -} - -func (m *SmartLimiterSpec) XXX_DiscardUnknown() { - xxx_messageInfo_SmartLimiterSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_SmartLimiterSpec proto.InternalMessageInfo - -func (m *SmartLimiterSpec) GetDomain() string { - if m != nil { - return m.Domain - } - return "" -} - -func (m *SmartLimiterSpec) GetSets() map[string]*SmartLimitDescriptors { - if m != nil { - return m.Sets - } - return nil -} - -type SmartLimiterStatus struct { - RatelimitStatus map[string]*SmartLimitDescriptors `protobuf:"bytes,1,rep,name=ratelimitStatus,proto3" json:"ratelimitStatus,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MetricStatus map[string]string `protobuf:"bytes,2,rep,name=metricStatus,proto3" json:"metricStatus,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Deprecated - ServiceStatus *SmartLimiterStatus_ServiceStatus `protobuf:"bytes,3,opt,name=serviceStatus,proto3" json:"serviceStatus,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SmartLimiterStatus) Reset() { *m = SmartLimiterStatus{} } -func (m *SmartLimiterStatus) String() string { return proto.CompactTextString(m) } -func (*SmartLimiterStatus) ProtoMessage() {} -func (*SmartLimiterStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83a0b1a1f579dff8, []int{1} -} - -func (m *SmartLimiterStatus) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SmartLimiterStatus.Unmarshal(m, b) -} - -func (m *SmartLimiterStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SmartLimiterStatus.Marshal(b, m, deterministic) -} - -func (m *SmartLimiterStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SmartLimiterStatus.Merge(m, src) -} - -func (m *SmartLimiterStatus) XXX_Size() int { - return xxx_messageInfo_SmartLimiterStatus.Size(m) -} - -func (m *SmartLimiterStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SmartLimiterStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_SmartLimiterStatus proto.InternalMessageInfo - -func (m *SmartLimiterStatus) GetRatelimitStatus() map[string]*SmartLimitDescriptors { - if m != nil { - return m.RatelimitStatus - } - return nil -} - -func (m *SmartLimiterStatus) GetMetricStatus() map[string]string { - if m != nil { - return m.MetricStatus - } - return nil -} - -func (m *SmartLimiterStatus) GetServiceStatus() *SmartLimiterStatus_ServiceStatus { - if m != nil { - return m.ServiceStatus - } - return nil -} - -type SmartLimiterStatus_ServiceStatus struct { - // Deprecated - Selector map[string]string `protobuf:"bytes,1,rep,name=selector,proto3" json:"selector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Deprecated - Listener []*SmartLimiterStatus_ServiceStatus_Listener `protobuf:"bytes,2,rep,name=listener,proto3" json:"listener,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SmartLimiterStatus_ServiceStatus) Reset() { *m = SmartLimiterStatus_ServiceStatus{} } -func (m *SmartLimiterStatus_ServiceStatus) String() string { return proto.CompactTextString(m) } -func (*SmartLimiterStatus_ServiceStatus) ProtoMessage() {} -func (*SmartLimiterStatus_ServiceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83a0b1a1f579dff8, []int{1, 2} -} - -func (m *SmartLimiterStatus_ServiceStatus) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SmartLimiterStatus_ServiceStatus.Unmarshal(m, b) -} - -func (m *SmartLimiterStatus_ServiceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SmartLimiterStatus_ServiceStatus.Marshal(b, m, deterministic) -} - -func (m *SmartLimiterStatus_ServiceStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SmartLimiterStatus_ServiceStatus.Merge(m, src) -} - -func (m *SmartLimiterStatus_ServiceStatus) XXX_Size() int { - return xxx_messageInfo_SmartLimiterStatus_ServiceStatus.Size(m) -} - -func (m *SmartLimiterStatus_ServiceStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SmartLimiterStatus_ServiceStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_SmartLimiterStatus_ServiceStatus proto.InternalMessageInfo - -func (m *SmartLimiterStatus_ServiceStatus) GetSelector() map[string]string { - if m != nil { - return m.Selector - } - return nil -} - -func (m *SmartLimiterStatus_ServiceStatus) GetListener() []*SmartLimiterStatus_ServiceStatus_Listener { - if m != nil { - return m.Listener - } - return nil -} - -type SmartLimiterStatus_ServiceStatus_Listener struct { - // Deprecated - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Deprecated - Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SmartLimiterStatus_ServiceStatus_Listener) Reset() { - *m = SmartLimiterStatus_ServiceStatus_Listener{} -} - -func (m *SmartLimiterStatus_ServiceStatus_Listener) String() string { - return proto.CompactTextString(m) -} -func (*SmartLimiterStatus_ServiceStatus_Listener) ProtoMessage() {} -func (*SmartLimiterStatus_ServiceStatus_Listener) Descriptor() ([]byte, []int) { - return fileDescriptor_83a0b1a1f579dff8, []int{1, 2, 1} -} - -func (m *SmartLimiterStatus_ServiceStatus_Listener) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SmartLimiterStatus_ServiceStatus_Listener.Unmarshal(m, b) -} - -func (m *SmartLimiterStatus_ServiceStatus_Listener) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SmartLimiterStatus_ServiceStatus_Listener.Marshal(b, m, deterministic) -} - -func (m *SmartLimiterStatus_ServiceStatus_Listener) XXX_Merge(src proto.Message) { - xxx_messageInfo_SmartLimiterStatus_ServiceStatus_Listener.Merge(m, src) -} - -func (m *SmartLimiterStatus_ServiceStatus_Listener) XXX_Size() int { - return xxx_messageInfo_SmartLimiterStatus_ServiceStatus_Listener.Size(m) -} - -func (m *SmartLimiterStatus_ServiceStatus_Listener) XXX_DiscardUnknown() { - xxx_messageInfo_SmartLimiterStatus_ServiceStatus_Listener.DiscardUnknown(m) -} - -var xxx_messageInfo_SmartLimiterStatus_ServiceStatus_Listener proto.InternalMessageInfo - -func (m *SmartLimiterStatus_ServiceStatus_Listener) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *SmartLimiterStatus_ServiceStatus_Listener) GetPort() uint32 { - if m != nil { - return m.Port - } - return 0 -} - -type SmartLimitDescriptor struct { - // rate-limit departure conditions, which can be a template expression. - // When the expression value is true, the limit will be triggered - Condition string `protobuf:"bytes,2,opt,name=condition,proto3" json:"condition,omitempty"` - // Limited traffic behavior - Action *SmartLimitDescriptor_Action `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` - // not support - Match []*SmartLimitDescriptor_HeaderMatcher `protobuf:"bytes,4,rep,name=match,proto3" json:"match,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SmartLimitDescriptor) Reset() { *m = SmartLimitDescriptor{} } -func (m *SmartLimitDescriptor) String() string { return proto.CompactTextString(m) } -func (*SmartLimitDescriptor) ProtoMessage() {} -func (*SmartLimitDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_83a0b1a1f579dff8, []int{2} -} - -func (m *SmartLimitDescriptor) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SmartLimitDescriptor.Unmarshal(m, b) -} - -func (m *SmartLimitDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SmartLimitDescriptor.Marshal(b, m, deterministic) -} - -func (m *SmartLimitDescriptor) XXX_Merge(src proto.Message) { - xxx_messageInfo_SmartLimitDescriptor.Merge(m, src) -} - -func (m *SmartLimitDescriptor) XXX_Size() int { - return xxx_messageInfo_SmartLimitDescriptor.Size(m) -} - -func (m *SmartLimitDescriptor) XXX_DiscardUnknown() { - xxx_messageInfo_SmartLimitDescriptor.DiscardUnknown(m) -} - -var xxx_messageInfo_SmartLimitDescriptor proto.InternalMessageInfo - -func (m *SmartLimitDescriptor) GetCondition() string { - if m != nil { - return m.Condition - } - return "" -} - -func (m *SmartLimitDescriptor) GetAction() *SmartLimitDescriptor_Action { - if m != nil { - return m.Action - } - return nil -} - -func (m *SmartLimitDescriptor) GetMatch() []*SmartLimitDescriptor_HeaderMatcher { - if m != nil { - return m.Match - } - return nil -} - -type SmartLimitDescriptor_HeaderMatcher struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - ExactMatch string `protobuf:"bytes,2,opt,name=exact_match,json=exactMatch,proto3" json:"exact_match,omitempty"` - RegexMatch string `protobuf:"bytes,3,opt,name=regex_match,json=regexMatch,proto3" json:"regex_match,omitempty"` - PresentMatch bool `protobuf:"varint,7,opt,name=present_match,json=presentMatch,proto3" json:"present_match,omitempty"` - PrefixMatch string `protobuf:"bytes,9,opt,name=prefix_match,json=prefixMatch,proto3" json:"prefix_match,omitempty"` - SuffixMatch string `protobuf:"bytes,10,opt,name=suffix_match,json=suffixMatch,proto3" json:"suffix_match,omitempty"` - InvertMatch bool `protobuf:"varint,8,opt,name=invert_match,json=invertMatch,proto3" json:"invert_match,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SmartLimitDescriptor_HeaderMatcher) Reset() { *m = SmartLimitDescriptor_HeaderMatcher{} } -func (m *SmartLimitDescriptor_HeaderMatcher) String() string { return proto.CompactTextString(m) } -func (*SmartLimitDescriptor_HeaderMatcher) ProtoMessage() {} -func (*SmartLimitDescriptor_HeaderMatcher) Descriptor() ([]byte, []int) { - return fileDescriptor_83a0b1a1f579dff8, []int{2, 0} -} - -func (m *SmartLimitDescriptor_HeaderMatcher) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SmartLimitDescriptor_HeaderMatcher.Unmarshal(m, b) -} - -func (m *SmartLimitDescriptor_HeaderMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SmartLimitDescriptor_HeaderMatcher.Marshal(b, m, deterministic) -} - -func (m *SmartLimitDescriptor_HeaderMatcher) XXX_Merge(src proto.Message) { - xxx_messageInfo_SmartLimitDescriptor_HeaderMatcher.Merge(m, src) -} - -func (m *SmartLimitDescriptor_HeaderMatcher) XXX_Size() int { - return xxx_messageInfo_SmartLimitDescriptor_HeaderMatcher.Size(m) -} - -func (m *SmartLimitDescriptor_HeaderMatcher) XXX_DiscardUnknown() { - xxx_messageInfo_SmartLimitDescriptor_HeaderMatcher.DiscardUnknown(m) -} - -var xxx_messageInfo_SmartLimitDescriptor_HeaderMatcher proto.InternalMessageInfo - -func (m *SmartLimitDescriptor_HeaderMatcher) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *SmartLimitDescriptor_HeaderMatcher) GetExactMatch() string { - if m != nil { - return m.ExactMatch - } - return "" -} - -func (m *SmartLimitDescriptor_HeaderMatcher) GetRegexMatch() string { - if m != nil { - return m.RegexMatch - } - return "" -} - -func (m *SmartLimitDescriptor_HeaderMatcher) GetPresentMatch() bool { - if m != nil { - return m.PresentMatch - } - return false -} - -func (m *SmartLimitDescriptor_HeaderMatcher) GetPrefixMatch() string { - if m != nil { - return m.PrefixMatch - } - return "" -} - -func (m *SmartLimitDescriptor_HeaderMatcher) GetSuffixMatch() string { - if m != nil { - return m.SuffixMatch - } - return "" -} - -func (m *SmartLimitDescriptor_HeaderMatcher) GetInvertMatch() bool { - if m != nil { - return m.InvertMatch - } - return false -} - -type SmartLimitDescriptor_Action struct { - // rate-limit quota, which can be a template expression - Quota string `protobuf:"bytes,1,opt,name=quota,proto3" json:"quota,omitempty"` - FillInterval *Duration `protobuf:"bytes,2,opt,name=fill_interval,json=fillInterval,proto3" json:"fill_interval,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SmartLimitDescriptor_Action) Reset() { *m = SmartLimitDescriptor_Action{} } -func (m *SmartLimitDescriptor_Action) String() string { return proto.CompactTextString(m) } -func (*SmartLimitDescriptor_Action) ProtoMessage() {} -func (*SmartLimitDescriptor_Action) Descriptor() ([]byte, []int) { - return fileDescriptor_83a0b1a1f579dff8, []int{2, 1} -} - -func (m *SmartLimitDescriptor_Action) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SmartLimitDescriptor_Action.Unmarshal(m, b) -} - -func (m *SmartLimitDescriptor_Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SmartLimitDescriptor_Action.Marshal(b, m, deterministic) -} - -func (m *SmartLimitDescriptor_Action) XXX_Merge(src proto.Message) { - xxx_messageInfo_SmartLimitDescriptor_Action.Merge(m, src) -} - -func (m *SmartLimitDescriptor_Action) XXX_Size() int { - return xxx_messageInfo_SmartLimitDescriptor_Action.Size(m) -} - -func (m *SmartLimitDescriptor_Action) XXX_DiscardUnknown() { - xxx_messageInfo_SmartLimitDescriptor_Action.DiscardUnknown(m) -} - -var xxx_messageInfo_SmartLimitDescriptor_Action proto.InternalMessageInfo - -func (m *SmartLimitDescriptor_Action) GetQuota() string { - if m != nil { - return m.Quota - } - return "" -} - -func (m *SmartLimitDescriptor_Action) GetFillInterval() *Duration { - if m != nil { - return m.FillInterval - } - return nil -} - -type SmartLimitDescriptors struct { - // Description of current rate-limit - Descriptor_ []*SmartLimitDescriptor `protobuf:"bytes,4,rep,name=descriptor,proto3" json:"descriptor,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SmartLimitDescriptors) Reset() { *m = SmartLimitDescriptors{} } -func (m *SmartLimitDescriptors) String() string { return proto.CompactTextString(m) } -func (*SmartLimitDescriptors) ProtoMessage() {} -func (*SmartLimitDescriptors) Descriptor() ([]byte, []int) { - return fileDescriptor_83a0b1a1f579dff8, []int{3} -} - -func (m *SmartLimitDescriptors) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SmartLimitDescriptors.Unmarshal(m, b) -} - -func (m *SmartLimitDescriptors) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SmartLimitDescriptors.Marshal(b, m, deterministic) -} - -func (m *SmartLimitDescriptors) XXX_Merge(src proto.Message) { - xxx_messageInfo_SmartLimitDescriptors.Merge(m, src) -} - -func (m *SmartLimitDescriptors) XXX_Size() int { - return xxx_messageInfo_SmartLimitDescriptors.Size(m) -} - -func (m *SmartLimitDescriptors) XXX_DiscardUnknown() { - xxx_messageInfo_SmartLimitDescriptors.DiscardUnknown(m) -} - -var xxx_messageInfo_SmartLimitDescriptors proto.InternalMessageInfo - -func (m *SmartLimitDescriptors) GetDescriptor_() []*SmartLimitDescriptor { - if m != nil { - return m.Descriptor_ - } - return nil -} - -type Duration struct { - // Signed seconds of the span of time. Must be from -315,576,000,000 - // to +315,576,000,000 inclusive. Note: these bounds are computed from: - // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` - // Signed fractions of a second at nanosecond resolution of the span - // of time. Durations less than one second are represented with a 0 - // `seconds` field and a positive or negative `nanos` field. For durations - // of one second or more, a non-zero value for the `nanos` field must be - // of the same sign as the `seconds` field. Must be from -999,999,999 - // to +999,999,999 inclusive. - Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Duration) Reset() { *m = Duration{} } -func (m *Duration) String() string { return proto.CompactTextString(m) } -func (*Duration) ProtoMessage() {} -func (*Duration) Descriptor() ([]byte, []int) { - return fileDescriptor_83a0b1a1f579dff8, []int{4} -} - -func (m *Duration) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Duration.Unmarshal(m, b) -} - -func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Duration.Marshal(b, m, deterministic) -} - -func (m *Duration) XXX_Merge(src proto.Message) { - xxx_messageInfo_Duration.Merge(m, src) -} - -func (m *Duration) XXX_Size() int { - return xxx_messageInfo_Duration.Size(m) -} - -func (m *Duration) XXX_DiscardUnknown() { - xxx_messageInfo_Duration.DiscardUnknown(m) -} - -var xxx_messageInfo_Duration proto.InternalMessageInfo - -func (m *Duration) GetSeconds() int64 { - if m != nil { - return m.Seconds - } - return 0 -} - -func (m *Duration) GetNanos() int32 { - if m != nil { - return m.Nanos - } - return 0 -} - -func init() { - proto.RegisterType((*SmartLimiterSpec)(nil), "slime.microservice.v1alpha1.SmartLimiterSpec") - proto.RegisterMapType((map[string]*SmartLimitDescriptors)(nil), "slime.microservice.v1alpha1.SmartLimiterSpec.SetsEntry") - proto.RegisterType((*SmartLimiterStatus)(nil), "slime.microservice.v1alpha1.SmartLimiterStatus") - proto.RegisterMapType((map[string]string)(nil), "slime.microservice.v1alpha1.SmartLimiterStatus.MetricStatusEntry") - proto.RegisterMapType((map[string]*SmartLimitDescriptors)(nil), "slime.microservice.v1alpha1.SmartLimiterStatus.RatelimitStatusEntry") - proto.RegisterType((*SmartLimiterStatus_ServiceStatus)(nil), "slime.microservice.v1alpha1.SmartLimiterStatus.ServiceStatus") - proto.RegisterMapType((map[string]string)(nil), "slime.microservice.v1alpha1.SmartLimiterStatus.ServiceStatus.SelectorEntry") - proto.RegisterType((*SmartLimiterStatus_ServiceStatus_Listener)(nil), "slime.microservice.v1alpha1.SmartLimiterStatus.ServiceStatus.Listener") - proto.RegisterType((*SmartLimitDescriptor)(nil), "slime.microservice.v1alpha1.SmartLimitDescriptor") - proto.RegisterType((*SmartLimitDescriptor_HeaderMatcher)(nil), "slime.microservice.v1alpha1.SmartLimitDescriptor.HeaderMatcher") - proto.RegisterType((*SmartLimitDescriptor_Action)(nil), "slime.microservice.v1alpha1.SmartLimitDescriptor.Action") - proto.RegisterType((*SmartLimitDescriptors)(nil), "slime.microservice.v1alpha1.SmartLimitDescriptors") - proto.RegisterType((*Duration)(nil), "slime.microservice.v1alpha1.Duration") -} - -func init() { proto.RegisterFile("api/v1alpha1/smart_limiter.proto", fileDescriptor_83a0b1a1f579dff8) } - -var fileDescriptor_83a0b1a1f579dff8 = []byte{ - // 675 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0x51, 0x6b, 0x13, 0x41, - 0x10, 0xc7, 0xb9, 0x24, 0x4d, 0x93, 0x49, 0x83, 0x75, 0xa9, 0x12, 0xa2, 0x60, 0x8c, 0x08, 0x79, - 0xf1, 0x42, 0xd2, 0x07, 0x4b, 0x45, 0x4a, 0xa5, 0x4a, 0xb5, 0x2d, 0xe8, 0x06, 0x5f, 0x7c, 0x29, - 0xdb, 0xcb, 0xa4, 0xdd, 0xf6, 0xee, 0xf6, 0xdc, 0xdd, 0x84, 0xf6, 0xd3, 0xf9, 0x09, 0xfc, 0x00, - 0xbe, 0xfb, 0x0d, 0xfc, 0x02, 0x72, 0xbb, 0x7b, 0xe9, 0xa5, 0x86, 0xd2, 0xa3, 0xf8, 0x12, 0x76, - 0x26, 0x33, 0xbf, 0xff, 0xfd, 0x67, 0xf6, 0x38, 0xe8, 0xb0, 0x84, 0xf7, 0x67, 0x03, 0x16, 0x26, - 0x67, 0x6c, 0xd0, 0x57, 0x11, 0x93, 0xfa, 0x38, 0xe4, 0x11, 0xd7, 0x28, 0xfd, 0x44, 0x0a, 0x2d, - 0xc8, 0x13, 0x15, 0xf2, 0x08, 0xfd, 0x88, 0x07, 0x52, 0x28, 0x94, 0x33, 0x1e, 0xa0, 0x9f, 0x35, - 0x74, 0x7f, 0x7b, 0xb0, 0x3e, 0x4a, 0x9b, 0x0e, 0x6d, 0xcf, 0x28, 0xc1, 0x80, 0x3c, 0x86, 0xea, - 0x58, 0x44, 0x8c, 0xc7, 0x2d, 0xaf, 0xe3, 0xf5, 0xea, 0xd4, 0x45, 0xe4, 0x00, 0x2a, 0x0a, 0xb5, - 0x6a, 0x95, 0x3a, 0xe5, 0x5e, 0x63, 0xf8, 0xda, 0xbf, 0x05, 0xec, 0xdf, 0x84, 0xfa, 0x23, 0xd4, - 0xea, 0x7d, 0xac, 0xe5, 0x15, 0x35, 0x90, 0xf6, 0x05, 0xd4, 0xe7, 0x29, 0xb2, 0x0e, 0xe5, 0x0b, - 0xbc, 0x72, 0x72, 0xe9, 0x91, 0xec, 0xc3, 0xca, 0x8c, 0x85, 0x53, 0x6c, 0x95, 0x3a, 0x5e, 0xaf, - 0x31, 0x1c, 0xde, 0x51, 0x6c, 0x0f, 0x55, 0x20, 0x79, 0xa2, 0x85, 0x54, 0xd4, 0x02, 0xb6, 0x4b, - 0x5b, 0x5e, 0xf7, 0x57, 0x15, 0xc8, 0xc2, 0x13, 0x69, 0xa6, 0xa7, 0x8a, 0xc4, 0xf0, 0x40, 0x32, - 0x8d, 0x66, 0x5e, 0x36, 0xd5, 0xf2, 0x8c, 0xb7, 0xbd, 0xbb, 0x7b, 0x33, 0x6d, 0x3e, 0x5d, 0xc4, - 0x58, 0xa3, 0x37, 0xe1, 0x04, 0x61, 0x2d, 0x42, 0x2d, 0x79, 0xe0, 0xc4, 0xec, 0x20, 0x77, 0x8b, - 0x8a, 0x1d, 0xe5, 0x18, 0x56, 0x69, 0x01, 0x4b, 0x02, 0x68, 0x3a, 0x8c, 0xd3, 0x29, 0x9b, 0x19, - 0xbe, 0x2d, 0xaa, 0x33, 0xca, 0x43, 0xe8, 0x22, 0xb3, 0x3d, 0x83, 0x8d, 0x65, 0xa6, 0xff, 0xf7, - 0x2a, 0xdb, 0x3b, 0xf0, 0xf0, 0x1f, 0xff, 0x4b, 0x44, 0x37, 0xf2, 0xa2, 0xf5, 0x3c, 0xe0, 0x67, - 0x09, 0x9a, 0x0b, 0xce, 0xc8, 0x29, 0xd4, 0x14, 0x86, 0x18, 0x68, 0x21, 0xdd, 0xfe, 0x0f, 0xee, - 0x35, 0x2a, 0x7f, 0xe4, 0x68, 0x76, 0x39, 0x73, 0x38, 0x39, 0x81, 0x5a, 0xc8, 0x95, 0xc6, 0x18, - 0xa5, 0xdb, 0xfd, 0x87, 0xfb, 0x09, 0x1d, 0x3a, 0x1a, 0x9d, 0x73, 0xdb, 0x6f, 0x52, 0x77, 0x39, - 0xf9, 0x42, 0xb3, 0x19, 0x42, 0x2d, 0x43, 0x12, 0x02, 0x95, 0x98, 0x45, 0xe8, 0x1a, 0xcd, 0x39, - 0xcd, 0x25, 0x42, 0x6a, 0xd3, 0xd8, 0xa4, 0xe6, 0xdc, 0xfd, 0x51, 0x81, 0x8d, 0x65, 0x5b, 0x23, - 0x4f, 0xa1, 0x1e, 0x88, 0x78, 0xcc, 0x35, 0x17, 0xb1, 0x93, 0xba, 0x4e, 0x90, 0xcf, 0x50, 0x65, - 0x81, 0xf9, 0xcb, 0xde, 0xce, 0xad, 0xc2, 0xd7, 0xc2, 0xdf, 0x35, 0xfd, 0xd4, 0x71, 0xc8, 0x57, - 0x58, 0x89, 0x98, 0x0e, 0xce, 0x5a, 0x15, 0x33, 0xda, 0x9d, 0xe2, 0xc0, 0x7d, 0x64, 0x63, 0x94, - 0x47, 0x29, 0x04, 0x25, 0xb5, 0xb4, 0xf6, 0x1f, 0x0f, 0x9a, 0x0b, 0x7f, 0x2c, 0x9d, 0xcc, 0x33, - 0x68, 0xe0, 0x25, 0x0b, 0xf4, 0xb1, 0x7d, 0x04, 0x6b, 0x17, 0x4c, 0xca, 0xb4, 0xa5, 0x05, 0x12, - 0x4f, 0xf1, 0xd2, 0x15, 0x94, 0x6d, 0x81, 0x49, 0xd9, 0x82, 0x17, 0xd0, 0x4c, 0x24, 0x2a, 0x8c, - 0x33, 0xc6, 0x6a, 0xc7, 0xeb, 0xd5, 0xe8, 0x9a, 0x4b, 0xda, 0xa2, 0xe7, 0x90, 0xc6, 0x13, 0x9e, - 0x61, 0xea, 0x06, 0xd3, 0xb0, 0xb9, 0x79, 0x89, 0x9a, 0x4e, 0xae, 0x4b, 0xc0, 0x96, 0xd8, 0xdc, - 0xbc, 0x84, 0xc7, 0x33, 0x94, 0x99, 0x52, 0xcd, 0x28, 0x35, 0x6c, 0xce, 0x94, 0xb4, 0xcf, 0xa1, - 0x6a, 0xc7, 0x9b, 0xde, 0x96, 0xef, 0x53, 0xa1, 0x99, 0xb3, 0x6b, 0x03, 0xf2, 0x09, 0x9a, 0x13, - 0x1e, 0x86, 0xc7, 0x3c, 0xd6, 0x28, 0x67, 0x2c, 0x74, 0x2f, 0xf7, 0xcb, 0x5b, 0x87, 0xbe, 0x37, - 0x95, 0xcc, 0xac, 0x6c, 0x2d, 0xed, 0xfd, 0xe8, 0x5a, 0xbb, 0xe7, 0xf0, 0x68, 0xe9, 0x6b, 0x4f, - 0xbe, 0x00, 0x8c, 0xe7, 0xa1, 0x5b, 0xeb, 0xa0, 0xf0, 0x5a, 0x69, 0x0e, 0xd2, 0xdd, 0x86, 0x5a, - 0xf6, 0x14, 0xa4, 0x05, 0xab, 0x0a, 0xd3, 0x1b, 0xa9, 0x8c, 0xb7, 0x32, 0xcd, 0xc2, 0xd4, 0x73, - 0xcc, 0x62, 0xa1, 0x8c, 0xab, 0x15, 0x6a, 0x83, 0x77, 0x9b, 0xdf, 0x06, 0x56, 0x9b, 0x8b, 0xbe, - 0x39, 0xd8, 0xdf, 0x57, 0x91, 0x18, 0x4f, 0x43, 0x54, 0x7d, 0xf7, 0xdd, 0xed, 0xe7, 0x3f, 0xc9, - 0x27, 0x55, 0xf3, 0x15, 0xde, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x63, 0xfe, 0x2e, 0xa9, - 0x07, 0x00, 0x00, -} diff --git a/slime-modules/limiter/api/v1alpha1/smart_limiter.proto b/slime-modules/limiter/api/v1alpha1/smart_limiter.proto deleted file mode 100644 index 24338ed9..00000000 --- a/slime-modules/limiter/api/v1alpha1/smart_limiter.proto +++ /dev/null @@ -1,103 +0,0 @@ -/* -* @Author: yangdihang -* @Date: 2020/5/21 -*/ - -syntax = "proto3"; -package slime.microservice.v1alpha1; - -option go_package = "slime.io/slime/slime-modules/limiter/api/v1alpha1"; - -// SmartLimiter 用于配置自适应限流插件,以及插件在全局维度上的配置,enable选项可以启用或禁用某插件 -// 示例如下: -// apiVersion: microservice.slime.io/v1alpha1 -// kind: SmartLimiter -// metadata: -// name: a -// namespace: powerful -// spec: -// descriptors: -// sets: -// v1: -// - action: -// fill_interval: -// seconds: 60 -// quota: "30/{._base.pod}" -// condition: "true" - -message SmartLimiterSpec { - string domain = 1; - - // subset rate-limit,the key is subset name. - map sets = 2; -} - -message SmartLimiterStatus { - map ratelimitStatus = 1; - map metricStatus = 2; - message ServiceStatus { - // Deprecated - map selector = 1; - message Listener { - // Deprecated - string name = 1; - // Deprecated - uint32 port = 2; - } - // Deprecated - repeated Listener listener = 2; - } - // Deprecated - ServiceStatus serviceStatus = 3; -} - -message SmartLimitDescriptor { - message HeaderMatcher { - string name = 1; - - string exact_match = 2; - string regex_match = 3; - bool present_match = 7; - string prefix_match = 9; - string suffix_match = 10; - - bool invert_match = 8; - } - message Action { - // rate-limit quota, which can be a template expression - string quota = 1; - Duration fill_interval = 2; - } - - // rate-limit departure conditions, which can be a template expression. - // When the expression value is true, the limit will be triggered - string condition = 2; - - // Limited traffic behavior - Action action = 3; - - // not support - repeated HeaderMatcher match = 4; -} - -message SmartLimitDescriptors { - // Description of current rate-limit - repeated SmartLimitDescriptor descriptor = 4; -} - -message Duration { - - // Signed seconds of the span of time. Must be from -315,576,000,000 - // to +315,576,000,000 inclusive. Note: these bounds are computed from: - // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - int64 seconds = 1; - - // Signed fractions of a second at nanosecond resolution of the span - // of time. Durations less than one second are represented with a 0 - // `seconds` field and a positive or negative `nanos` field. For durations - // of one second or more, a non-zero value for the `nanos` field must be - // of the same sign as the `seconds` field. Must be from -999,999,999 - // to +999,999,999 inclusive. - int32 nanos = 2; -} - diff --git a/slime-modules/limiter/api/v1alpha1/smartlimiter_types.go b/slime-modules/limiter/api/v1alpha1/smartlimiter_types.go deleted file mode 100644 index 3de18378..00000000 --- a/slime-modules/limiter/api/v1alpha1/smartlimiter_types.go +++ /dev/null @@ -1,45 +0,0 @@ -/* - - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +kubebuilder:object:root=true - -// SmartLimiter is the Schema for the smartlimiters API -type SmartLimiter struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec SmartLimiterSpec `json:"spec,omitempty"` - Status SmartLimiterStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// SmartLimiterList contains a list of SmartLimiter -type SmartLimiterList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []SmartLimiter `json:"items"` -} - -func init() { - SchemeBuilder.Register(&SmartLimiter{}, &SmartLimiterList{}) -} diff --git a/slime-modules/limiter/api/v1alpha1/zz_generated.deepcopy.go b/slime-modules/limiter/api/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 72293f87..00000000 --- a/slime-modules/limiter/api/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,365 +0,0 @@ -// +build !ignore_autogenerated - -/* - - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -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 *Duration) DeepCopyInto(out *Duration) { - *out = *in - out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral - if in.XXX_unrecognized != nil { - in, out := &in.XXX_unrecognized, &out.XXX_unrecognized - *out = make([]byte, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Duration. -func (in *Duration) DeepCopy() *Duration { - if in == nil { - return nil - } - out := new(Duration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SmartLimitDescriptor) DeepCopyInto(out *SmartLimitDescriptor) { - *out = *in - if in.Action != nil { - in, out := &in.Action, &out.Action - *out = new(SmartLimitDescriptor_Action) - (*in).DeepCopyInto(*out) - } - if in.Match != nil { - in, out := &in.Match, &out.Match - *out = make([]*SmartLimitDescriptor_HeaderMatcher, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(SmartLimitDescriptor_HeaderMatcher) - (*in).DeepCopyInto(*out) - } - } - } - out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral - if in.XXX_unrecognized != nil { - in, out := &in.XXX_unrecognized, &out.XXX_unrecognized - *out = make([]byte, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmartLimitDescriptor. -func (in *SmartLimitDescriptor) DeepCopy() *SmartLimitDescriptor { - if in == nil { - return nil - } - out := new(SmartLimitDescriptor) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SmartLimitDescriptor_Action) DeepCopyInto(out *SmartLimitDescriptor_Action) { - *out = *in - if in.FillInterval != nil { - in, out := &in.FillInterval, &out.FillInterval - *out = new(Duration) - (*in).DeepCopyInto(*out) - } - out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral - if in.XXX_unrecognized != nil { - in, out := &in.XXX_unrecognized, &out.XXX_unrecognized - *out = make([]byte, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmartLimitDescriptor_Action. -func (in *SmartLimitDescriptor_Action) DeepCopy() *SmartLimitDescriptor_Action { - if in == nil { - return nil - } - out := new(SmartLimitDescriptor_Action) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SmartLimitDescriptor_HeaderMatcher) DeepCopyInto(out *SmartLimitDescriptor_HeaderMatcher) { - *out = *in - out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral - if in.XXX_unrecognized != nil { - in, out := &in.XXX_unrecognized, &out.XXX_unrecognized - *out = make([]byte, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmartLimitDescriptor_HeaderMatcher. -func (in *SmartLimitDescriptor_HeaderMatcher) DeepCopy() *SmartLimitDescriptor_HeaderMatcher { - if in == nil { - return nil - } - out := new(SmartLimitDescriptor_HeaderMatcher) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SmartLimitDescriptors) DeepCopyInto(out *SmartLimitDescriptors) { - *out = *in - if in.Descriptor_ != nil { - in, out := &in.Descriptor_, &out.Descriptor_ - *out = make([]*SmartLimitDescriptor, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(SmartLimitDescriptor) - (*in).DeepCopyInto(*out) - } - } - } - out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral - if in.XXX_unrecognized != nil { - in, out := &in.XXX_unrecognized, &out.XXX_unrecognized - *out = make([]byte, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmartLimitDescriptors. -func (in *SmartLimitDescriptors) DeepCopy() *SmartLimitDescriptors { - if in == nil { - return nil - } - out := new(SmartLimitDescriptors) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SmartLimiter) DeepCopyInto(out *SmartLimiter) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmartLimiter. -func (in *SmartLimiter) DeepCopy() *SmartLimiter { - if in == nil { - return nil - } - out := new(SmartLimiter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SmartLimiter) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SmartLimiterList) DeepCopyInto(out *SmartLimiterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]SmartLimiter, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmartLimiterList. -func (in *SmartLimiterList) DeepCopy() *SmartLimiterList { - if in == nil { - return nil - } - out := new(SmartLimiterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SmartLimiterList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SmartLimiterSpec) DeepCopyInto(out *SmartLimiterSpec) { - *out = *in - if in.Sets != nil { - in, out := &in.Sets, &out.Sets - *out = make(map[string]*SmartLimitDescriptors, len(*in)) - for key, val := range *in { - var outVal *SmartLimitDescriptors - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(SmartLimitDescriptors) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } - out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral - if in.XXX_unrecognized != nil { - in, out := &in.XXX_unrecognized, &out.XXX_unrecognized - *out = make([]byte, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmartLimiterSpec. -func (in *SmartLimiterSpec) DeepCopy() *SmartLimiterSpec { - if in == nil { - return nil - } - out := new(SmartLimiterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SmartLimiterStatus) DeepCopyInto(out *SmartLimiterStatus) { - *out = *in - if in.RatelimitStatus != nil { - in, out := &in.RatelimitStatus, &out.RatelimitStatus - *out = make(map[string]*SmartLimitDescriptors, len(*in)) - for key, val := range *in { - var outVal *SmartLimitDescriptors - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(SmartLimitDescriptors) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } - if in.MetricStatus != nil { - in, out := &in.MetricStatus, &out.MetricStatus - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ServiceStatus != nil { - in, out := &in.ServiceStatus, &out.ServiceStatus - *out = new(SmartLimiterStatus_ServiceStatus) - (*in).DeepCopyInto(*out) - } - out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral - if in.XXX_unrecognized != nil { - in, out := &in.XXX_unrecognized, &out.XXX_unrecognized - *out = make([]byte, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmartLimiterStatus. -func (in *SmartLimiterStatus) DeepCopy() *SmartLimiterStatus { - if in == nil { - return nil - } - out := new(SmartLimiterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SmartLimiterStatus_ServiceStatus) DeepCopyInto(out *SmartLimiterStatus_ServiceStatus) { - *out = *in - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Listener != nil { - in, out := &in.Listener, &out.Listener - *out = make([]*SmartLimiterStatus_ServiceStatus_Listener, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(SmartLimiterStatus_ServiceStatus_Listener) - (*in).DeepCopyInto(*out) - } - } - } - out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral - if in.XXX_unrecognized != nil { - in, out := &in.XXX_unrecognized, &out.XXX_unrecognized - *out = make([]byte, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmartLimiterStatus_ServiceStatus. -func (in *SmartLimiterStatus_ServiceStatus) DeepCopy() *SmartLimiterStatus_ServiceStatus { - if in == nil { - return nil - } - out := new(SmartLimiterStatus_ServiceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SmartLimiterStatus_ServiceStatus_Listener) DeepCopyInto(out *SmartLimiterStatus_ServiceStatus_Listener) { - *out = *in - out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral - if in.XXX_unrecognized != nil { - in, out := &in.XXX_unrecognized, &out.XXX_unrecognized - *out = make([]byte, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmartLimiterStatus_ServiceStatus_Listener. -func (in *SmartLimiterStatus_ServiceStatus_Listener) DeepCopy() *SmartLimiterStatus_ServiceStatus_Listener { - if in == nil { - return nil - } - out := new(SmartLimiterStatus_ServiceStatus_Listener) - in.DeepCopyInto(out) - return out -} diff --git a/slime-modules/limiter/config/certmanager/certificate.yaml b/slime-modules/limiter/config/certmanager/certificate.yaml deleted file mode 100644 index 58db114f..00000000 --- a/slime-modules/limiter/config/certmanager/certificate.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# The following manifests contain a self-signed issuer CR and a certificate CR. -# More document can be found at https://docs.cert-manager.io -# WARNING: Targets CertManager 0.11 check https://docs.cert-manager.io/en/latest/tasks/upgrading/index.html for -# breaking changes -apiVersion: cert-manager.io/v1alpha2 -kind: Issuer -metadata: - name: selfsigned-issuer - namespace: system -spec: - selfSigned: {} ---- -apiVersion: cert-manager.io/v1alpha2 -kind: Certificate -metadata: - name: serving-cert # this name should match the one appeared in kustomizeconfig.yaml - namespace: system -spec: - # $(SERVICE_NAME) and $(SERVICE_NAMESPACE) will be substituted by kustomize - dnsNames: - - $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc - - $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc.cluster.local - issuerRef: - kind: Issuer - name: selfsigned-issuer - secretName: webhook-server-cert # this secret will not be prefixed, since it's not managed by kustomize diff --git a/slime-modules/limiter/config/certmanager/kustomization.yaml b/slime-modules/limiter/config/certmanager/kustomization.yaml deleted file mode 100644 index bebea5a5..00000000 --- a/slime-modules/limiter/config/certmanager/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -resources: -- certificate.yaml - -configurations: -- kustomizeconfig.yaml diff --git a/slime-modules/limiter/config/certmanager/kustomizeconfig.yaml b/slime-modules/limiter/config/certmanager/kustomizeconfig.yaml deleted file mode 100644 index 90d7c313..00000000 --- a/slime-modules/limiter/config/certmanager/kustomizeconfig.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# This configuration is for teaching kustomize how to update name ref and var substitution -nameReference: -- kind: Issuer - group: cert-manager.io - fieldSpecs: - - kind: Certificate - group: cert-manager.io - path: spec/issuerRef/name - -varReference: -- kind: Certificate - group: cert-manager.io - path: spec/commonName -- kind: Certificate - group: cert-manager.io - path: spec/dnsNames diff --git a/slime-modules/limiter/config/crd/kustomization.yaml b/slime-modules/limiter/config/crd/kustomization.yaml deleted file mode 100644 index c1b8b4ea..00000000 --- a/slime-modules/limiter/config/crd/kustomization.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# This kustomization.yaml is not intended to be run by itself, -# since it depends on service name and namespace that are out of this kustomize package. -# It should be run by config/default -resources: -- bases/microservice.slime.io_smartlimiters.yaml -- bases/networking.istio.io_destinationrules.yaml -# +kubebuilder:scaffold:crdkustomizeresource - -patchesStrategicMerge: -# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. -# patches here are for enabling the conversion webhook for each CRD -#- patches/webhook_in_smartlimiters.yaml -#- patches/webhook_in_destinationrules.yaml -# +kubebuilder:scaffold:crdkustomizewebhookpatch - -# [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix. -# patches here are for enabling the CA injection for each CRD -#- patches/cainjection_in_smartlimiters.yaml -#- patches/cainjection_in_destinationrules.yaml -# +kubebuilder:scaffold:crdkustomizecainjectionpatch - -# the following config is for teaching kustomize how to do kustomization for CRDs. -configurations: -- kustomizeconfig.yaml diff --git a/slime-modules/limiter/config/crd/kustomizeconfig.yaml b/slime-modules/limiter/config/crd/kustomizeconfig.yaml deleted file mode 100644 index 6f83d9a9..00000000 --- a/slime-modules/limiter/config/crd/kustomizeconfig.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# This file is for teaching kustomize how to substitute name and namespace reference in CRD -nameReference: -- kind: Service - version: v1 - fieldSpecs: - - kind: CustomResourceDefinition - group: apiextensions.k8s.io - path: spec/conversion/webhookClientConfig/service/name - -namespace: -- kind: CustomResourceDefinition - group: apiextensions.k8s.io - path: spec/conversion/webhookClientConfig/service/namespace - create: false - -varReference: -- path: metadata/annotations diff --git a/slime-modules/limiter/config/crd/patches/cainjection_in_destinationrules.yaml b/slime-modules/limiter/config/crd/patches/cainjection_in_destinationrules.yaml deleted file mode 100644 index 1c273f08..00000000 --- a/slime-modules/limiter/config/crd/patches/cainjection_in_destinationrules.yaml +++ /dev/null @@ -1,8 +0,0 @@ -# The following patch adds a directive for certmanager to inject CA into the CRD -# CRD conversion requires k8s 1.13 or later. -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) - name: destinationrules.networking.istio.io diff --git a/slime-modules/limiter/config/crd/patches/cainjection_in_smartlimiters.yaml b/slime-modules/limiter/config/crd/patches/cainjection_in_smartlimiters.yaml deleted file mode 100644 index d273213e..00000000 --- a/slime-modules/limiter/config/crd/patches/cainjection_in_smartlimiters.yaml +++ /dev/null @@ -1,8 +0,0 @@ -# The following patch adds a directive for certmanager to inject CA into the CRD -# CRD conversion requires k8s 1.13 or later. -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) - name: smartlimiters.microservice.slime.io diff --git a/slime-modules/limiter/config/crd/patches/webhook_in_destinationrules.yaml b/slime-modules/limiter/config/crd/patches/webhook_in_destinationrules.yaml deleted file mode 100644 index a15fd858..00000000 --- a/slime-modules/limiter/config/crd/patches/webhook_in_destinationrules.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# The following patch enables conversion webhook for CRD -# CRD conversion requires k8s 1.13 or later. -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: destinationrules.networking.istio.io -spec: - conversion: - strategy: Webhook - webhookClientConfig: - # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, - # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) - caBundle: Cg== - service: - namespace: system - name: webhook-service - path: /convert diff --git a/slime-modules/limiter/config/crd/patches/webhook_in_smartlimiters.yaml b/slime-modules/limiter/config/crd/patches/webhook_in_smartlimiters.yaml deleted file mode 100644 index 8b8e397d..00000000 --- a/slime-modules/limiter/config/crd/patches/webhook_in_smartlimiters.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# The following patch enables conversion webhook for CRD -# CRD conversion requires k8s 1.13 or later. -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: smartlimiters.microservice.slime.io -spec: - conversion: - strategy: Webhook - webhookClientConfig: - # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, - # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) - caBundle: Cg== - service: - namespace: system - name: webhook-service - path: /convert diff --git a/slime-modules/limiter/config/default/kustomization.yaml b/slime-modules/limiter/config/default/kustomization.yaml deleted file mode 100644 index b0a34332..00000000 --- a/slime-modules/limiter/config/default/kustomization.yaml +++ /dev/null @@ -1,70 +0,0 @@ -# Adds namespace to all resources. -namespace: limiter-system - -# Value of this field is prepended to the -# names of all resources, e.g. a deployment named -# "wordpress" becomes "alices-wordpress". -# Note that it should also match with the prefix (text before '-') of the namespace -# field above. -namePrefix: limiter- - -# Labels to add to all resources and selectors. -#commonLabels: -# someName: someValue - -bases: -- ../crd -- ../rbac -- ../manager -# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in -# crd/kustomization.yaml -#- ../webhook -# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required. -#- ../certmanager -# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'. -#- ../prometheus - -patchesStrategicMerge: - # Protect the /metrics endpoint by putting it behind auth. - # If you want your controller-manager to expose the /metrics - # endpoint w/o any authn/z, please comment the following line. -- manager_auth_proxy_patch.yaml - -# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in -# crd/kustomization.yaml -#- manager_webhook_patch.yaml - -# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. -# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks. -# 'CERTMANAGER' needs to be enabled to use ca injection -#- webhookcainjection_patch.yaml - -# the following config is for teaching kustomize how to do var substitution -vars: -# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix. -#- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR -# objref: -# kind: Certificate -# group: cert-manager.io -# version: v1alpha2 -# name: serving-cert # this name should match the one in certificate.yaml -# fieldref: -# fieldpath: metadata.namespace -#- name: CERTIFICATE_NAME -# objref: -# kind: Certificate -# group: cert-manager.io -# version: v1alpha2 -# name: serving-cert # this name should match the one in certificate.yaml -#- name: SERVICE_NAMESPACE # namespace of the service -# objref: -# kind: Service -# version: v1 -# name: webhook-service -# fieldref: -# fieldpath: metadata.namespace -#- name: SERVICE_NAME -# objref: -# kind: Service -# version: v1 -# name: webhook-service diff --git a/slime-modules/limiter/config/default/manager_auth_proxy_patch.yaml b/slime-modules/limiter/config/default/manager_auth_proxy_patch.yaml deleted file mode 100644 index 77e743d1..00000000 --- a/slime-modules/limiter/config/default/manager_auth_proxy_patch.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# This patch inject a sidecar container which is a HTTP proxy for the -# controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews. -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: system -spec: - template: - spec: - containers: - - name: kube-rbac-proxy - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 - args: - - "--secure-listen-address=0.0.0.0:8443" - - "--upstream=http://127.0.0.1:8080/" - - "--logtostderr=true" - - "--v=10" - ports: - - containerPort: 8443 - name: https - - name: manager - args: - - "--metrics-addr=127.0.0.1:8080" - - "--enable-leader-election" diff --git a/slime-modules/limiter/config/default/manager_webhook_patch.yaml b/slime-modules/limiter/config/default/manager_webhook_patch.yaml deleted file mode 100644 index 738de350..00000000 --- a/slime-modules/limiter/config/default/manager_webhook_patch.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: system -spec: - template: - spec: - containers: - - name: manager - ports: - - containerPort: 9443 - name: webhook-server - protocol: TCP - volumeMounts: - - mountPath: /tmp/k8s-webhook-server/serving-certs - name: cert - readOnly: true - volumes: - - name: cert - secret: - defaultMode: 420 - secretName: webhook-server-cert diff --git a/slime-modules/limiter/config/default/webhookcainjection_patch.yaml b/slime-modules/limiter/config/default/webhookcainjection_patch.yaml deleted file mode 100644 index 7e79bf99..00000000 --- a/slime-modules/limiter/config/default/webhookcainjection_patch.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# This patch add annotation to admission webhook config and -# the variables $(CERTIFICATE_NAMESPACE) and $(CERTIFICATE_NAME) will be substituted by kustomize. -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: MutatingWebhookConfiguration -metadata: - name: mutating-webhook-configuration - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) ---- -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: ValidatingWebhookConfiguration -metadata: - name: validating-webhook-configuration - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) diff --git a/slime-modules/limiter/config/manager/kustomization.yaml b/slime-modules/limiter/config/manager/kustomization.yaml deleted file mode 100644 index 5c5f0b84..00000000 --- a/slime-modules/limiter/config/manager/kustomization.yaml +++ /dev/null @@ -1,2 +0,0 @@ -resources: -- manager.yaml diff --git a/slime-modules/limiter/config/manager/manager.yaml b/slime-modules/limiter/config/manager/manager.yaml deleted file mode 100644 index b6c85a52..00000000 --- a/slime-modules/limiter/config/manager/manager.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - labels: - control-plane: controller-manager - name: system ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: system - labels: - control-plane: controller-manager -spec: - selector: - matchLabels: - control-plane: controller-manager - replicas: 1 - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - command: - - /manager - args: - - --enable-leader-election - image: controller:latest - name: manager - resources: - limits: - cpu: 100m - memory: 30Mi - requests: - cpu: 100m - memory: 20Mi - terminationGracePeriodSeconds: 10 diff --git a/slime-modules/limiter/config/prometheus/kustomization.yaml b/slime-modules/limiter/config/prometheus/kustomization.yaml deleted file mode 100644 index ed137168..00000000 --- a/slime-modules/limiter/config/prometheus/kustomization.yaml +++ /dev/null @@ -1,2 +0,0 @@ -resources: -- monitor.yaml diff --git a/slime-modules/limiter/config/prometheus/monitor.yaml b/slime-modules/limiter/config/prometheus/monitor.yaml deleted file mode 100644 index 9b8047b7..00000000 --- a/slime-modules/limiter/config/prometheus/monitor.yaml +++ /dev/null @@ -1,16 +0,0 @@ - -# Prometheus Monitor Service (Metrics) -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - control-plane: controller-manager - name: controller-manager-metrics-monitor - namespace: system -spec: - endpoints: - - path: /metrics - port: https - selector: - matchLabels: - control-plane: controller-manager diff --git a/slime-modules/limiter/config/rbac/auth_proxy_client_clusterrole.yaml b/slime-modules/limiter/config/rbac/auth_proxy_client_clusterrole.yaml deleted file mode 100644 index 7d62534c..00000000 --- a/slime-modules/limiter/config/rbac/auth_proxy_client_clusterrole.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: metrics-reader -rules: -- nonResourceURLs: ["/metrics"] - verbs: ["get"] diff --git a/slime-modules/limiter/config/rbac/auth_proxy_role.yaml b/slime-modules/limiter/config/rbac/auth_proxy_role.yaml deleted file mode 100644 index 618f5e41..00000000 --- a/slime-modules/limiter/config/rbac/auth_proxy_role.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: proxy-role -rules: -- apiGroups: ["authentication.k8s.io"] - resources: - - tokenreviews - verbs: ["create"] -- apiGroups: ["authorization.k8s.io"] - resources: - - subjectaccessreviews - verbs: ["create"] diff --git a/slime-modules/limiter/config/rbac/auth_proxy_role_binding.yaml b/slime-modules/limiter/config/rbac/auth_proxy_role_binding.yaml deleted file mode 100644 index 48ed1e4b..00000000 --- a/slime-modules/limiter/config/rbac/auth_proxy_role_binding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: proxy-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: proxy-role -subjects: -- kind: ServiceAccount - name: default - namespace: system diff --git a/slime-modules/limiter/config/rbac/auth_proxy_service.yaml b/slime-modules/limiter/config/rbac/auth_proxy_service.yaml deleted file mode 100644 index 6cf656be..00000000 --- a/slime-modules/limiter/config/rbac/auth_proxy_service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - control-plane: controller-manager - name: controller-manager-metrics-service - namespace: system -spec: - ports: - - name: https - port: 8443 - targetPort: https - selector: - control-plane: controller-manager diff --git a/slime-modules/limiter/config/rbac/destinationrule_editor_role.yaml b/slime-modules/limiter/config/rbac/destinationrule_editor_role.yaml deleted file mode 100644 index baf5c068..00000000 --- a/slime-modules/limiter/config/rbac/destinationrule_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit destinationrules. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: destinationrule-editor-role -rules: -- apiGroups: - - networking.istio.io - resources: - - destinationrules - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - networking.istio.io - resources: - - destinationrules/status - verbs: - - get diff --git a/slime-modules/limiter/config/rbac/destinationrule_viewer_role.yaml b/slime-modules/limiter/config/rbac/destinationrule_viewer_role.yaml deleted file mode 100644 index 29e24066..00000000 --- a/slime-modules/limiter/config/rbac/destinationrule_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view destinationrules. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: destinationrule-viewer-role -rules: -- apiGroups: - - networking.istio.io - resources: - - destinationrules - verbs: - - get - - list - - watch -- apiGroups: - - networking.istio.io - resources: - - destinationrules/status - verbs: - - get diff --git a/slime-modules/limiter/config/rbac/kustomization.yaml b/slime-modules/limiter/config/rbac/kustomization.yaml deleted file mode 100644 index 66c28338..00000000 --- a/slime-modules/limiter/config/rbac/kustomization.yaml +++ /dev/null @@ -1,12 +0,0 @@ -resources: -- role.yaml -- role_binding.yaml -- leader_election_role.yaml -- leader_election_role_binding.yaml -# Comment the following 4 lines if you want to disable -# the auth proxy (https://github.com/brancz/kube-rbac-proxy) -# which protects your /metrics endpoint. -- auth_proxy_service.yaml -- auth_proxy_role.yaml -- auth_proxy_role_binding.yaml -- auth_proxy_client_clusterrole.yaml diff --git a/slime-modules/limiter/config/rbac/leader_election_role.yaml b/slime-modules/limiter/config/rbac/leader_election_role.yaml deleted file mode 100644 index eaa79158..00000000 --- a/slime-modules/limiter/config/rbac/leader_election_role.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# permissions to do leader election. -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: leader-election-role -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch -- apiGroups: - - "" - resources: - - events - verbs: - - create diff --git a/slime-modules/limiter/config/rbac/leader_election_role_binding.yaml b/slime-modules/limiter/config/rbac/leader_election_role_binding.yaml deleted file mode 100644 index eed16906..00000000 --- a/slime-modules/limiter/config/rbac/leader_election_role_binding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: leader-election-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: leader-election-role -subjects: -- kind: ServiceAccount - name: default - namespace: system diff --git a/slime-modules/limiter/config/rbac/role_binding.yaml b/slime-modules/limiter/config/rbac/role_binding.yaml deleted file mode 100644 index 8f265870..00000000 --- a/slime-modules/limiter/config/rbac/role_binding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: manager-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: manager-role -subjects: -- kind: ServiceAccount - name: default - namespace: system diff --git a/slime-modules/limiter/config/rbac/smartlimiter_editor_role.yaml b/slime-modules/limiter/config/rbac/smartlimiter_editor_role.yaml deleted file mode 100644 index defe11e7..00000000 --- a/slime-modules/limiter/config/rbac/smartlimiter_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit smartlimiters. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: smartlimiter-editor-role -rules: -- apiGroups: - - microservice.slime.io - resources: - - smartlimiters - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - microservice.slime.io - resources: - - smartlimiters/status - verbs: - - get diff --git a/slime-modules/limiter/config/rbac/smartlimiter_viewer_role.yaml b/slime-modules/limiter/config/rbac/smartlimiter_viewer_role.yaml deleted file mode 100644 index 9664e6e1..00000000 --- a/slime-modules/limiter/config/rbac/smartlimiter_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view smartlimiters. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: smartlimiter-viewer-role -rules: -- apiGroups: - - microservice.slime.io - resources: - - smartlimiters - verbs: - - get - - list - - watch -- apiGroups: - - microservice.slime.io - resources: - - smartlimiters/status - verbs: - - get diff --git a/slime-modules/limiter/config/samples/microservice.slime.io_v1alpha1_smartlimiter.yaml b/slime-modules/limiter/config/samples/microservice.slime.io_v1alpha1_smartlimiter.yaml deleted file mode 100644 index 8c5f965c..00000000 --- a/slime-modules/limiter/config/samples/microservice.slime.io_v1alpha1_smartlimiter.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: microservice.slime.io/v1alpha1 -kind: SmartLimiter -metadata: - name: smartlimiter-sample -spec: - # Add fields here - foo: bar diff --git a/slime-modules/limiter/config/samples/networking.istio.io_v1alpha3_destinationrule.yaml b/slime-modules/limiter/config/samples/networking.istio.io_v1alpha3_destinationrule.yaml deleted file mode 100644 index 634efc6b..00000000 --- a/slime-modules/limiter/config/samples/networking.istio.io_v1alpha3_destinationrule.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: networking.istio.io/v1alpha3 -kind: DestinationRule -metadata: - name: destinationrule-sample -spec: - # Add fields here - foo: bar diff --git a/slime-modules/limiter/config/webhook/kustomization.yaml b/slime-modules/limiter/config/webhook/kustomization.yaml deleted file mode 100644 index 9cf26134..00000000 --- a/slime-modules/limiter/config/webhook/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -resources: -- manifests.yaml -- service.yaml - -configurations: -- kustomizeconfig.yaml diff --git a/slime-modules/limiter/config/webhook/kustomizeconfig.yaml b/slime-modules/limiter/config/webhook/kustomizeconfig.yaml deleted file mode 100644 index 25e21e3c..00000000 --- a/slime-modules/limiter/config/webhook/kustomizeconfig.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# the following config is for teaching kustomize where to look at when substituting vars. -# It requires kustomize v2.1.0 or newer to work properly. -nameReference: -- kind: Service - version: v1 - fieldSpecs: - - kind: MutatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/name - - kind: ValidatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/name - -namespace: -- kind: MutatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/namespace - create: true -- kind: ValidatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/namespace - create: true - -varReference: -- path: metadata/annotations diff --git a/slime-modules/limiter/config/webhook/service.yaml b/slime-modules/limiter/config/webhook/service.yaml deleted file mode 100644 index 31e0f829..00000000 --- a/slime-modules/limiter/config/webhook/service.yaml +++ /dev/null @@ -1,12 +0,0 @@ - -apiVersion: v1 -kind: Service -metadata: - name: webhook-service - namespace: system -spec: - ports: - - port: 443 - targetPort: 9443 - selector: - control-plane: controller-manager diff --git a/slime-modules/limiter/controllers/envoy_local_limit.go b/slime-modules/limiter/controllers/envoy_local_limit.go deleted file mode 100644 index 042f23cf..00000000 --- a/slime-modules/limiter/controllers/envoy_local_limit.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -* @Author: yangdihang -* @Date: 2020/11/19 - */ - -package controllers - -import ( - "context" - "fmt" - "strconv" - - "slime.io/slime/slime-framework/controllers" - "slime.io/slime/slime-framework/util" - microservicev1alpha1 "slime.io/slime/slime-modules/limiter/api/v1alpha1" - - envoy_config_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" - envoy_extensions_filters_http_local_ratelimit_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/local_ratelimit/v3" - envoy_type_v3 "github.com/envoyproxy/go-control-plane/envoy/type/v3" - structpb "github.com/gogo/protobuf/types" - "github.com/golang/protobuf/ptypes/duration" - networking "istio.io/api/networking/v1alpha3" - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" -) - -func (r *SmartLimiterReconciler) GenerateEnvoyLocalLimit(rateLimitConf microservicev1alpha1.SmartLimiterSpec, - material map[string]string, instance *microservicev1alpha1.SmartLimiter) ( - map[string]*networking.EnvoyFilter, map[string]*microservicev1alpha1.SmartLimitDescriptors) { - - materialInterface := util.MapToMapInterface(material) - - setsEnvoyFilter := make(map[string]*networking.EnvoyFilter) - setsSmartLimitDescriptor := make(map[string]*microservicev1alpha1.SmartLimitDescriptors) - host := util.UnityHost(instance.Name, instance.Namespace) - var sets []*networking.Subset - if controllers.HostSubsetMapping.Get(host) != nil { - sets = controllers.HostSubsetMapping.Get(host).([]*networking.Subset) - } else { - sets = make([]*networking.Subset, 0, 1) - } - sets = append(sets, &networking.Subset{Name: util.Wellkonw_BaseSet}) - loc := types.NamespacedName{ - Namespace: instance.Namespace, - Name: instance.Name, - } - svc := &v1.Service{} - _ = r.Client.Get(context.TODO(), loc, svc) - svcSelector := svc.Spec.Selector - // 使用base作为key,可以为基础集合配置限流 - sets = append(sets, &networking.Subset{Name: util.Wellkonw_BaseSet}) - for _, set := range sets { - if setDescriptor, ok := rateLimitConf.Sets[set.Name]; ok { - descriptor := µservicev1alpha1.SmartLimitDescriptors{} - for _, des := range setDescriptor.Descriptor_ { - setDes := µservicev1alpha1.SmartLimitDescriptor{} - if shouldUpdate, _ := util.CalculateTemplateBool(des.Condition, materialInterface); shouldUpdate { - if des.Action != nil { - if rateLimitValue, err := util.CalculateTemplate(des.Action.Quota, materialInterface); err == nil { - setDes.Action = µservicev1alpha1.SmartLimitDescriptor_Action{ - Quota: fmt.Sprintf("%d", rateLimitValue), - FillInterval: des.Action.FillInterval, - } - } - descriptor.Descriptor_ = append(descriptor.Descriptor_, setDes) - } - } - } - selector := util.CopyMap(svcSelector) - for k, v := range set.Labels { - selector[k] = v - } - if len(descriptor.Descriptor_) > 0 { - ef := descriptorsToEnvoyFilter(descriptor.Descriptor_, selector) - setsEnvoyFilter[set.Name] = ef - setsSmartLimitDescriptor[set.Name] = descriptor - } else { - // Used to delete - setsEnvoyFilter[set.Name] = nil - } - } else { - // Used to delete - setsEnvoyFilter[set.Name] = nil - } - } - return setsEnvoyFilter, setsSmartLimitDescriptor -} - -func descriptorsToEnvoyFilter(descriptor []*microservicev1alpha1.SmartLimitDescriptor, labels map[string]string) *networking.EnvoyFilter { - ef := &networking.EnvoyFilter{ - WorkloadSelector: &networking.WorkloadSelector{ - Labels: labels, - }, - } - ef.ConfigPatches = make([]*networking.EnvoyFilter_EnvoyConfigObjectPatch, 0) - // envoy local ratelimit 不支持header match,因此仅应存在一条 - des := descriptor[0] - i, _ := strconv.Atoi(des.Action.Quota) - envoyLocDes := &envoy_extensions_filters_http_local_ratelimit_v3.LocalRateLimit{ - StatPrefix: util.Struct_EnvoyLocalRateLimit_Limiter, - TokenBucket: &envoy_type_v3.TokenBucket{ - MaxTokens: uint32(i), - FillInterval: &duration.Duration{ - Seconds: des.Action.FillInterval.Seconds, - Nanos: des.Action.FillInterval.Nanos, - }, - }, - FilterEnabled: &envoy_config_core_v3.RuntimeFractionalPercent{ - RuntimeKey: util.Struct_EnvoyLocalRateLimit_Enabled, - DefaultValue: &envoy_type_v3.FractionalPercent{ - Numerator: 100, - Denominator: envoy_type_v3.FractionalPercent_HUNDRED, - }, - }, - FilterEnforced: &envoy_config_core_v3.RuntimeFractionalPercent{ - RuntimeKey: util.Struct_EnvoyLocalRateLimit_Enforced, - DefaultValue: &envoy_type_v3.FractionalPercent{ - Numerator: 100, - Denominator: envoy_type_v3.FractionalPercent_HUNDRED, - }, - }, - } - t, err := util.MessageToStruct(envoyLocDes) - if err == nil { - patch := &networking.EnvoyFilter_EnvoyConfigObjectPatch{ - ApplyTo: networking.EnvoyFilter_HTTP_FILTER, - Match: &networking.EnvoyFilter_EnvoyConfigObjectMatch{ - Context: networking.EnvoyFilter_SIDECAR_INBOUND, - ObjectTypes: &networking.EnvoyFilter_EnvoyConfigObjectMatch_Listener{ - Listener: &networking.EnvoyFilter_ListenerMatch{ - FilterChain: &networking.EnvoyFilter_ListenerMatch_FilterChainMatch{ - Filter: &networking.EnvoyFilter_ListenerMatch_FilterMatch{ - Name: util.Envoy_HttpConnectionManager, - SubFilter: &networking.EnvoyFilter_ListenerMatch_SubFilterMatch{ - Name: util.Envoy_Route, - }, - }, - }, - }, - }, - }, - Patch: &networking.EnvoyFilter_Patch{ - Operation: networking.EnvoyFilter_Patch_INSERT_BEFORE, - Value: &structpb.Struct{ - Fields: map[string]*structpb.Value{ - util.Struct_HttpFilter_Name: { - Kind: &structpb.Value_StringValue{StringValue: util.Envoy_LocalRateLimit}, - }, - util.Struct_HttpFilter_TypedConfig: { - Kind: &structpb.Value_StructValue{ - StructValue: &structpb.Struct{ - Fields: map[string]*structpb.Value{ - util.Struct_Any_AtType: { - Kind: &structpb.Value_StringValue{StringValue: util.TypeUrl_UdpaTypedStruct}, - }, - util.Struct_Any_TypedUrl: { - Kind: &structpb.Value_StringValue{StringValue: util.TypeUrl_EnvoyLocalRatelimit}, - }, - util.Struct_Any_Value: { - Kind: &structpb.Value_StructValue{StructValue: t}, - }, - }, - }, - }, - }, - }, - }, - }, - } - ef.ConfigPatches = append(ef.ConfigPatches, patch) - } - return ef -} diff --git a/slime-modules/limiter/controllers/multicluster/controller.go b/slime-modules/limiter/controllers/multicluster/controller.go deleted file mode 100644 index 789e4b5e..00000000 --- a/slime-modules/limiter/controllers/multicluster/controller.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -* @Author: yangdihang -* @Date: 2020/7/24 - */ - -package multicluster - -import ( - "fmt" - "time" - - log "github.com/sirupsen/logrus" - corev1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/util/workqueue" - "slime.io/slime/slime-framework/bootstrap" -) - -const ( - RootNamespace = "istio-mc" - maxRetries = 3 -) - -type Controller struct { - k8sClient *kubernetes.Clientset - informer cache.SharedIndexInformer - queue workqueue.RateLimitingInterface - cs map[string]string - subscriber []func(*kubernetes.Clientset) - unSubscriber []func(string) - stop <-chan struct{} -} - -func New(env *bootstrap.Environment, subscriber []func(*kubernetes.Clientset), unSubscriber []func(string)) *Controller { - c := &Controller{ - k8sClient: env.K8SClient, - stop: env.Stop, - subscriber: subscriber, - unSubscriber: unSubscriber, - cs: make(map[string]string), - } - - secretsInformer := cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(opts meta_v1.ListOptions) (runtime.Object, error) { - opts.LabelSelector = env.Config.Global.Multicluster + "=true" - obj, err := c.k8sClient.CoreV1().Secrets(RootNamespace).List(opts) - return obj, err - }, - WatchFunc: func(opts meta_v1.ListOptions) (watch.Interface, error) { - opts.LabelSelector = env.Config.Global.Multicluster + "=true" - return c.k8sClient.CoreV1().Secrets(RootNamespace).Watch(opts) - }, - }, - &corev1.Secret{}, 0, cache.Indexers{}, - ) - c.informer = secretsInformer - - queue := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()) - c.queue = queue - - log.Info("Setting up event handlers") - secretsInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - key, err := cache.MetaNamespaceKeyFunc(obj) - log.Infof("Processing add: %s", key) - if err == nil { - queue.Add(key) - } - }, - DeleteFunc: func(obj interface{}) { - key, err := cache.DeletionHandlingMetaNamespaceKeyFunc(obj) - log.Infof("Processing delete: %s", key) - if err == nil { - queue.Add(key) - } - }, - }) - return c -} - -func (c *Controller) Run() { - defer c.queue.ShutDown() - - log.Info("Starting Secrets controller") - - go c.informer.Run(c.stop) - - // Wait for the caches to be synced before starting workers - log.Info("Waiting for informer caches to sync") - if !cache.WaitForCacheSync(c.stop, c.informer.HasSynced) { - // utilruntime.HandleError(fmt.Errorf("timed out waiting for caches to sync")) - return - } - wait.Until(c.runWorker, 5*time.Second, c.stop) -} - -func (c *Controller) runWorker() { - for c.processNextItem() { - } -} - -func (c *Controller) processNextItem() bool { - secretName, quit := c.queue.Get() - - if quit { - return false - } - defer c.queue.Done(secretName) - - err := c.processItem(secretName.(string)) - if err == nil { - // No error, reset the ratelimit counters - c.queue.Forget(secretName) - } else if c.queue.NumRequeues(secretName) < maxRetries { - log.Errorf("processing %s err, (will retry): %+v", secretName, err) - c.queue.AddRateLimited(secretName) - } else { - log.Errorf("processing %s err, (giving up): %+v", secretName, err) - c.queue.Forget(secretName) - } - - return true -} - -func (c *Controller) processItem(secretName string) error { - obj, exists, err := c.informer.GetIndexer().GetByKey(secretName) - if err != nil { - return fmt.Errorf("error fetching object %s error: %v", secretName, err) - } - - if exists { - c.addMemberCluster(secretName, obj.(*corev1.Secret)) - } else { - c.deleteMemberCluster(secretName) - } - - return nil -} - -func (c *Controller) addMemberCluster(secretName string, s *corev1.Secret) { - for clusterID, kubeConfig := range s.Data { - // clusterID must be unique even across multiple secrets - if _, ok := c.cs[clusterID]; !ok { - if len(kubeConfig) == 0 { - log.Infof("Data '%s' in the secret %s in namespace %s is empty, and disregarded ", - clusterID, secretName, s.Namespace) - continue - } - - clientConfig, err := clientcmd.Load(kubeConfig) - if err != nil { - log.Infof("Data '%s' in the secret %s in namespace %s is not a kubeconfig: %+v", - clusterID, secretName, s.Namespace, err) - continue - } - - if err := clientcmd.Validate(*clientConfig); err != nil { - log.Errorf("Data '%s' in the secret %s in namespace %s is not a valid kubeconfig: %+v", - clusterID, secretName, s.Namespace, err) - continue - } - - log.Infof("Adding new cluster member: %s", clusterID) - c.cs[clusterID] = secretName - client := clientcmd.NewDefaultClientConfig(*clientConfig, &clientcmd.ConfigOverrides{}) - restConfig, err := client.ClientConfig() - if err != nil { - continue - } - k8sClient, err := kubernetes.NewForConfig(restConfig) - if err != nil { - log.Errorf("error during create of kubernetes client interface for cluster: %s %+v", clusterID, err) - continue - } - for _, f := range c.subscriber { - f(k8sClient) - } - } else { - log.Infof("Cluster %s in the secret %s in namespace %s already exists", - clusterID, c.cs[clusterID], s.Namespace) - } - } - log.Infof("Number of remote clusters: %d", len(c.cs)) -} - -func (c *Controller) deleteMemberCluster(secretName string) { - for clusterID, cluster := range c.cs { - if cluster == secretName { - log.Infof("Deleting cluster member :%s", clusterID) - for _, f := range c.unSubscriber { - f(clusterID) - } - delete(c.cs, clusterID) - } - } - log.Infof("Number of remote clusters: %d", len(c.cs)) -} diff --git a/slime-modules/limiter/controllers/process.go b/slime-modules/limiter/controllers/process.go deleted file mode 100644 index 08fd4809..00000000 --- a/slime-modules/limiter/controllers/process.go +++ /dev/null @@ -1,218 +0,0 @@ -/* -* @Author: yangdihang -* @Date: 2020/11/19 - */ - -package controllers - -import ( - "context" - "fmt" - "reflect" - - log "github.com/sirupsen/logrus" - networking "istio.io/api/networking/v1alpha3" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - "slime.io/slime/slime-framework/apis/networking/v1alpha3" - "slime.io/slime/slime-framework/model" - event_source "slime.io/slime/slime-framework/model/source" - "slime.io/slime/slime-framework/util" - microservicev1alpha1 "slime.io/slime/slime-modules/limiter/api/v1alpha1" -) - -func (r *SmartLimiterReconciler) getMaterial(loc types.NamespacedName) map[string]string { - if i, ok := r.metricInfo.Get(loc.Namespace + "/" + loc.Name); ok { - if ep, ok := i.(*model.Endpoints); ok { - return util.CopyMap(ep.Info) - } - } - return nil -} - -func refreshEnvoyFilter(instance *microservicev1alpha1.SmartLimiter, r *SmartLimiterReconciler, obj *v1alpha3.EnvoyFilter) (reconcile.Result, error) { - name := obj.GetName() - namespace := obj.GetNamespace() - - if err := controllerutil.SetControllerReference(instance, obj, r.scheme); err != nil { - return reconcile.Result{}, err - } - found := &v1alpha3.EnvoyFilter{} - - err := r.Client.Get(context.TODO(), types.NamespacedName{Name: name, Namespace: namespace}, found) - - // Delete - if obj.Spec == nil { - if err != nil && !errors.IsNotFound(err) { - return reconcile.Result{}, err - } else if err == nil { - err = r.Client.Delete(context.TODO(), obj) - return reconcile.Result{}, err - } else { - // nothing to do - return reconcile.Result{}, nil - } - } - - // Create - if err != nil && errors.IsNotFound(err) { - log.Infof("Creating a new EnvoyFilter,%s:%s", namespace, name) - err = r.Client.Create(context.TODO(), obj) - if err != nil { - return reconcile.Result{}, err - } - - // Pod created successfully - don't requeue - return reconcile.Result{}, nil - } else if err != nil { - return reconcile.Result{}, err - } - - // TODO: 判断是否需要更新 - // Update - if !reflect.DeepEqual(found.Spec, obj.Spec) { - log.Infof("Update a new EnvoyFilter,%s:%s", namespace, name) - obj.ResourceVersion = found.ResourceVersion - err = r.Client.Update(context.TODO(), obj) - if err != nil { - return reconcile.Result{}, err - } - - // Pod created successfully - don't requeue - return reconcile.Result{}, nil - } - return reconcile.Result{}, nil -} - -func (r *SmartLimiterReconciler) WatchSource(stop <-chan struct{}) { - go func() { - for { - select { - case <-stop: - return - case e := <-r.eventChan: - switch e.EventType { - case event_source.Update, event_source.Add: - if _, err := r.Refresh(reconcile.Request{NamespacedName: e.Loc}, e.Info); err != nil { - fmt.Printf("error:%v", err) - } - } - } - } - }() -} - -func (r *SmartLimiterReconciler) Refresh(request reconcile.Request, args map[string]string) (reconcile.Result, error) { - _, ok := r.metricInfo.Get(request.Namespace + "/" + request.Name) - if !ok { - r.metricInfo.Set(request.Namespace+"/"+request.Name, &model.Endpoints{ - Location: request.NamespacedName, - Info: args, - }) - } else { - if i, ok := r.metricInfo.Get(request.Namespace + "/" + request.Name); ok { - if ep, ok := i.(*model.Endpoints); ok { - ep.Lock.Lock() - for key, value := range args { - ep.Info[key] = value - } - ep.Lock.Unlock() - } - } - } - - instance := µservicev1alpha1.SmartLimiter{} - err := r.Client.Get(context.TODO(), request.NamespacedName, instance) - if err != nil { - if errors.IsNotFound(err) { - // Request object not found, could have been deleted after reconcile request. - // Owned objects are automatically garbage collected. For additional cleanup logic use finalizers. - // Return and don't requeue - return reconcile.Result{}, nil - } - // Error reading the object - requeue the request. - return reconcile.Result{}, err - } - if result, err := r.refresh(instance); err == nil { - return result, nil - } else { - return reconcile.Result{}, err - } -} - -func (r *SmartLimiterReconciler) refresh(instance *microservicev1alpha1.SmartLimiter) (reconcile.Result, error) { - loc := types.NamespacedName{ - Namespace: instance.Namespace, - Name: instance.Name, - } - material := r.getMaterial(loc) - if instance.Spec.Sets == nil { - return reconcile.Result{}, util.Error{M: "invalid rateLimit spec"} - } - rateLimitConf := instance.Spec - - var efs map[string]*networking.EnvoyFilter - var descriptor map[string]*microservicev1alpha1.SmartLimitDescriptors - - // TODO: Since the com.netease.local_flow_control has not yet been opened, this function is disabled - /*if backend == config.Limiter_netEaseLocalFlowControl { - ef, descriptor = r.GenerateNeteaseFlowControl(rateLimitConf, material, instance) - }*/ - - efs, descriptor = r.GenerateEnvoyLocalLimit(rateLimitConf, material, instance) - for k, ef := range efs { - var efcr *v1alpha3.EnvoyFilter - if k == util.Wellkonw_BaseSet { - efcr = &v1alpha3.EnvoyFilter{ - ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("%s.%s.ratelimit", instance.Name, instance.Namespace), - Namespace: instance.Namespace, - }, - } - } else { - efcr = &v1alpha3.EnvoyFilter{ - ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("%s.%s.%s.ratelimit", instance.Name, instance.Namespace, k), - Namespace: instance.Namespace, - }, - } - } - if ef != nil { - if mi, err := util.ProtoToMap(ef); err == nil { - efcr.Spec = mi - } - } - _, err := refreshEnvoyFilter(instance, r, efcr) - if err != nil { - log.Errorf("generated/deleted EnvoyFilter %s failed:%+v", efcr.Name, err) - } - } - - instance.Status = microservicev1alpha1.SmartLimiterStatus{ - RatelimitStatus: descriptor, - MetricStatus: material, - } - if err := r.Client.Status().Update(context.TODO(), instance); err != nil { - return reconcile.Result{}, err - } - return reconcile.Result{}, nil -} - -func (r *SmartLimiterReconciler) subscribe(host string, subset interface{}) { - if name, ns, ok := util.IsK8SService(host); ok { - loc := types.NamespacedName{Name: name, Namespace: ns} - instance := µservicev1alpha1.SmartLimiter{} - err := r.Client.Get(context.TODO(), loc, instance) - if err != nil { - if !errors.IsNotFound(err) { - log.Errorf("failed to get smartlimiter, host:%s, %+v", host, err) - } - } else { - _, _ = r.refresh(instance) - } - } -} diff --git a/slime-modules/limiter/controllers/smartlimiter_controller.go b/slime-modules/limiter/controllers/smartlimiter_controller.go deleted file mode 100644 index 811d7bf2..00000000 --- a/slime-modules/limiter/controllers/smartlimiter_controller.go +++ /dev/null @@ -1,139 +0,0 @@ -/* - - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package controllers - -import ( - "context" - "reflect" - "sync" - - log "github.com/sirupsen/logrus" - - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/client-go/kubernetes" - - "sigs.k8s.io/controller-runtime/pkg/reconcile" - "slime.io/slime/slime-framework/model/source/aggregate" - "slime.io/slime/slime-framework/model/source/k8s" - "slime.io/slime/slime-modules/limiter/controllers/multicluster" - - cmap "github.com/orcaman/concurrent-map" - "k8s.io/apimachinery/pkg/runtime" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/source" - "slime.io/slime/slime-framework/bootstrap" - event_source "slime.io/slime/slime-framework/model/source" - microserviceslimeiov1alpha1 "slime.io/slime/slime-modules/limiter/api/v1alpha1" -) - -// SmartLimiterReconciler reconciles a SmartLimiter object -type SmartLimiterReconciler struct { - client.Client - Scheme *runtime.Scheme - - env *bootstrap.Environment - scheme *runtime.Scheme - - metricInfo cmap.ConcurrentMap - MetricSource source.Source - - metricInfoLock sync.RWMutex - eventChan chan event_source.Event - source event_source.Source - - lastUpdatePolicy microserviceslimeiov1alpha1.SmartLimiterSpec - lastUpdatePolicyLock *sync.RWMutex -} - -// +kubebuilder:rbac:groups=microservice.slime.io,resources=smartlimiters,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=microservice.slime.io,resources=smartlimiters/status,verbs=get;update;patch - -func (r *SmartLimiterReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { - _ = context.Background() - - // your logic here - - instance := µserviceslimeiov1alpha1.SmartLimiter{} - err := r.Client.Get(context.TODO(), req.NamespacedName, instance) - - // 异常分支 - if err != nil && !errors.IsNotFound(err) { - return reconcile.Result{}, err - } - - // 资源删除 - if err != nil && errors.IsNotFound(err) { - log.Infof("metricInfo.Pop, name %s, namespace,%s", req.Name, req.Namespace) - r.metricInfo.Pop(req.Namespace + "/" + req.Name) - r.source.WatchRemove(req.NamespacedName) - r.lastUpdatePolicyLock.Lock() - r.lastUpdatePolicy = microserviceslimeiov1alpha1.SmartLimiterSpec{} - r.lastUpdatePolicyLock.Unlock() - return reconcile.Result{}, nil - } - - // 资源更新 - r.lastUpdatePolicyLock.RLock() - if reflect.DeepEqual(instance.Spec, r.lastUpdatePolicy) { - r.lastUpdatePolicyLock.RUnlock() - return reconcile.Result{}, nil - } else { - r.lastUpdatePolicyLock.RUnlock() - r.lastUpdatePolicyLock.Lock() - r.lastUpdatePolicy = instance.Spec - r.lastUpdatePolicyLock.Unlock() - r.source.WatchAdd(req.NamespacedName) - } - - return ctrl.Result{}, nil -} - -func (r *SmartLimiterReconciler) SetupWithManager(mgr ctrl.Manager) error { - return ctrl.NewControllerManagedBy(mgr). - For(µserviceslimeiov1alpha1.SmartLimiter{}). - Complete(r) -} - -func NewReconciler(mgr ctrl.Manager, env *bootstrap.Environment) *SmartLimiterReconciler { - log := log.WithField("controllers", "SmartLimiter") - eventChan := make(chan event_source.Event) - src := &aggregate.Source{} - ms, err := k8s.NewMetricSource(eventChan, env) - if err != nil { - log.Errorf("failed to create slime-metric,%+v", err) - return nil - } - src.AppendSource(ms) - f := ms.SourceClusterHandler() - if env.Config.Limiter.Multicluster { - mc := multicluster.New(env, []func(*kubernetes.Clientset){f}, nil) - go mc.Run() - } - r := &SmartLimiterReconciler{ - Client: mgr.GetClient(), - scheme: mgr.GetScheme(), - metricInfo: cmap.New(), - eventChan: eventChan, - source: src, - env: env, - lastUpdatePolicyLock: &sync.RWMutex{}, - } - r.source.Start(env.Stop) - r.WatchSource(env.Stop) - return r -} diff --git a/slime-modules/limiter/controllers/suite_test.go b/slime-modules/limiter/controllers/suite_test.go deleted file mode 100644 index e284d3bd..00000000 --- a/slime-modules/limiter/controllers/suite_test.go +++ /dev/null @@ -1,78 +0,0 @@ -/* - - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package controllers - -import ( - "path/filepath" - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/envtest" - "sigs.k8s.io/controller-runtime/pkg/envtest/printer" - microserviceslimeiov1alpha1 "slime.io/slime/slime-modules/limiter/api/v1alpha1" - // +kubebuilder:scaffold:imports -) - -// These tests use Ginkgo (BDD-style Go testing framework). Refer to -// http://onsi.github.io/ginkgo/ to learn more about Ginkgo. - -var ( - cfg *rest.Config - k8sClient client.Client - testEnv *envtest.Environment -) - -func TestAPIs(t *testing.T) { - RegisterFailHandler(Fail) - - RunSpecsWithDefaultAndCustomReporters(t, - "Controller Suite", - []Reporter{printer.NewlineReporter{}}) -} - -var _ = BeforeSuite(func(done Done) { - By("bootstrapping test environment") - testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")}, - } - - var err error - cfg, err = testEnv.Start() - Expect(err).ToNot(HaveOccurred()) - Expect(cfg).ToNot(BeNil()) - - err = microserviceslimeiov1alpha1.AddToScheme(scheme.Scheme) - Expect(err).NotTo(HaveOccurred()) - - // +kubebuilder:scaffold:scheme - - k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) - Expect(err).ToNot(HaveOccurred()) - Expect(k8sClient).ToNot(BeNil()) - - close(done) -}, 60) - -var _ = AfterSuite(func() { - By("tearing down the test environment") - err := testEnv.Stop() - Expect(err).ToNot(HaveOccurred()) -}) diff --git a/slime-modules/limiter/go.mod b/slime-modules/limiter/go.mod deleted file mode 100644 index e6daca24..00000000 --- a/slime-modules/limiter/go.mod +++ /dev/null @@ -1,27 +0,0 @@ -module slime.io/slime/slime-modules/limiter - -go 1.13 - -require ( - github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad - github.com/go-logr/logr v0.1.0 - github.com/gogo/protobuf v1.3.2 - github.com/golang/protobuf v1.4.3 - github.com/onsi/ginkgo v1.11.0 - github.com/onsi/gomega v1.8.1 - github.com/orcaman/concurrent-map v0.0.0-20210106121528-16402b402231 - github.com/sirupsen/logrus v1.4.2 - go.uber.org/zap v1.10.0 - istio.io/api v0.0.0-20210322145030-ec7ef4cd6eaf - k8s.io/api v0.20.2 - k8s.io/apimachinery v0.20.2 - k8s.io/client-go v0.17.2 - sigs.k8s.io/controller-runtime v0.5.0 - slime.io/slime/slime-framework v0.0.0-00010101000000-000000000000 -) - -replace ( - k8s.io/api => k8s.io/api v0.17.2 - k8s.io/apimachinery => k8s.io/apimachinery v0.17.2 - slime.io/slime/slime-framework => ../../slime-framework -) diff --git a/slime-modules/limiter/go.sum b/slime-modules/limiter/go.sum deleted file mode 100644 index 1ac4cd5f..00000000 --- a/slime-modules/limiter/go.sum +++ /dev/null @@ -1,521 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -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/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -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/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -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= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403 h1:cqQfy1jclcSy/FwLjemeg3SR1yaINm74aQyupQ0Bl8M= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -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/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/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -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= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -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.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.9-0.20201210154907-fd9021fe5dad h1:EmNYJhPYy0pOFjCx2PrgtaBXmee0iUX9hLlxE1xHOJE= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= -github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= -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= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/zapr v0.1.0 h1:h+WVe9j6HAA01niTJPA/kKH0i7e0rLZBCwauQFcRE54= -github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -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= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -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/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/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/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/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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/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.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -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-20180513044358-24b0969c4cb7 h1:u4bArs140e9+AfE52mFHOXVFnOSBJBRlzTHrOPLOIhE= -github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/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/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.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= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -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/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/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.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= -github.com/google/go-cmp v0.5.0/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 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -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= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= -github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -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/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= -github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -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.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 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -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 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -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/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -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/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -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= -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/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/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/orcaman/concurrent-map v0.0.0-20210106121528-16402b402231 h1:fa50YL1pzKW+1SsBnJDOHppJN9stOEwS+CRWyUtyYGU= -github.com/orcaman/concurrent-map v0.0.0-20210106121528-16402b402231/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= -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/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -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= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -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/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0/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/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -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= -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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -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 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= -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.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -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.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -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-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-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -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-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/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= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -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-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-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -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 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -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= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -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-20201020160332-67f06af15bc9/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-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/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 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -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 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/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-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -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= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -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-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -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.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= -gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= -gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= -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= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -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= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -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.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -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= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -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.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -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= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.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.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -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-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -istio.io/api v0.0.0-20210322145030-ec7ef4cd6eaf h1:wAkMg4dDRWkas2Gzkln5926OvHw3g/XbKsjICF/msQw= -istio.io/api v0.0.0-20210322145030-ec7ef4cd6eaf/go.mod h1:nsSFw1LIMmGL7r/+6fJI6FxeG/UGlLxRK8bkojIvBVs= -istio.io/gogo-genproto v0.0.0-20210113155706-4daf5697332f h1:9710FpGLvIJ1GGEbpuTh1smVBv+r8cJfR3G82ouSxIQ= -istio.io/gogo-genproto v0.0.0-20210113155706-4daf5697332f/go.mod h1:6BwTZRNbWS570wHX/uR1Wqk5e0157TofTAUMzT7N4+s= -k8s.io/api v0.17.2 h1:NF1UFXcKN7/OOv1uxdRz3qfra8AHsPav5M93hlV9+Dc= -k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4= -k8s.io/apiextensions-apiserver v0.17.2 h1:cP579D2hSZNuO/rZj9XFRzwJNYb41DbNANJb6Kolpss= -k8s.io/apiextensions-apiserver v0.17.2/go.mod h1:4KdMpjkEjjDI2pPfBA15OscyNldHWdBCfsWMDWAmSTs= -k8s.io/apimachinery v0.17.2 h1:hwDQQFbdRlpnnsR64Asdi55GyCaIP/3WQpMmbNBeWr4= -k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= -k8s.io/apiserver v0.17.2/go.mod h1:lBmw/TtQdtxvrTk0e2cgtOxHizXI+d0mmGQURIHQZlo= -k8s.io/client-go v0.17.2 h1:ndIfkfXEGrNhLIgkr0+qhRguSD3u6DCmonepn1O6NYc= -k8s.io/client-go v0.17.2/go.mod h1:QAzRgsa0C2xl4/eVpeVAZMvikCn8Nm81yqVx3Kk9XYI= -k8s.io/code-generator v0.17.2/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= -k8s.io/component-base v0.17.2/go.mod h1:zMPW3g5aH7cHJpKYQ/ZsGMcgbsA/VyhEugF3QT1awLs= -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/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 v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU= -k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f h1:GiPwtSzdP43eI1hpPCbROQCCIgCuiMMNF8YUVLF3vJo= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -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= -modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= -sigs.k8s.io/controller-runtime v0.5.0 h1:CbqIy5fbUX+4E9bpnBFd204YAzRYlM9SWW77BbrcDQo= -sigs.k8s.io/controller-runtime v0.5.0/go.mod h1:REiJzC7Y00U+2YkMbT8wxgrsX5USpXKGhb2sCtAXiT8= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18= -sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/slime-modules/limiter/main.go b/slime-modules/limiter/main.go deleted file mode 100644 index 11a84053..00000000 --- a/slime-modules/limiter/main.go +++ /dev/null @@ -1,97 +0,0 @@ -/* - - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "os" - - log "github.com/sirupsen/logrus" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/kubernetes" - clientgoscheme "k8s.io/client-go/kubernetes/scheme" - _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" - - ctrl "sigs.k8s.io/controller-runtime" - istioapi "slime.io/slime/slime-framework/apis" - "slime.io/slime/slime-framework/bootstrap" - istiocontroller "slime.io/slime/slime-framework/controllers" - "slime.io/slime/slime-framework/util" - microserviceslimeiov1alpha1 "slime.io/slime/slime-modules/limiter/api/v1alpha1" - "slime.io/slime/slime-modules/limiter/controllers" - // +kubebuilder:scaffold:imports -) - -var scheme = runtime.NewScheme() - -func init() { - _ = clientgoscheme.AddToScheme(scheme) - - _ = microserviceslimeiov1alpha1.AddToScheme(scheme) - _ = istioapi.AddToScheme(scheme) - // +kubebuilder:scaffold:scheme -} - -func main() { - config := bootstrap.GetModuleConfig() - err := util.InitLog(config.Global.Log.LogLevel, config.Global.Log.KlogLevel) - if err != nil { - panic(err.Error()) - } - - mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ - Scheme: scheme, - MetricsBindAddress: config.Global.Misc["metrics-addr"], - Port: 9443, - LeaderElection: config.Global.Misc["enable-leader-election"] == "on", - LeaderElectionID: "limiter", - }) - if err != nil { - log.Errorf("unable to start manager, %+v", err) - os.Exit(1) - } - env := bootstrap.Environment{} - env.Config = config - client, err := kubernetes.NewForConfig(mgr.GetConfig()) - if err != nil { - log.Errorf("unable to start manager, %+v", err) - os.Exit(1) - } - env.K8SClient = client - rec := controllers.NewReconciler(mgr, &env) - if err = rec.SetupWithManager(mgr); err != nil { - log.Errorf("unable to create controller SmartLimiter, %+v", err) - os.Exit(1) - } - - // add dr reconcile - if err = (&istiocontroller.DestinationRuleReconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - }).SetupWithManager(mgr); err != nil { - log.Errorf("unable to create controller DestinationRule, %+v", err) - os.Exit(1) - } - // +kubebuilder:scaffold:builder - - go bootstrap.AuxiliaryHttpServerStart(config.Global.Misc["aux-addr"]) - - log.Info("starting manager") - if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil { - log.Errorf("problem running manager, %+v", err) - os.Exit(1) - } -} diff --git a/slime-modules/limiter/publish.sh b/slime-modules/limiter/publish.sh deleted file mode 100755 index 231b3f6d..00000000 --- a/slime-modules/limiter/publish.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -export MOD=limiter -../../bin/publish.sh "$@"