From e24af77474f4418fde624a5da3b0a427ec0797c5 Mon Sep 17 00:00:00 2001 From: Zespre Chang Date: Wed, 31 Jan 2024 16:32:43 +0800 Subject: [PATCH 1/4] fix(webhook): add server ip validation If a user tries to configure the embedded DHCP server with a designated IP address, the IPPool validator will validate the input. The create/ update request will be rejected if: - The server IP is not within the defined subnet - The server IP is the same as the network IP or broadcast IP of the subnet - The server IP is the same as the router IP (if exists) - The server IP collides with any already-allocated IPs Signed-off-by: Zespre Chang --- pkg/util/network.go | 33 +++++++++++++ pkg/webhook/ippool/validator.go | 86 ++++++++++++++++++++++++++++++--- 2 files changed, 113 insertions(+), 6 deletions(-) create mode 100644 pkg/util/network.go diff --git a/pkg/util/network.go b/pkg/util/network.go new file mode 100644 index 0000000..2a3bb9f --- /dev/null +++ b/pkg/util/network.go @@ -0,0 +1,33 @@ +package util + +import ( + "fmt" + "net" + "net/netip" +) + +func LoadCIDR(cidr string) (ipNet *net.IPNet, networkIPAddr netip.Addr, broadcastIPAddr netip.Addr, err error) { + _, ipNet, err = net.ParseCIDR(cidr) + if err != nil { + return + } + + networkIPAddr, ok := netip.AddrFromSlice(ipNet.IP) + if !ok { + err = fmt.Errorf("cannot convert ip address %s", ipNet.IP) + return + } + + broadcastIP := make(net.IP, len(ipNet.IP)) + copy(broadcastIP, ipNet.IP) + for i := range broadcastIP { + broadcastIP[i] |= ^ipNet.Mask[i] + } + broadcastIPAddr, ok = netip.AddrFromSlice(broadcastIP) + if !ok { + err = fmt.Errorf("cannot convert ip address %s", broadcastIP) + return + } + + return +} diff --git a/pkg/webhook/ippool/validator.go b/pkg/webhook/ippool/validator.go index a55b0ce..b1ae87d 100644 --- a/pkg/webhook/ippool/validator.go +++ b/pkg/webhook/ippool/validator.go @@ -2,6 +2,7 @@ package ippool import ( "fmt" + "net/netip" "strings" "github.com/harvester/webhook/pkg/server/admission" @@ -31,24 +32,43 @@ func NewValidator(nadCache ctlcniv1.NetworkAttachmentDefinitionCache, vmnetcfgCa } } -func (v *Validator) Create(request *admission.Request, newObj runtime.Object) error { +func (v *Validator) Create(_ *admission.Request, newObj runtime.Object) error { ipPool := newObj.(*networkv1.IPPool) logrus.Infof("create ippool %s/%s", ipPool.Namespace, ipPool.Name) - nadNamespace, nadName := kv.RSplit(ipPool.Spec.NetworkName, "/") - if nadNamespace == "" { - nadNamespace = "default" + if err := v.checkNAD(ipPool); err != nil { + return fmt.Errorf(webhook.CreateErr, ipPool.Kind, ipPool.Namespace, ipPool.Name, err) } - if _, err := v.nadCache.Get(nadNamespace, nadName); err != nil { + if err := v.checkServerIP(ipPool); err != nil { return fmt.Errorf(webhook.CreateErr, ipPool.Kind, ipPool.Namespace, ipPool.Name, err) } return nil } -func (v *Validator) Delete(request *admission.Request, newObj runtime.Object) error { +func (v *Validator) Update(_ *admission.Request, _, newObj runtime.Object) error { ipPool := newObj.(*networkv1.IPPool) + + if ipPool.DeletionTimestamp != nil { + return nil + } + + logrus.Infof("update ippool %s/%s", ipPool.Namespace, ipPool.Name) + + if err := v.checkNAD(ipPool); err != nil { + return fmt.Errorf(webhook.CreateErr, ipPool.Kind, ipPool.Namespace, ipPool.Name, err) + } + + if err := v.checkServerIP(ipPool); err != nil { + return fmt.Errorf(webhook.CreateErr, ipPool.Kind, ipPool.Namespace, ipPool.Name, err) + } + + return nil +} + +func (v *Validator) Delete(_ *admission.Request, oldObj runtime.Object) error { + ipPool := oldObj.(*networkv1.IPPool) logrus.Infof("delete ippool %s/%s", ipPool.Namespace, ipPool.Name) if err := v.checkVmNetCfgs(ipPool); err != nil { @@ -67,11 +87,65 @@ func (v *Validator) Resource() admission.Resource { ObjectType: &networkv1.IPPool{}, OperationTypes: []admissionregv1.OperationType{ admissionregv1.Create, + admissionregv1.Update, admissionregv1.Delete, }, } } +func (v *Validator) checkNAD(ipPool *networkv1.IPPool) error { + nadNamespace, nadName := kv.RSplit(ipPool.Spec.NetworkName, "/") + if nadNamespace == "" { + nadNamespace = "default" + } + + _, err := v.nadCache.Get(nadNamespace, nadName) + return err +} + +func (v *Validator) checkServerIP(ipPool *networkv1.IPPool) error { + ipNet, networkIPAddr, broadcastIPAddr, err := util.LoadCIDR(ipPool.Spec.IPv4Config.CIDR) + if err != nil { + return err + } + + routerIPAddr, err := netip.ParseAddr(ipPool.Spec.IPv4Config.Router) + if err != nil { + routerIPAddr = netip.Addr{} + } + + serverIPAddr, err := netip.ParseAddr(ipPool.Spec.IPv4Config.ServerIP) + if err != nil { + return err + } + + if !ipNet.Contains(serverIPAddr.AsSlice()) { + return fmt.Errorf("server ip %s is not within subnet", serverIPAddr) + } + + if serverIPAddr.As4() == networkIPAddr.As4() { + return fmt.Errorf("server ip %s cannot be the same as network ip", serverIPAddr) + } + + if serverIPAddr.As4() == broadcastIPAddr.As4() { + return fmt.Errorf("server ip %s cannot be the same as broadcast ip", serverIPAddr) + } + + if routerIPAddr.IsValid() && serverIPAddr.As4() == routerIPAddr.As4() { + return fmt.Errorf("server ip %s cannot be the same as router ip", serverIPAddr) + } + + if ipPool.Status.IPv4 != nil { + for ip, mac := range ipPool.Status.IPv4.Allocated { + if serverIPAddr.String() == ip { + return fmt.Errorf("server ip %s is already allocated by mac %s", serverIPAddr, mac) + } + } + } + + return nil +} + func (v *Validator) checkVmNetCfgs(ipPool *networkv1.IPPool) error { vmnetcfgGetter := util.VmnetcfgGetter{ VmnetcfgCache: v.vmnetcfgCache, From 697100d628e156fc4bf73dde6f47c3737744e996 Mon Sep 17 00:00:00 2001 From: Zespre Chang Date: Wed, 31 Jan 2024 23:39:02 +0800 Subject: [PATCH 2/4] test(webhook): add tests for ippool validator Signed-off-by: Zespre Chang --- pkg/controller/ippool/common.go | 15 +- pkg/controller/ippool/controller_test.go | 4 +- pkg/webhook/ippool/validator.go | 8 +- pkg/webhook/ippool/validator_test.go | 285 +++++++++++++++++++++++ 4 files changed, 301 insertions(+), 11 deletions(-) create mode 100644 pkg/webhook/ippool/validator_test.go diff --git a/pkg/controller/ippool/common.go b/pkg/controller/ippool/common.go index fa73c61..eb9d65a 100644 --- a/pkg/controller/ippool/common.go +++ b/pkg/controller/ippool/common.go @@ -212,6 +212,11 @@ func (b *IPPoolBuilder) CIDR(cidr string) *IPPoolBuilder { return b } +func (b *IPPoolBuilder) Router(router string) *IPPoolBuilder { + b.ipPool.Spec.IPv4Config.Router = router + return b +} + func (b *IPPoolBuilder) PoolRange(start, end string) *IPPoolBuilder { b.ipPool.Spec.IPv4Config.Pool.Start = start b.ipPool.Spec.IPv4Config.Pool.End = end @@ -386,12 +391,12 @@ func (b *podBuilder) Build() *corev1.Pod { return b.pod } -type networkAttachmentDefinitionBuilder struct { +type NetworkAttachmentDefinitionBuilder struct { nad *cniv1.NetworkAttachmentDefinition } -func newNetworkAttachmentDefinitionBuilder(namespace, name string) *networkAttachmentDefinitionBuilder { - return &networkAttachmentDefinitionBuilder{ +func NewNetworkAttachmentDefinitionBuilder(namespace, name string) *NetworkAttachmentDefinitionBuilder { + return &NetworkAttachmentDefinitionBuilder{ nad: &cniv1.NetworkAttachmentDefinition{ ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, @@ -401,7 +406,7 @@ func newNetworkAttachmentDefinitionBuilder(namespace, name string) *networkAttac } } -func (b *networkAttachmentDefinitionBuilder) Label(key, value string) *networkAttachmentDefinitionBuilder { +func (b *NetworkAttachmentDefinitionBuilder) Label(key, value string) *NetworkAttachmentDefinitionBuilder { if b.nad.Labels == nil { b.nad.Labels = make(map[string]string) } @@ -409,7 +414,7 @@ func (b *networkAttachmentDefinitionBuilder) Label(key, value string) *networkAt return b } -func (b *networkAttachmentDefinitionBuilder) Build() *cniv1.NetworkAttachmentDefinition { +func (b *NetworkAttachmentDefinitionBuilder) Build() *cniv1.NetworkAttachmentDefinition { return b.nad } diff --git a/pkg/controller/ippool/controller_test.go b/pkg/controller/ippool/controller_test.go index 86c2a4f..f86a36a 100644 --- a/pkg/controller/ippool/controller_test.go +++ b/pkg/controller/ippool/controller_test.go @@ -82,8 +82,8 @@ func newTestIPPoolStatusBuilder() *ipPoolStatusBuilder { return newIPPoolStatusBuilder() } -func newTestNetworkAttachmentDefinitionBuilder() *networkAttachmentDefinitionBuilder { - return newNetworkAttachmentDefinitionBuilder(testNADNamespace, testNADName) +func newTestNetworkAttachmentDefinitionBuilder() *NetworkAttachmentDefinitionBuilder { + return NewNetworkAttachmentDefinitionBuilder(testNADNamespace, testNADName) } func TestHandler_OnChange(t *testing.T) { diff --git a/pkg/webhook/ippool/validator.go b/pkg/webhook/ippool/validator.go index b1ae87d..e6746c9 100644 --- a/pkg/webhook/ippool/validator.go +++ b/pkg/webhook/ippool/validator.go @@ -37,11 +37,11 @@ func (v *Validator) Create(_ *admission.Request, newObj runtime.Object) error { logrus.Infof("create ippool %s/%s", ipPool.Namespace, ipPool.Name) if err := v.checkNAD(ipPool); err != nil { - return fmt.Errorf(webhook.CreateErr, ipPool.Kind, ipPool.Namespace, ipPool.Name, err) + return fmt.Errorf(webhook.CreateErr, "IPPool", ipPool.Namespace, ipPool.Name, err) } if err := v.checkServerIP(ipPool); err != nil { - return fmt.Errorf(webhook.CreateErr, ipPool.Kind, ipPool.Namespace, ipPool.Name, err) + return fmt.Errorf(webhook.CreateErr, "IPPool", ipPool.Namespace, ipPool.Name, err) } return nil @@ -57,11 +57,11 @@ func (v *Validator) Update(_ *admission.Request, _, newObj runtime.Object) error logrus.Infof("update ippool %s/%s", ipPool.Namespace, ipPool.Name) if err := v.checkNAD(ipPool); err != nil { - return fmt.Errorf(webhook.CreateErr, ipPool.Kind, ipPool.Namespace, ipPool.Name, err) + return fmt.Errorf(webhook.CreateErr, "IPPool", ipPool.Namespace, ipPool.Name, err) } if err := v.checkServerIP(ipPool); err != nil { - return fmt.Errorf(webhook.CreateErr, ipPool.Kind, ipPool.Namespace, ipPool.Name, err) + return fmt.Errorf(webhook.CreateErr, "IPPool", ipPool.Namespace, ipPool.Name, err) } return nil diff --git a/pkg/webhook/ippool/validator_test.go b/pkg/webhook/ippool/validator_test.go new file mode 100644 index 0000000..e9e7a4a --- /dev/null +++ b/pkg/webhook/ippool/validator_test.go @@ -0,0 +1,285 @@ +package ippool + +import ( + "fmt" + "testing" + + "github.com/harvester/webhook/pkg/server/admission" + cniv1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" + "github.com/stretchr/testify/assert" + "k8s.io/apimachinery/pkg/runtime/schema" + + networkv1 "github.com/harvester/vm-dhcp-controller/pkg/apis/network.harvesterhci.io/v1alpha1" + "github.com/harvester/vm-dhcp-controller/pkg/controller/ippool" + "github.com/harvester/vm-dhcp-controller/pkg/generated/clientset/versioned/fake" + "github.com/harvester/vm-dhcp-controller/pkg/util/fakeclient" +) + +const ( + testNADNamespace = "default" + testNADName = "net-1" + testIPPoolNamespace = testNADNamespace + testIPPoolName = testNADName + testServerIPOutOfRange = "192.168.100.2" + testRouter = "192.168.0.1" + testNetworkName = testNADNamespace + "/" + testNADName +) + +func newTestIPPoolBuilder() *ippool.IPPoolBuilder { + return ippool.NewIPPoolBuilder(testIPPoolNamespace, testIPPoolName) +} + +func newTestNetworkAttachmentDefinitionBuilder() *ippool.NetworkAttachmentDefinitionBuilder { + return ippool.NewNetworkAttachmentDefinitionBuilder(testNADNamespace, testNADName) +} + +func TestValidator_Create(t *testing.T) { + type input struct { + ipPool *networkv1.IPPool + nad *cniv1.NetworkAttachmentDefinition + } + + type output struct { + err error + } + + testCases := []struct { + name string + given input + expected output + }{ + { + name: "valid server ip", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + ServerIP("192.168.0.2"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + }, + { + name: "invalid server ip which is out of range", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + ServerIP("192.168.100.2"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because server ip %s is not within subnet", testIPPoolNamespace, testIPPoolName, testServerIPOutOfRange), + }, + }, + { + name: "invalid server ip which is the same as network ip", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.128/25"). + ServerIP("192.168.0.128"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because server ip %s cannot be the same as network ip", testIPPoolNamespace, testIPPoolName, "192.168.0.128"), + }, + }, + { + name: "invalid server ip which is the same as broadcast ip", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/25"). + ServerIP("192.168.0.127"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because server ip %s cannot be the same as broadcast ip", testIPPoolNamespace, testIPPoolName, "192.168.0.127"), + }, + }, + { + name: "invalid server ip which is the same as router ip", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.254/24"). + ServerIP("192.168.0.254"). + Router("192.168.0.254"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because server ip %s cannot be the same as router ip", testIPPoolNamespace, testIPPoolName, "192.168.0.254"), + }, + }, + } + + nadGVR := schema.GroupVersionResource{ + Group: "k8s.cni.cncf.io", + Version: "v1", + Resource: "network-attachment-definitions", + } + + for _, tc := range testCases { + clientset := fake.NewSimpleClientset() + err := clientset.Tracker().Create(nadGVR, tc.given.nad, tc.given.nad.Namespace) + assert.Nil(t, err, "mock resource should add into fake controller tracker") + + nadCache := fakeclient.NetworkAttachmentDefinitionCache(clientset.K8sCniCncfIoV1().NetworkAttachmentDefinitions) + vmnetCache := fakeclient.VirtualMachineNetworkConfigCache(clientset.NetworkV1alpha1().VirtualMachineNetworkConfigs) + validator := NewValidator(nadCache, vmnetCache) + + err = validator.Create(&admission.Request{}, tc.given.ipPool) + + if tc.expected.err != nil { + assert.Equal(t, tc.expected.err.Error(), err.Error(), tc.name) + } else { + assert.Nil(t, err, tc.name) + } + } +} + +func TestValidator_Update(t *testing.T) { + type input struct { + oldIPPool *networkv1.IPPool + newIPPool *networkv1.IPPool + nad *cniv1.NetworkAttachmentDefinition + } + + type output struct { + err error + } + + testCases := []struct { + name string + given input + expected output + }{ + { + name: "valid server ip", + given: input{ + oldIPPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + ServerIP("192.168.0.2"). + NetworkName(testNetworkName).Build(), + newIPPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + ServerIP("192.168.0.254"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + }, + { + name: "invalid server ip which is out of range", + given: input{ + oldIPPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + ServerIP("192.168.0.2"). + NetworkName(testNetworkName).Build(), + newIPPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + ServerIP("192.168.100.2"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because server ip %s is not within subnet", testIPPoolNamespace, testIPPoolName, testServerIPOutOfRange), + }, + }, + { + name: "invalid server ip which is the same as network ip", + given: input{ + oldIPPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + ServerIP("192.168.0.2"). + NetworkName(testNetworkName).Build(), + newIPPool: newTestIPPoolBuilder(). + CIDR("192.168.0.128/25"). + ServerIP("192.168.0.128"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because server ip %s cannot be the same as network ip", testIPPoolNamespace, testIPPoolName, "192.168.0.128"), + }, + }, + { + name: "invalid server ip which is the same as broadcast ip", + given: input{ + oldIPPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + ServerIP("192.168.0.2"). + NetworkName(testNetworkName).Build(), + newIPPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/25"). + ServerIP("192.168.0.127"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because server ip %s cannot be the same as broadcast ip", testIPPoolNamespace, testIPPoolName, "192.168.0.127"), + }, + }, + { + name: "invalid server ip which is the same as router ip", + given: input{ + oldIPPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + ServerIP("192.168.0.2"). + NetworkName(testNetworkName).Build(), + newIPPool: newTestIPPoolBuilder(). + CIDR("192.168.0.254/24"). + ServerIP("192.168.0.254"). + Router("192.168.0.254"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because server ip %s cannot be the same as router ip", testIPPoolNamespace, testIPPoolName, "192.168.0.254"), + }, + }, + { + name: "invalid server ip which collides with other allocated ips", + given: input{ + + oldIPPool: newTestIPPoolBuilder(). + CIDR("192.168.0.254/24"). + ServerIP("192.168.0.2"). + NetworkName(testNetworkName). + Allocated("192.168.0.100", "11:22:33:44:55:66").Build(), + newIPPool: newTestIPPoolBuilder(). + CIDR("192.168.0.254/24"). + ServerIP("192.168.0.100"). + NetworkName(testNetworkName). + Allocated("192.168.0.100", "11:22:33:44:55:66").Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because server ip %s is already allocated by mac %s", testIPPoolNamespace, testIPPoolName, "192.168.0.100", "11:22:33:44:55:66"), + }, + }, + } + + nadGVR := schema.GroupVersionResource{ + Group: "k8s.cni.cncf.io", + Version: "v1", + Resource: "network-attachment-definitions", + } + + for _, tc := range testCases { + clientset := fake.NewSimpleClientset() + err := clientset.Tracker().Create(nadGVR, tc.given.nad, tc.given.nad.Namespace) + assert.Nil(t, err, "mock resource should add into fake controller tracker") + + nadCache := fakeclient.NetworkAttachmentDefinitionCache(clientset.K8sCniCncfIoV1().NetworkAttachmentDefinitions) + vmnetCache := fakeclient.VirtualMachineNetworkConfigCache(clientset.NetworkV1alpha1().VirtualMachineNetworkConfigs) + validator := NewValidator(nadCache, vmnetCache) + + err = validator.Update(&admission.Request{}, tc.given.oldIPPool, tc.given.newIPPool) + + if tc.expected.err != nil { + assert.Equal(t, tc.expected.err.Error(), err.Error(), tc.name) + } else { + assert.Nil(t, err, tc.name) + } + } +} From 950f2b0f48cc56e3fc712a003a3ebd44978be95e Mon Sep 17 00:00:00 2001 From: Zespre Chang Date: Fri, 2 Feb 2024 17:50:30 +0800 Subject: [PATCH 3/4] feat(crd): add crd validation Adding validations against most of the fields. Also, change the way loading CRDs at controller start-up. This is because CRD manifests are now generated using controller-gen, not Wrangler codegen. The reason behind it is that, currently only controller-gen supports CRD validation using CEL. Signed-off-by: Zespre Chang --- .../crds/network.harvesterhci.io_ippools.yaml | 48 +- ...erhci.io_virtualmachinenetworkconfigs.yaml | 21 +- go.mod | 67 +-- go.sum | 423 +++--------------- main.go | 2 + .../v1alpha1/ippool.go | 54 ++- .../v1alpha1/virtualmachinenetworkconfig.go | 28 +- .../v1alpha1/zz_generated_deepcopy.go | 8 +- pkg/bindata/main.go | 24 + pkg/codegen/main.go | 2 - pkg/controller/vm/controller.go | 6 +- pkg/controller/vmnetcfg/common.go | 6 +- pkg/controller/vmnetcfg/controller.go | 12 +- pkg/crd/crd.go | 77 ++-- pkg/data/data.go | 272 +++++++++++ pkg/indexer/indexer.go | 2 +- pkg/webhook/vmnetcfg/validator.go | 2 +- 17 files changed, 568 insertions(+), 486 deletions(-) create mode 100644 pkg/bindata/main.go create mode 100644 pkg/data/data.go diff --git a/chart/crds/network.harvesterhci.io_ippools.yaml b/chart/crds/network.harvesterhci.io_ippools.yaml index 3abc23d..f42e756 100644 --- a/chart/crds/network.harvesterhci.io_ippools.yaml +++ b/chart/crds/network.harvesterhci.io_ippools.yaml @@ -66,9 +66,14 @@ spec: properties: cidr: type: string + x-kubernetes-validations: + - message: CIDR is immutable + rule: self == oldSelf dns: + format: ipv4 items: type: string + maxItems: 3 type: array domainName: type: string @@ -81,27 +86,67 @@ spec: ntp: items: type: string + maxItems: 4 type: array pool: properties: end: + format: ipv4 type: string + x-kubernetes-validations: + - message: End is immutable + rule: self == oldSelf exclude: + format: ipv4 items: type: string type: array + x-kubernetes-validations: + - message: Exclude is immutable + rule: self == oldSelf start: + format: ipv4 type: string + x-kubernetes-validations: + - message: Start is immutable + rule: self == oldSelf + required: + - end + - start type: object + x-kubernetes-validations: + - message: End is required once set + rule: '!has(oldSelf.exclude) || has(self.exclude)' router: + format: ipv4 type: string + x-kubernetes-validations: + - message: Router is immutable + rule: self == oldSelf serverIP: + format: ipv4 type: string + x-kubernetes-validations: + - message: ServerIP is immutable + rule: self == oldSelf + required: + - cidr + - pool + - serverIP type: object + x-kubernetes-validations: + - message: Router is required once set + rule: '!has(oldSelf.router) || has(self.router)' networkName: + maxLength: 64 type: string + x-kubernetes-validations: + - message: NetworkName is immutable + rule: self == oldSelf paused: type: boolean + required: + - networkName type: object status: properties: @@ -161,4 +206,5 @@ spec: type: object served: true storage: true - subresources: {} + subresources: + status: {} diff --git a/chart/crds/network.harvesterhci.io_virtualmachinenetworkconfigs.yaml b/chart/crds/network.harvesterhci.io_virtualmachinenetworkconfigs.yaml index b93f24c..cba324d 100644 --- a/chart/crds/network.harvesterhci.io_virtualmachinenetworkconfigs.yaml +++ b/chart/crds/network.harvesterhci.io_virtualmachinenetworkconfigs.yaml @@ -50,21 +50,37 @@ spec: type: object spec: properties: - networkConfig: + networkConfigs: items: properties: ipAddress: + format: ipv4 type: string macAddress: + maxLength: 17 type: string networkName: + maxLength: 64 type: string + required: + - macAddress + - networkName type: object + maxItems: 4 type: array + x-kubernetes-validations: + - message: NetworkConfig may only be added + rule: oldSelf.all(x, x in self) paused: type: boolean vmName: + maxLength: 64 type: string + x-kubernetes-validations: + - message: VMName is immutable + rule: self == oldSelf + required: + - vmName type: object status: properties: @@ -113,4 +129,5 @@ spec: type: object served: true storage: true - subresources: {} + subresources: + status: {} diff --git a/go.mod b/go.mod index 3bab7b6..c3627a0 100644 --- a/go.mod +++ b/go.mod @@ -21,33 +21,22 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 - golang.org/x/sync v0.3.0 - k8s.io/api v0.27.9 - k8s.io/apiextensions-apiserver v0.27.9 - k8s.io/apimachinery v0.27.9 + golang.org/x/sync v0.5.0 + k8s.io/api v0.29.0 + k8s.io/apimachinery v0.29.0 k8s.io/client-go v12.0.0+incompatible kubevirt.io/api v1.1.0 ) -require github.com/pmezard/go-difflib v1.0.0 // indirect - -require ( - github.com/gorilla/mux v1.8.0 - github.com/rancher/dynamiclistener v0.3.5 // indirect - golang.org/x/crypto v0.17.0 // indirect - k8s.io/klog v1.0.0 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-aggregator v0.25.4 // indirect -) - require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-bindata/go-bindata/v3 v3.1.3 + github.com/go-logr/logr v1.4.1 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect @@ -55,50 +44,62 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect + github.com/gorilla/mux v1.8.0 github.com/imdario/mergo v0.3.13 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/josharian/native v1.1.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kisielk/errcheck v1.5.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/onsi/ginkgo/v2 v2.14.0 // indirect + github.com/onsi/gomega v1.30.0 // indirect github.com/openshift/api v0.0.0 // indirect github.com/openshift/custom-resource-status v1.1.2 // indirect github.com/pborman/uuid v1.2.1 // indirect github.com/pierrec/lz4/v4 v4.1.17 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.14.0 - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.18.0 + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rancher/dynamiclistener v0.3.5 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/u-root/uio v0.0.0-20230220225925-ffce2a382923 // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/crypto v0.17.0 // indirect + golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/oauth2 v0.12.0 // indirect + golang.org/x/sys v0.16.0 // indirect golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.12.0 // indirect + golang.org/x/tools v0.16.1 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/code-generator v0.27.9 // indirect - k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect + k8s.io/apiextensions-apiserver v0.28.0-alpha.1 // indirect + k8s.io/code-generator v0.28.0-alpha.1 // indirect + k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect + k8s.io/klog v1.0.0 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-aggregator v0.25.4 // indirect k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 // indirect - k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect kubevirt.io/containerized-data-importer-api v1.58.0 // indirect kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index b7c6f82..8ec50fc 100644 --- a/go.sum +++ b/go.sum @@ -1,62 +1,19 @@ 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/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= 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.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= 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/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -67,11 +24,9 @@ github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.15.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= @@ -81,24 +36,16 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-bindata/go-bindata/v3 v3.1.3 h1:F0nVttLC3ws0ojc7p60veTurcOm//D4QBODNM7EGrCI= +github.com/go-bindata/go-bindata/v3 v3.1.3/go.mod h1:1/zrpXsLD8YDIbhZRqXzm1Ghc7NhEvIN9+Z6R5/xH4I= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= @@ -114,34 +61,20 @@ github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/ github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 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-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -149,50 +82,32 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/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/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= @@ -202,10 +117,7 @@ github.com/harvester/harvester v1.2.1 h1:2pdtrt2ttNV+oYngVgYexAa1Tv2TX6YO55iQ46v github.com/harvester/harvester v1.2.1/go.mod h1:LyyBmcQLgNA0otGXhL2O8ZAgAU8UDax5IVTr6eNx2BI= github.com/harvester/webhook v0.1.4 h1:6g5MkYXlGm0wABQ/Dm8g5sM7WAtPq2aiWOH9wmf2vUQ= github.com/harvester/webhook v0.1.4/go.mod h1:vfRPB26WHSPxMF/ONpUVzaEaewTUxpP9qAqu1ZyonR0= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= @@ -218,28 +130,21 @@ github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFF github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA= github.com/josharian/native v1.1.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.4.0 h1:VzM3TYHDgqPkettiP6I6q2jOeQFL4nrJM+UcAc4f6Fs= github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.4.0/go.mod h1:nqCI7aelBJU61wiBeeZWJ6oi4bJy5nrjkM6lWIMA4j0= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -249,9 +154,8 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mdlayher/packet v1.1.2 h1:3Up1NG6LZrsgDVn6X4L9Ge/iyRyxFEFD9o6Pr3Q1nQY= github.com/mdlayher/packet v1.1.2/go.mod h1:GEu1+n9sG5VtiRE4SydOmX5GTwyyYlteZiFU+x0kew4= github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U= @@ -261,15 +165,12 @@ github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0Gq 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-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -279,7 +180,6 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= @@ -291,8 +191,8 @@ github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1L github.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc= github.com/onsi/ginkgo/v2 v2.9.0/go.mod h1:4xkjoL/tZv4SMWeww56BU5kAt19mVB47gTWxmrTcxyk= github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo= -github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= -github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts= +github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY= +github.com/onsi/ginkgo/v2 v2.14.0/go.mod h1:JkUdW7JkN0V6rFvsHcJ478egV3XH9NxpD27Hal/PhZw= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -308,8 +208,8 @@ github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdM github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw= github.com/onsi/gomega v1.27.3/go.mod h1:5vG284IBtfDAmDyrK+eGyZmUgUlmi+Wngqo557cZ6Gw= github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= -github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= -github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= +github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= +github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/openshift/api v0.0.0-20191219222812-2987a591a72c h1:WRWMmqacvmZDbUat6WYqpuCy2yEfIeDsxFD/Htgp2T0= github.com/openshift/api v0.0.0-20191219222812-2987a591a72c/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/custom-resource-status v1.1.2 h1:C3DL44LEbvlbItfd8mT5jWrqPfHnSOQoQf/sypqA6A4= @@ -319,52 +219,29 @@ github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pierrec/lz4/v4 v4.1.17 h1:kV4Ip+/hUBC+8T6+2EgburRtkE9ef4nbY3f4dFhGjMc= github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -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_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rancher/dynamiclistener v0.3.5 h1:5TaIHvkDGmZKvc96Huur16zfTKOiLhDtK4S+WV0JA6A= github.com/rancher/dynamiclistener v0.3.5/go.mod h1:dW/YF6/m2+uEyJ5VtEcd9THxda599HP6N9dSXk81+k0= github.com/rancher/lasso v0.0.0-20230830164424-d684fdeb6f29 h1:+kige/h8/LnzWgPjB5NUIHz/pWiW/lFpqcTUkN5uulY= github.com/rancher/lasso v0.0.0-20230830164424-d684fdeb6f29/go.mod h1:kgk9kJVMj9FIrrXU0iyM6u/9Je4bEjPImqswkTVaKsQ= github.com/rancher/wrangler v1.1.1 h1:wmqUwqc2M7ADfXnBCJTFkTB5ZREWpD78rnZMzmxwMvM= github.com/rancher/wrangler v1.1.1/go.mod h1:ioVbKupzcBOdzsl55MvEDN0R1wdGggj8iNCYGFI5JvM= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -374,12 +251,9 @@ 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/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -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/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -390,23 +264,13 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/u-root/uio v0.0.0-20230220225925-ffce2a382923 h1:tHNk7XK9GkmKUR6Gh8gVBKXc2MVSZ4G/NnWLtzw4gNA= github.com/u-root/uio v0.0.0-20230220225925-ffce2a382923/go.mod h1:eLL9Nub3yfAho7qB0MzZizFhTU2QkLeoVsWdHtDW264= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/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-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -416,33 +280,13 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 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/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -453,45 +297,25 @@ golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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-20181114220301-adae6a3d119a/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-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/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-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -509,83 +333,45 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= 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-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 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-20181116152217-5ac8a444bdc5/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-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-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -602,8 +388,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -617,9 +403,7 @@ golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -635,53 +419,19 @@ golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/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-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-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/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-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -693,79 +443,25 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= -golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= 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/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/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/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/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-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/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= @@ -775,14 +471,12 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -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/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -797,7 +491,6 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD 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.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -809,27 +502,22 @@ gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.27.9 h1:zelL2mPSOAgcItlCwIzy75/wl4Rt9kSKLMQYhAE2tA4= k8s.io/api v0.27.9/go.mod h1:H6ZBAkYZ3B/BbyS6Us85MJas3OJp4xteQF4+kZHaw6g= -k8s.io/apiextensions-apiserver v0.27.9 h1:z7f95DVIrNkscuV2f/JdZNpjOxpUYeeRYcmrn0Wixas= -k8s.io/apiextensions-apiserver v0.27.9/go.mod h1:0/FD0h+vIInWSBUFv3sFgAkU5Zfd74Mwz0dOHWxr7/k= +k8s.io/apiextensions-apiserver v0.28.0-alpha.1 h1:Su9cuOVxCAIDN+nuc0C2UceuztljaG3LUndm436RPhI= +k8s.io/apiextensions-apiserver v0.28.0-alpha.1/go.mod h1:pau7yWNjTSOO+3l/IgHcu3M7ns/nQfYP84r8tG14HGQ= k8s.io/apimachinery v0.27.9 h1:IOGjTX8IiPVpl7qOVOvXiiTQ+0G4k68/t5OMTWZkdas= k8s.io/apimachinery v0.27.9/go.mod h1:EIXLxLt/b1muPITiF5zlrcm7I+YnXsIgM+0GdnPTQvA= k8s.io/client-go v0.27.9 h1:eSGXZbMVyrFXQ7VZBtyJ1bPtnsApO/U/oJq0arkZ27c= k8s.io/client-go v0.27.9/go.mod h1:I3POCgjLe2aLPpBSME+WQq64IGjOZ3CQUxp0MQdpVE8= k8s.io/code-generator v0.23.3/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= -k8s.io/code-generator v0.27.9 h1:lm1+gQLzA4ElK8FtItUbFG1PpZ+Us1fSfn9RlRsy1ko= -k8s.io/code-generator v0.27.9/go.mod h1:NEx95JBRos8MSki+CuSoiEyKk6yv1rC4z/eY8DCZ/Rw= +k8s.io/code-generator v0.28.0-alpha.1 h1:N8TaM33Z5FyjypF6Wed2V5N2TsubXkRo8xz3QKL1Kjw= +k8s.io/code-generator v0.28.0-alpha.1/go.mod h1:WeOTfTIIMdMZyTu5zBAWq8jV+YQsAOcLP09GHh0FqeE= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= -k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= +k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= @@ -838,8 +526,8 @@ k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-aggregator v0.25.4 h1:QIeTa29I2a0VOFwZtpquz/bkNPk+dnUiDPbI/Vq7MbI= k8s.io/kube-aggregator v0.25.4/go.mod h1:PH65mLSQoUld53w0VkdYcsIGh7wjJGZ5DyfoARronz0= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= @@ -849,23 +537,22 @@ k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 h1:OmK1d0WrkD3IPfkskvroRy k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515/go.mod h1:kzo02I3kQ4BTtEfVLaPbjvCkX97YqGve33wzlb3fofQ= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= -k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= kubevirt.io/api v1.1.0 h1:G6/32Emr8cout4MUc2Gi3tfp92rq/rMh5LyhKhMxntw= kubevirt.io/api v1.1.0/go.mod h1:CJ4vZsaWhVN3jNbyc9y3lIZhw8nUHbWjap0xHABQiqc= kubevirt.io/containerized-data-importer-api v1.58.0 h1:l6bH2SrCUi14QAi1Mv1vzcrqZI0XYzrV1KLK6hiC0QI= kubevirt.io/containerized-data-importer-api v1.58.0/go.mod h1:Y/8ETgHS1GjO89bl682DPtQOYEU/1ctPFBz6Sjxm4DM= kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 h1:QMrd0nKP0BGbnxTqakhDZAUhGKxPiPiN5gSDqKUmGGc= kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90/go.mod h1:018lASpFYBsYN6XwmA2TIrPCx6e0gviTd/ZNtSitKgc= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/main.go b/main.go index 56df3ac..734c6b1 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,6 @@ //go:generate go run pkg/codegen/cleanup/main.go //go:generate go run pkg/codegen/main.go +//go:generate /bin/bash scripts/generate-manifest +//go:generate go run ./pkg/bindata package main diff --git a/pkg/apis/network.harvesterhci.io/v1alpha1/ippool.go b/pkg/apis/network.harvesterhci.io/v1alpha1/ippool.go index 5b0e118..8cc6cf2 100644 --- a/pkg/apis/network.harvesterhci.io/v1alpha1/ippool.go +++ b/pkg/apis/network.harvesterhci.io/v1alpha1/ippool.go @@ -17,6 +17,7 @@ var ( // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:resource:shortName=ippl;ippls,scope=Namespaced +// +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="NETWORK",type=string,JSONPath=`.spec.networkName` // +kubebuilder:printcolumn:name="AVAILABLE",type=integer,JSONPath=`.status.ipv4.available` // +kubebuilder:printcolumn:name="USED",type=integer,JSONPath=`.status.ipv4.used` @@ -34,42 +35,78 @@ type IPPool struct { } type IPPoolSpec struct { - IPv4Config IPv4Config `json:"ipv4Config,omitempty"` - NetworkName string `json:"networkName,omitempty"` + IPv4Config IPv4Config `json:"ipv4Config,omitempty"` + + // +kubebuilder:validation:Required + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="NetworkName is immutable" + // +kubebuilder:validation:MaxLength=64 + NetworkName string `json:"networkName"` // +optional + // +kubebuilder:validation:Optional Paused *bool `json:"paused,omitempty"` } +// +kubebuilder:validation:XValidation:rule="!has(oldSelf.router) || has(self.router)", message="Router is required once set" type IPv4Config struct { - ServerIP string `json:"serverIP,omitempty"` - CIDR string `json:"cidr,omitempty"` - Pool Pool `json:"pool,omitempty"` + // +kubebuilder:validation:Required + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="CIDR is immutable" + CIDR string `json:"cidr"` + + // +kubebuilder:validation:Required + // +kubebuilder:validation:Format=ipv4 + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ServerIP is immutable" + ServerIP string `json:"serverIP"` + + // +kubebuilder:validation:Required + Pool Pool `json:"pool"` // +optional + // +kubebuilder:validation:Optional + // +kubebuilder:validation:Format=ipv4 + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Router is immutable" Router string `json:"router,omitempty"` // +optional + // +kubebuilder:validation:Optional + // +kubebuilder:validation:Format=ipv4 + // +kubebuilder:validation:MaxItems=3 DNS []string `json:"dns,omitempty"` // +optional + // +kubebuilder:validation:Optional DomainName *string `json:"domainName,omitempty"` // +optional + // +kubebuilder:validation:Optional DomainSearch []string `json:"domainSearch,omitempty"` // +optional + // +kubebuilder:validation:Optional + // +kubebuilder:validation:MaxItems=4 NTP []string `json:"ntp,omitempty"` // +optional + // +kubebuilder:validation:Optional LeaseTime *int `json:"leaseTime,omitempty"` } +// +kubebuilder:validation:XValidation:rule="!has(oldSelf.exclude) || has(self.exclude)", message="End is required once set" type Pool struct { - Start string `json:"start,omitempty"` - End string `json:"end,omitempty"` + // +kubebuilder:validation:Required + // +kubebuilder:validation:Format=ipv4 + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Start is immutable" + Start string `json:"start"` + + // +kubebuilder:validation:Required + // +kubebuilder:validation:Format=ipv4 + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="End is immutable" + End string `json:"end"` // +optional + // +kubebuilder:validation:Optional + // +kubebuilder:validation:Format=ipv4 + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Exclude is immutable" Exclude []string `json:"exclude,omitempty"` } @@ -77,12 +114,15 @@ type IPPoolStatus struct { LastUpdate metav1.Time `json:"lastUpdate,omitempty"` // +optional + // +kubebuilder:validation:Optional IPv4 *IPv4Status `json:"ipv4,omitempty"` // +optional + // +kubebuilder:validation:Optional AgentPodRef *PodReference `json:"agentPodRef,omitempty"` // +optional + // +kubebuilder:validation:Optional Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` } diff --git a/pkg/apis/network.harvesterhci.io/v1alpha1/virtualmachinenetworkconfig.go b/pkg/apis/network.harvesterhci.io/v1alpha1/virtualmachinenetworkconfig.go index 3aefb71..52fab41 100644 --- a/pkg/apis/network.harvesterhci.io/v1alpha1/virtualmachinenetworkconfig.go +++ b/pkg/apis/network.harvesterhci.io/v1alpha1/virtualmachinenetworkconfig.go @@ -21,6 +21,7 @@ type NetworkConfigState string // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:resource:shortName=vmnetcfg;vmnetcfgs,scope=Namespaced +// +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="VMNAME",type=string,JSONPath=`.spec.vmName` // +kubebuilder:printcolumn:name="ALLOCATED",type=string,JSONPath=`.status.conditions[?(@.type=='Allocated')].status` // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=`.metadata.creationTimestamp` @@ -34,25 +35,42 @@ type VirtualMachineNetworkConfig struct { } type VirtualMachineNetworkConfigSpec struct { - VMName string `json:"vmName,omitempty"` - NetworkConfig []NetworkConfig `json:"networkConfig,omitempty"` + // +kubebuilder:validation:Required + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="VMName is immutable" + // +kubebuilder:validation:MaxLength=64 + VMName string `json:"vmName"` // +optional + // +kubebuilder:validation:Optional + // +kubebuilder:validation:XValidation:rule="oldSelf.all(x, x in self)",message="NetworkConfig may only be added" + // +kubebuilder:validation:MaxItems=4 + NetworkConfigs []NetworkConfig `json:"networkConfigs,omitempty"` + + // +optional + // +kubebuilder:validation:Optional Paused *bool `json:"paused,omitempty"` } type NetworkConfig struct { - NetworkName string `json:"networkName,omitempty"` - MACAddress string `json:"macAddress,omitempty"` + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=64 + NetworkName string `json:"networkName"` + + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=17 + MACAddress string `json:"macAddress"` // +optional + // +kubebuilder:validation:Optional + // +kubebuilder:validation:Format=ipv4 IPAddress *string `json:"ipAddress,omitempty"` } type VirtualMachineNetworkConfigStatus struct { - NetworkConfig []NetworkConfigStatus `json:"networkConfig,omitempty"` + NetworkConfigs []NetworkConfigStatus `json:"networkConfig,omitempty"` // +optional + // +kubebuilder:validation:Optional Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"` } diff --git a/pkg/apis/network.harvesterhci.io/v1alpha1/zz_generated_deepcopy.go b/pkg/apis/network.harvesterhci.io/v1alpha1/zz_generated_deepcopy.go index b5009f9..349f8cf 100644 --- a/pkg/apis/network.harvesterhci.io/v1alpha1/zz_generated_deepcopy.go +++ b/pkg/apis/network.harvesterhci.io/v1alpha1/zz_generated_deepcopy.go @@ -344,8 +344,8 @@ func (in *VirtualMachineNetworkConfigList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VirtualMachineNetworkConfigSpec) DeepCopyInto(out *VirtualMachineNetworkConfigSpec) { *out = *in - if in.NetworkConfig != nil { - in, out := &in.NetworkConfig, &out.NetworkConfig + if in.NetworkConfigs != nil { + in, out := &in.NetworkConfigs, &out.NetworkConfigs *out = make([]NetworkConfig, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) @@ -372,8 +372,8 @@ func (in *VirtualMachineNetworkConfigSpec) DeepCopy() *VirtualMachineNetworkConf // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VirtualMachineNetworkConfigStatus) DeepCopyInto(out *VirtualMachineNetworkConfigStatus) { *out = *in - if in.NetworkConfig != nil { - in, out := &in.NetworkConfig, &out.NetworkConfig + if in.NetworkConfigs != nil { + in, out := &in.NetworkConfigs, &out.NetworkConfigs *out = make([]NetworkConfigStatus, len(*in)) copy(*out, *in) } diff --git a/pkg/bindata/main.go b/pkg/bindata/main.go new file mode 100644 index 0000000..2b5712d --- /dev/null +++ b/pkg/bindata/main.go @@ -0,0 +1,24 @@ +package main + +import ( + "github.com/go-bindata/go-bindata/v3" +) + +const CRDPath = "./chart/crds" + +func main() { + c := &bindata.Config{ + Input: []bindata.InputConfig{ + { + Path: CRDPath, + }, + }, + Output: "./pkg/data/data.go", + Package: "data", + } + + err := bindata.Translate(c) + if err != nil { + panic(err) + } +} diff --git a/pkg/codegen/main.go b/pkg/codegen/main.go index 1682206..c0e0bf0 100644 --- a/pkg/codegen/main.go +++ b/pkg/codegen/main.go @@ -55,14 +55,12 @@ func main() { Types: []interface{}{ cniv1.NetworkAttachmentDefinition{}, }, - GenerateTypes: false, GenerateClients: true, }, kubevirtv1.SchemeGroupVersion.Group: { Types: []interface{}{ kubevirtv1.VirtualMachine{}, }, - GenerateTypes: false, GenerateClients: true, }, }, diff --git a/pkg/controller/vm/controller.go b/pkg/controller/vm/controller.go index 3024280..e1c6312 100644 --- a/pkg/controller/vm/controller.go +++ b/pkg/controller/vm/controller.go @@ -101,7 +101,7 @@ func (h *Handler) OnChange(key string, vm *kubevirtv1.VirtualMachine) (*kubevirt logrus.Debugf("(vm.OnChange) vmnetcfg for vm %s already exists", key) vmNetCfgCpy := oldVmNetCfg.DeepCopy() - vmNetCfgCpy.Spec.NetworkConfig = vmNetCfg.Spec.NetworkConfig + vmNetCfgCpy.Spec.NetworkConfigs = vmNetCfg.Spec.NetworkConfigs if !reflect.DeepEqual(vmNetCfgCpy, oldVmNetCfg) { logrus.Infof("(vm.OnChange) update vmnetcfg %s/%s", vmNetCfgCpy.Namespace, vmNetCfgCpy.Name) @@ -138,8 +138,8 @@ func prepareVmNetCfg(vm *kubevirtv1.VirtualMachine, ncm map[string]networkv1.Net }, }, Spec: networkv1.VirtualMachineNetworkConfigSpec{ - VMName: vm.Name, - NetworkConfig: ncs, + VMName: vm.Name, + NetworkConfigs: ncs, }, } } diff --git a/pkg/controller/vmnetcfg/common.go b/pkg/controller/vmnetcfg/common.go index ccff674..30398d8 100644 --- a/pkg/controller/vmnetcfg/common.go +++ b/pkg/controller/vmnetcfg/common.go @@ -54,7 +54,7 @@ func (b *vmNetCfgBuilder) WithNetworkConfig(ipAddress, macAddress, networkName s MACAddress: macAddress, NetworkName: networkName, } - b.vmNetCfg.Spec.NetworkConfig = append(b.vmNetCfg.Spec.NetworkConfig, nc) + b.vmNetCfg.Spec.NetworkConfigs = append(b.vmNetCfg.Spec.NetworkConfigs, nc) return b } @@ -65,7 +65,7 @@ func (b *vmNetCfgBuilder) WithNetworkConfigStatus(ipAddress, macAddress, network NetworkName: networkName, State: state, } - b.vmNetCfg.Status.NetworkConfig = append(b.vmNetCfg.Status.NetworkConfig, ncStatus) + b.vmNetCfg.Status.NetworkConfigs = append(b.vmNetCfg.Status.NetworkConfigs, ncStatus) return b } @@ -100,7 +100,7 @@ func (b *vmNetCfgStatusBuilder) WithNetworkConfigStatus(ipAddress, macAddress, n NetworkName: networkName, State: state, } - b.vmNetCfgStatus.NetworkConfig = append(b.vmNetCfgStatus.NetworkConfig, ncStatus) + b.vmNetCfgStatus.NetworkConfigs = append(b.vmNetCfgStatus.NetworkConfigs, ncStatus) return b } diff --git a/pkg/controller/vmnetcfg/controller.go b/pkg/controller/vmnetcfg/controller.go index f19c624..299edad 100644 --- a/pkg/controller/vmnetcfg/controller.go +++ b/pkg/controller/vmnetcfg/controller.go @@ -70,7 +70,7 @@ func (h *Handler) OnChange(key string, vmNetCfg *networkv1.VirtualMachineNetwork return nil, nil } - logrus.Debugf("(vmnetcfg.OnChange) vmnetcfg configuration %s has been changed: %+v", key, vmNetCfg.Spec.NetworkConfig) + logrus.Debugf("(vmnetcfg.OnChange) vmnetcfg configuration %s has been changed: %+v", key, vmNetCfg.Spec.NetworkConfigs) vmNetCfgCpy := vmNetCfg.DeepCopy() @@ -81,7 +81,7 @@ func (h *Handler) OnChange(key string, vmNetCfg *networkv1.VirtualMachineNetwork return vmNetCfg, err } networkv1.Disabled.True(vmNetCfgCpy) - updateAllNetworkConfigState(vmNetCfgCpy.Status.NetworkConfig) + updateAllNetworkConfigState(vmNetCfgCpy.Status.NetworkConfigs) if !reflect.DeepEqual(vmNetCfgCpy, vmNetCfg) { return h.vmnetcfgClient.UpdateStatus(vmNetCfgCpy) } @@ -104,7 +104,7 @@ func (h *Handler) Allocate(vmNetCfg *networkv1.VirtualMachineNetworkConfig, stat } var ncStatuses []networkv1.NetworkConfigStatus - for _, nc := range vmNetCfg.Spec.NetworkConfig { + for _, nc := range vmNetCfg.Spec.NetworkConfigs { exists, err := h.cacheAllocator.HasMAC(nc.NetworkName, nc.MACAddress) if err != nil { return status, err @@ -182,7 +182,7 @@ func (h *Handler) Allocate(vmNetCfg *networkv1.VirtualMachineNetworkConfig, stat dIP = *nc.IPAddress } // Recover IP from status (resume from paused state) - if oIP, err := findIPAddressFromNetworkConfigStatusByMACAddress(vmNetCfg.Status.NetworkConfig, nc.MACAddress); err == nil { + if oIP, err := findIPAddressFromNetworkConfigStatusByMACAddress(vmNetCfg.Status.NetworkConfigs, nc.MACAddress); err == nil { dIP = oIP } @@ -251,7 +251,7 @@ func (h *Handler) Allocate(vmNetCfg *networkv1.VirtualMachineNetworkConfig, stat } } - status.NetworkConfig = ncStatuses + status.NetworkConfigs = ncStatuses return status, nil } @@ -273,7 +273,7 @@ func (h *Handler) OnRemove(key string, vmNetCfg *networkv1.VirtualMachineNetwork func (h *Handler) cleanup(vmNetCfg *networkv1.VirtualMachineNetworkConfig) error { h.metricsAllocator.DeleteVmNetCfgStatus(vmNetCfg.Namespace + "/" + vmNetCfg.Name) - for _, ncStatus := range vmNetCfg.Status.NetworkConfig { + for _, ncStatus := range vmNetCfg.Status.NetworkConfigs { // Deallocate IP address from IPAM isAllocated, err := h.ipAllocator.IsAllocated(ncStatus.NetworkName, ncStatus.AllocatedIPAddress) if err != nil { diff --git a/pkg/crd/crd.go b/pkg/crd/crd.go index 71d19ec..96291ff 100644 --- a/pkg/crd/crd.go +++ b/pkg/crd/crd.go @@ -1,67 +1,44 @@ package crd import ( + "bytes" "context" + "fmt" - "github.com/rancher/wrangler/pkg/crd" - apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - "k8s.io/apimachinery/pkg/runtime/schema" + "github.com/harvester/vm-dhcp-controller/pkg/data" + "github.com/rancher/wrangler/pkg/apply" + "github.com/rancher/wrangler/pkg/yaml" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" - - network "github.com/harvester/vm-dhcp-controller/pkg/apis/network.harvesterhci.io/v1alpha1" ) -var ageColumn = apiextv1.CustomResourceColumnDefinition{ - Name: "AGE", - Type: "date", - Priority: 10, - JSONPath: ".metadata.creationTimestamp", -} - -func List() []crd.CRD { - return []crd.CRD{ - newCRD("network.harvesterhci.io", &network.IPPool{}, func(c crd.CRD) crd.CRD { - return c. - WithShortNames("ippl", "ippls"). - WithColumn("NETWORK", ".spec.networkName"). - WithColumn("AVAILABLE", ".status.ipv4.available"). - WithColumn("USED", ".status.ipv4.used"). - WithColumn("REGISTERED", ".status.conditions[?(@.type=='Registered')].status"). - WithColumn("CACHEREADY", ".status.conditions[?(@.type=='CacheReady')].status"). - WithColumn("AGENTREADY", ".status.conditions[?(@.type=='AgentReady')].status"). - WithCustomColumn(ageColumn) - }), - newCRD("network.harvesterhci.io", &network.VirtualMachineNetworkConfig{}, func(c crd.CRD) crd.CRD { - return c. - WithShortNames("vmnetcfg", "vmnetcfgs"). - WithColumn("VMNAME", ".spec.vmName"). - WithColumn("ALLOCATED", ".status.conditions[?(@.type=='Allocated')].status"). - WithCustomColumn(ageColumn) - }), - } -} - func Create(ctx context.Context, cfg *rest.Config) error { - factory, err := crd.NewFactoryFromClient(cfg) + applyClient, err := apply.NewForConfig(cfg) if err != nil { return err } - return factory.BatchCreateCRDs(ctx, List()...).BatchWait() + objs, err := generateObjects() + if err != nil { + return fmt.Errorf("error generating objects: %v", err) + } + + return applyClient.WithDynamicLookup().WithContext(ctx).WithSetID("vm-dhcp-controller-crd").ApplyObjects(objs...) } -func newCRD(group string, obj interface{}, customize func(crd.CRD) crd.CRD) crd.CRD { - crd := crd.CRD{ - GVK: schema.GroupVersionKind{ - Group: group, - Version: "v1alpha1", - }, - Status: true, - NonNamespace: false, - SchemaObject: obj, +func generateObjects() ([]runtime.Object, error) { + var objs []runtime.Object + for _, v := range data.AssetNames() { + content, err := data.Asset(v) + if err != nil { + return nil, err + } + obj, err := yaml.ToObjects(bytes.NewReader(content)) + if err != nil { + return nil, err + } + objs = append(objs, obj...) } - if customize != nil { - crd = customize(crd) - } - return crd + + return objs, nil } diff --git a/pkg/data/data.go b/pkg/data/data.go new file mode 100644 index 0000000..073f1a6 --- /dev/null +++ b/pkg/data/data.go @@ -0,0 +1,272 @@ +// Code generated by go-bindata. (@generated) DO NOT EDIT. + + //Package data generated by go-bindata.// sources: +// chart/crds/network.harvesterhci.io_ippools.yaml +// chart/crds/network.harvesterhci.io_virtualmachinenetworkconfigs.yaml +package data + +import ( + "bytes" + "compress/gzip" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + "strings" + "time" +) + +func bindataRead(data []byte, name string) ([]byte, error) { + gz, err := gzip.NewReader(bytes.NewBuffer(data)) + if err != nil { + return nil, fmt.Errorf("read %q: %v", name, err) + } + + var buf bytes.Buffer + _, err = io.Copy(&buf, gz) + clErr := gz.Close() + + if err != nil { + return nil, fmt.Errorf("read %q: %v", name, err) + } + if clErr != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +type asset struct { + bytes []byte + info os.FileInfo +} + +type bindataFileInfo struct { + name string + size int64 + mode os.FileMode + modTime time.Time +} + +// Name return file name +func (fi bindataFileInfo) Name() string { + return fi.name +} + +// Size return file size +func (fi bindataFileInfo) Size() int64 { + return fi.size +} + +// Mode return file mode +func (fi bindataFileInfo) Mode() os.FileMode { + return fi.mode +} + +// ModTime return file modify time +func (fi bindataFileInfo) ModTime() time.Time { + return fi.modTime +} + +// IsDir return file whether a directory +func (fi bindataFileInfo) IsDir() bool { + return fi.mode&os.ModeDir != 0 +} + +// Sys return file is sys mode +func (fi bindataFileInfo) Sys() interface{} { + return nil +} + +var _chartCrdsNetworkHarvesterhciIo_ippoolsYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x19\x5d\x6f\xdb\xba\xf5\xdd\xbf\xe2\x0c\x7b\x48\x0b\x44\x0e\x8a\x0e\xc3\x60\x20\xd8\x3c\xc7\x6b\x8d\x66\x59\x60\xbb\x1d\x86\xe1\x3e\x1c\x4b\xc7\x36\x1b\x8a\xd4\x25\x8f\xdc\xe4\xb6\xfd\xef\x17\xa4\x24\x5b\x92\x25\x59\x71\xdb\x8b\xf2\xc9\x3e\x24\xcf\xf7\x17\x8f\x82\x20\x18\x60\x22\x3e\x90\xb1\x42\xab\x11\x60\x22\xe8\x91\x49\xb9\x7f\x76\xf8\xf0\x37\x3b\x14\xfa\x6a\xf7\x6a\xf0\x20\x54\x34\x82\x49\x6a\x59\xc7\x73\xb2\x3a\x35\x21\xdd\xd0\x5a\x28\xc1\x42\xab\x41\x4c\x8c\x11\x32\x8e\x06\x00\xa8\x94\x66\x74\x60\xeb\xfe\x02\x7c\xfe\x3a\x00\x50\x18\xd3\x08\x44\x92\x68\x2d\xed\x50\x11\x7f\xd2\xe6\x61\xb8\x45\xb3\x23\xcb\x64\xb6\xa1\x18\x0a\x3d\xb0\x09\x85\xee\xd2\xc6\xe8\x34\x19\x41\xdb\xb1\x0c\x5d\x8e\x3e\x63\x6d\x76\x7f\xaf\xb5\xf4\x00\x29\x2c\xbf\x2b\x01\x6f\x85\x65\xbf\x91\xc8\xd4\xa0\xdc\x73\xe1\x61\x76\xab\x0d\xdf\x1d\xb0\x05\x6e\x57\x96\x7e\xe6\xc7\x84\xda\xa4\x12\x4d\x71\x79\x00\x60\x43\x9d\xd0\x08\xfc\xdd\x04\x43\x8a\x06\x00\xbb\x4c\x8f\x1e\x57\x00\x18\x45\x5e\x3d\x28\xef\x8d\x50\x4c\x66\xa2\x65\x1a\xab\x3d\xa5\x8f\x56\xab\x7b\xe4\xed\x08\x86\x4e\xf0\x42\x2b\x0e\xa3\x3f\x51\x68\xed\x6e\xba\xfc\xef\x7f\xe6\xef\x72\x18\x3f\x39\xb2\x96\x8d\x50\x9b\x06\x44\x8c\x9c\xda\xa1\x48\x76\x7f\x19\xe2\x0e\x85\xc4\x95\xac\x62\x1b\x7f\x18\xcf\x6e\xc7\xff\xbc\x9d\x56\xf0\x39\xfe\x36\x64\xba\x11\xa6\xd6\x4b\x79\xc0\xf5\x7e\x31\xbd\x79\x16\x9a\x50\xab\x4c\x27\xf6\xff\x7f\x7f\xf1\x8f\xa1\xbb\x74\x7d\x7d\x31\xa7\x8d\x70\xe6\xa5\xe8\xe2\xe5\x2f\xf9\xd1\x0a\x9d\xf9\xf4\xcd\x6c\xb1\x9c\xce\x6b\xd4\x4e\x28\xa1\x99\xd8\x04\xc3\x2d\xcd\x09\xa3\xa7\x16\x62\x93\xf1\xe4\xed\x74\x3e\x1d\xdf\xfc\xef\xdb\x89\x8d\x37\xa4\xb8\x8b\xd8\xf8\xcd\xf4\x6e\xd9\x9f\x58\x11\x68\xc3\xd0\x90\x8f\xb1\xa5\x88\xc9\x32\xc6\x49\x1d\x6b\x05\x5d\x84\x9c\x39\x41\xb6\xbd\x7b\x85\x32\xd9\xe2\xab\xcc\xb5\xc3\x2d\xc5\x38\xca\xcf\xeb\x84\xd4\xf8\x7e\xf6\xe1\xf5\xa2\x02\x06\x48\x8c\x4e\xc8\xb0\x28\x02\x25\x5b\xa5\xdc\x51\x82\x02\x44\x64\x43\x23\x12\xf6\x49\xe5\x4b\x50\xd9\x03\x70\x04\xb2\x5b\x10\xb9\x24\x42\x16\x78\x4b\x45\xf4\x50\x94\xf3\x04\x7a\x0d\xbc\x15\x16\x0c\x25\x86\x2c\xa9\x2c\xad\x38\x30\x2a\xd0\xab\x8f\x14\xf2\xb0\x86\x7a\x41\xc6\xa1\x71\x71\x9d\xca\x08\x42\xad\x76\x64\x18\x0c\x85\x7a\xa3\xc4\x6f\x7b\xdc\x16\x58\x7b\xa2\x12\x99\x2c\x7b\xc7\x35\x0a\x25\xec\x50\xa6\x74\x09\xa8\xa2\x1a\xe6\x18\x9f\xc0\x90\xa3\x09\xa9\x2a\xe1\xf3\x17\x6c\x9d\x8f\x7f\x6b\x43\x20\xd4\x5a\x8f\x60\xcb\x9c\xd8\xd1\xd5\xd5\x46\x70\x91\x51\x43\x1d\xc7\xa9\x12\xfc\x74\x15\x6a\xc5\x46\xac\x52\xd6\xc6\x5e\x45\xb4\x23\x79\x65\xc5\x26\x40\x13\x6e\x05\x53\xc8\xa9\xa1\x2b\x4c\x44\xe0\x05\x51\xde\xbf\x86\x71\xf4\x67\x93\xe7\x60\x5b\x21\x7b\xe4\x3b\xd9\xf2\x19\xf2\x19\xe6\x71\xc9\x13\x84\x05\xcc\x51\x65\x22\x1e\xac\xe0\x40\x4e\x75\xf3\xe9\x62\x09\x05\x27\x99\xa5\x32\xa3\x1c\x8e\x1e\xe9\xa5\xb0\x8f\xd3\xa6\x50\x6b\x32\xd9\xbd\xb5\xd1\xb1\xc7\x49\x2a\x4a\xb4\x50\xec\xff\x84\x52\x90\x62\xb0\xe9\x2a\x16\xec\xdc\xe0\xd7\x94\x2c\x3b\xd3\xd5\xd1\x4e\x7c\xd5\x81\x15\x41\x9a\x38\x67\x8f\xea\x07\x66\x0a\x26\x18\x93\x9c\xa0\xa5\x3f\xd8\x56\xce\x2a\x36\x70\x46\xe8\x65\xad\x72\x2d\xad\x1f\xce\xd4\x5b\xda\x28\x0a\xe6\x61\x35\xc7\xa9\x5b\x2e\x85\x4f\xb4\x5a\x8b\x4d\x7d\xa7\xeb\x96\x5b\xa1\x88\x4c\x13\xbc\x55\x86\xc3\x7a\x0c\x1e\xd2\x15\x19\x45\x4c\x36\xd8\xa1\x14\x51\xb9\x35\xa8\xaf\x00\x62\xb2\x16\x37\x2e\x0b\xcf\x6e\xe6\xce\x09\x45\x1c\xa7\x5c\x2a\x62\xf5\x65\x52\xe9\x38\x20\xb9\x86\xeb\x6b\xd0\x32\x5a\x90\x5c\x37\x9c\x8d\xda\x68\xae\xb5\x89\x91\x47\x5e\x3d\x8d\x07\x04\x53\xdc\x72\xb7\x87\x02\x62\x7c\x9c\x79\x04\xf0\xba\x43\x83\x68\x0c\x3e\x35\x71\xad\x63\x14\xca\x75\x04\x67\xe9\x3f\xbb\xbe\x20\xe7\xa2\xcd\x08\xbe\x4d\xb8\x6e\xe6\x25\xa1\x25\x57\xa0\xba\x78\x2f\x77\x0c\xd5\xa5\x38\xf9\x11\x3c\x1f\x0c\xd2\x6c\xee\x6e\x99\x5c\xf3\xd7\x4c\xba\x3b\x84\xdc\xa2\x7a\x1a\x2e\xaf\x93\x6e\xd8\x4b\x38\x78\x76\xc8\x41\x35\xec\xa6\x59\xea\x3f\x15\x75\xf0\x8c\xc8\xf3\xa2\x3f\x86\x32\x8d\x5a\x1c\xa1\xb7\xf8\x9d\x86\x87\xbe\xfa\xe9\x36\x70\xb6\xbe\x4d\x87\x99\xb0\x3f\x42\x8f\x96\xd1\xf0\x4f\xef\x44\x0b\xc7\xe5\xf7\x17\xdf\xd5\x7f\x61\xa8\x25\x88\x02\x17\x5f\x2d\x3b\x5e\x6d\x1d\xd1\x7e\x54\x57\x0f\xeb\xec\x02\x96\x47\x52\xc1\x34\x68\x15\x12\x58\x6a\xa6\x52\xa8\xe1\xe2\x4f\x5b\xb4\x2f\x72\x25\x0c\xf3\xa8\x79\x09\x5f\xbe\x80\x83\xdb\x32\xf0\xa2\x01\x91\xd1\x29\x53\x4b\xa9\x3e\xe9\x1b\x3f\xae\x96\xcf\x3d\x5b\xdf\xb3\x9a\x5b\xdf\x46\xce\xee\x7f\x3a\x51\x17\x39\x63\xdf\x4f\xd8\x76\xaf\x0f\x7c\x63\xd6\x00\x4e\x8a\x51\x48\x15\x5c\x28\xed\x68\xab\x33\x08\xfa\xab\xa2\xd1\xe2\x7d\xfc\xbf\xc9\xf7\x33\x57\xae\xba\x7e\x0e\xab\x7b\x7e\x69\x6e\x72\xcc\x54\x8c\x8f\xb7\xa4\x36\xee\xf5\xfc\xd7\x63\x67\xe8\x74\x84\xb3\x24\xbf\x3b\x30\x73\xca\x07\xfa\xd8\x3f\xc1\xd4\x36\xd9\x3e\x63\x7c\xa5\xb5\x24\x54\x95\xdd\x66\x7f\x09\xe0\x78\xba\x54\xc6\x74\xfc\xb2\xf0\xb3\x8a\xbe\x6f\x0b\xdc\x90\xe2\x7b\x1d\xcd\x69\xfd\xdc\xc7\x85\x3a\xb7\xb9\x55\xc5\xe4\xed\x8c\xdb\x1d\x1e\x7f\x18\xe4\x1c\xe3\x6d\x6d\x40\x4e\x35\x7f\x12\x2d\x2f\x0d\x2a\x2b\x8a\xa1\x4d\x5b\x21\xad\x3c\xcd\x6f\xd1\x32\xb0\x88\x29\x7b\x0e\x17\x9c\x01\xef\x51\x51\x94\xbd\x9d\xb5\x22\xa8\x8c\x97\x1a\x14\xa2\x01\x95\xe6\x2d\x99\xfa\x03\xb8\x97\xca\x0a\x31\xde\xfb\x07\x76\x6f\x11\x96\x7e\xc6\x72\x10\x43\xd8\x92\x1c\x9f\xd0\xb6\x3d\xd8\x7b\xf3\x54\x44\x5e\x1f\x66\xde\xa6\x31\xaa\xc0\x10\x46\x2e\x24\x8b\xab\x20\x54\x24\x42\xf4\x73\x8d\x88\x18\x85\xb4\x80\x2b\x9d\xb6\x95\x6a\xc8\x05\xda\x1b\xe1\x5c\xd6\x0d\xa1\xad\x4f\xce\x5a\x38\x77\x6a\xcc\x8e\xbb\xea\x56\x75\x87\x0b\x5b\x67\xe8\x6c\x65\x36\x45\x7d\x0b\x47\x0b\x7f\x34\x9b\xd1\x95\x98\xb9\xf4\xae\xa8\xd7\xb0\x34\x29\x5d\xc2\xbf\x50\x5a\xba\x84\xf7\xea\x41\xe9\x4f\xe7\xf3\xe5\x0f\xf4\xd2\xd3\x53\xe2\xa9\x87\x32\xb5\xae\x02\xed\xf9\x3a\x93\x74\x57\xcf\x19\xb4\x47\x5c\xe0\xf1\x36\x6c\x74\x96\xda\xf6\x97\x89\xeb\x64\x9e\x9b\x58\x51\x4a\x1d\xba\xd0\x6a\x56\x5c\xf9\xeb\xc4\xa9\x97\x6b\xcf\x41\x40\x6b\x1b\xbd\xff\x12\x71\xde\x24\xa0\xb9\x04\x9e\xbe\xd9\xd5\x3a\xd5\x3f\x8e\x94\xf7\x4a\xdf\x39\x7a\x89\x78\x48\x8b\xc7\x94\x8a\x5e\xd4\xed\x06\x2e\x07\xf6\xef\x41\x1a\x29\x1e\x01\x7d\x57\x17\x8d\x80\x4d\x9a\xe1\xb6\xac\x8d\x6f\x45\x0e\x90\x74\xb5\x1f\x18\x17\x1c\xe6\x91\x0e\x9f\xbf\x0e\x7e\x0f\x00\x00\xff\xff\xfb\x31\x8f\xae\x05\x1c\x00\x00") + +func chartCrdsNetworkHarvesterhciIo_ippoolsYamlBytes() ([]byte, error) { + return bindataRead( + _chartCrdsNetworkHarvesterhciIo_ippoolsYaml, + "chart/crds/network.harvesterhci.io_ippools.yaml", + ) +} + +func chartCrdsNetworkHarvesterhciIo_ippoolsYaml() (*asset, error) { + bytes, err := chartCrdsNetworkHarvesterhciIo_ippoolsYamlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "chart/crds/network.harvesterhci.io_ippools.yaml", size: 7173, mode: os.FileMode(420), modTime: time.Unix(1706866345, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _chartCrdsNetworkHarvesterhciIo_virtualmachinenetworkconfigsYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x57\x5f\x6f\xdb\x36\x10\x7f\xf7\xa7\x38\x60\x0f\x6d\x81\xc8\x46\xb0\x61\x1b\x0c\x04\x5b\xe0\x76\x5b\xb0\xa4\x0b\x9a\x34\x2f\xc3\x1e\xce\xe2\xd9\x66\x43\x91\x1a\xef\xe8\x24\xeb\xfa\xdd\x07\x92\x52\x2c\xcb\x76\xe2\x1a\xc1\xf8\x26\xf2\xfe\xfc\xee\xff\xa9\x28\x8a\x01\xd6\xfa\x86\x3c\x6b\x67\xc7\x80\xb5\xa6\x7b\x21\x1b\xbf\x78\x78\xfb\x23\x0f\xb5\x1b\x2d\x8f\x07\xb7\xda\xaa\x31\x4c\x02\x8b\xab\x3e\x10\xbb\xe0\x4b\x7a\x4b\x33\x6d\xb5\x68\x67\x07\x15\x09\x2a\x14\x1c\x0f\x00\xd0\x5a\x27\x18\xaf\x39\x7e\x02\x7c\xfe\x32\x00\xb0\x58\xd1\x18\x96\xda\x4b\x40\x53\x61\xb9\xd0\x96\x2c\xc9\x9d\xf3\xb7\xa5\xb3\x33\x3d\xe7\x61\xf3\x39\x5c\xa0\x5f\x12\x0b\xf9\x45\xa9\x87\xda\x0d\xb8\xa6\x32\x4a\x9a\x7b\x17\xea\x31\xec\x22\xcb\x3a\x1a\x9d\x19\xef\x4d\x56\x77\x91\xd5\xbd\xcf\x8c\x93\xa4\x2e\x51\x19\xcd\xf2\xfb\x73\x94\xe7\x9a\x25\x51\xd7\x26\x78\x34\x4f\x1b\x91\x08\x79\xe1\xbc\xbc\x5f\x81\x29\x60\x59\x59\x92\x72\x36\xef\x7d\x36\xe4\xda\xce\x83\x41\xff\xa4\xe4\x01\x00\x97\xae\xa6\x31\x24\xc1\x35\x96\xa4\x06\x00\xcb\x1c\xb8\xa4\xa8\x00\x54\x2a\xc5\x03\xcd\xa5\xd7\x56\xc8\x4f\x9c\x09\x95\x7d\x84\xf1\x89\x9d\xbd\x44\x59\x8c\x61\x18\x9d\x3a\x5c\x56\x51\x58\x7a\x6c\x23\x74\x73\xf1\xfe\xf4\xe2\x5d\x73\x25\x0f\x51\x21\x8b\xd7\x76\xbe\x45\x84\xa0\x04\x1e\x96\xce\x66\xad\xfc\xe7\x4f\xaf\x7f\x1e\x46\x9e\x93\x93\x57\xa7\xc6\xb8\x12\x85\xd4\xab\x37\x7f\x35\x94\x6b\x7a\x4e\xcf\xcf\xff\x98\x9c\x5e\xbf\x7b\xbb\x97\xaa\x36\xbf\x86\xa5\xa7\x94\x5a\xd7\xba\x22\x16\xac\xea\x75\xa1\xbf\xae\x23\x57\x28\xd9\xba\x26\xfb\x8e\xd1\xd4\x0b\x3c\xce\x5e\x2f\x17\x54\xe1\xb8\xa1\x77\x35\xd9\xd3\xcb\xb3\x9b\x6f\xaf\xd6\xae\x01\x6a\xef\x6a\xf2\xa2\xdb\x58\xe6\xd3\x29\x99\xce\x2d\x80\x22\x2e\xbd\xae\x25\xd5\xd2\xbf\xc5\xda\x1b\x40\x54\x90\xb9\x40\xc5\xda\x21\x06\x59\x50\x1b\x43\x52\x0d\x26\x70\x33\x90\x85\x66\xf0\x54\x7b\x62\xb2\xb9\x9a\xe2\x35\x5a\x70\xd3\x4f\x54\xca\xb0\x27\xfa\x8a\x7c\x14\x13\x53\x2f\x18\x05\xa5\xb3\x4b\xf2\x02\x9e\x4a\x37\xb7\xfa\x9f\x47\xd9\x0c\xe2\x92\x52\x83\x42\x2c\x90\xb2\xc4\xa2\x81\x25\x9a\x40\x47\x80\x56\xf5\x24\x57\xf8\x00\x9e\xa2\x4e\x08\xb6\x23\x2f\x31\x70\x1f\xc7\x85\xf3\x04\xda\xce\xdc\x18\x16\x22\x35\x8f\x47\xa3\xb9\x96\xb6\x91\x94\xae\xaa\x82\xd5\xf2\x30\x2a\x9d\x15\xaf\xa7\x41\x9c\xe7\x91\xa2\x25\x99\x11\xeb\x79\x81\xbe\x5c\x68\xa1\x52\x82\xa7\x11\xd6\xba\x48\x86\xd8\x94\x5d\xc3\x4a\x7d\xe3\x9b\xd6\xc3\x6b\x6a\x37\x72\x27\x9f\xd4\x03\xbe\x22\x3c\xb1\x13\x80\x66\xc0\x46\x54\x36\x71\x15\x85\x78\x15\x5d\xf7\xe1\xdd\xd5\x35\xb4\x48\x72\xa4\x72\x50\x56\xa4\x1b\x7e\x69\xe3\x13\xbd\xa9\xed\x8c\x7c\xe6\x9b\x79\x57\x25\x99\x64\x55\xed\xb4\x95\xf4\x51\x1a\x4d\x56\x80\xc3\xb4\xd2\x12\xd3\xe0\xef\x40\x2c\x31\x74\x7d\xb1\x93\xd4\x6c\x61\x4a\x10\xea\x98\xec\xaa\x4f\x70\x66\x61\x82\x15\x99\x09\x32\xfd\xcf\xb1\x8a\x51\xe1\x22\x06\x61\xaf\x68\x75\x47\x48\x9f\x38\xbb\xb7\xf3\xd0\x8e\x84\xd5\xd9\x5e\xa7\xf1\xd8\x6e\x33\xdf\x78\x05\xd0\x42\xd5\x96\xeb\xa7\x44\x36\x8c\xf5\xa9\x52\x9e\x78\xc7\x33\xc0\xcc\xf9\x0a\x65\x0c\xba\x5e\x7e\xb7\x83\x64\x87\x33\x56\xa7\xc2\xf2\x19\x2d\x15\xde\x9f\x93\x9d\xc7\x3e\x79\xfc\xc3\xa1\x6a\x1a\x27\xc5\x71\xb0\x87\x9e\xef\x0f\x34\x27\x66\xb2\xf6\xa4\xb6\xa9\x28\x3a\xa6\x6e\x7d\xee\x40\xdc\xf2\xbe\x23\x51\x1e\xa1\x9f\xa5\x28\xc3\x26\xf0\xcc\x88\xde\xe3\xc3\xc6\xdb\x7d\x71\x1b\xa6\xe4\x2d\x09\x71\xb1\x44\xa3\x55\x77\xaf\xe9\xa1\x27\x66\x9c\xc7\xf9\xdc\xcd\xb7\x54\xf0\xce\x9a\x87\x58\xa3\xa8\x14\xf5\xdb\x6b\x72\x4b\x30\x11\xbb\x51\x57\x64\x66\x43\x34\xe6\xf5\xfd\x11\xdc\x83\xb6\xc0\x64\x66\x6f\x7a\x1c\x35\x06\xde\xe6\xc2\x6c\xc8\xd4\x39\x43\x68\x7b\xaf\x79\xd0\x6f\xf2\x3c\x1d\xd3\x27\xa3\x79\x90\x6f\x6e\x2e\x22\x8e\xd8\x64\x75\x55\x05\xc1\xa9\xd9\x16\xcb\xec\x8f\x68\x3b\x9c\x9c\xb4\x7e\x59\xa3\xdb\x9e\x48\x05\xac\x2d\x34\x5d\x23\x36\x3b\x48\x5a\x49\xf6\xed\x21\xab\x1d\xe7\x05\xfb\x87\x41\x96\x6b\x8f\x96\x75\xbb\xd1\xec\x2a\xbd\xb5\xb9\x75\x8e\x2c\x20\xba\xa2\x3c\x2b\x5a\x64\x20\x8f\xa2\x48\xe5\xc1\xe2\x2c\xc1\xda\xea\xb5\x79\xc4\x01\x5a\x27\x0b\xf2\xfd\xe9\xf0\x48\xf1\x5c\xeb\x88\x66\x7c\x4c\xd3\x67\x6f\x13\xae\xd3\x02\xb2\x32\x43\x73\xc7\x8e\x3b\xe4\x5d\xd3\x6c\x6f\x4c\x6d\xc2\xed\x03\xe6\xb7\x50\xa1\x2d\x3c\xa1\x8a\xe9\xd8\xb2\x82\xb6\x4a\x97\x98\x86\xbe\x22\x41\x6d\x18\x70\xea\xc2\x66\x73\xe9\xfa\xa1\x13\x84\x43\xa1\x7b\x42\xee\xaf\x95\x3b\x90\x47\x37\x66\xf2\x38\x6a\xd6\xd3\xe1\x15\xf7\x01\x1d\xec\xcc\x6d\xa5\xb2\x03\xd1\x55\x22\xcd\x0b\x6c\x07\xcc\x51\x4a\x45\x37\x83\x6b\x1f\x97\xcc\x5f\xd0\x30\x1d\xc1\x47\x7b\x6b\xdd\xdd\xe1\xb8\x12\xc1\x5e\x7e\x7a\xa8\x93\xf6\xd2\x84\xf8\xbf\xb8\xc2\x75\xa0\xea\xa7\xc7\xd8\xce\x8a\x2b\x92\xdc\xaf\x9d\x5d\xbb\xe7\xd3\xda\x62\xf3\x82\x7d\x09\xdb\x5f\xb7\xb3\xcb\x67\x56\x8f\x17\xd8\x5e\x5e\x62\x33\xd9\x2b\x83\x0f\xe5\x3e\x28\x38\x5b\x99\x36\x2e\x39\xfe\x14\xa8\x31\x88\x0f\x39\x2d\x58\x9c\x4f\x73\x72\x75\x13\xa6\x8f\xff\x3c\xad\x01\x4d\x3d\xc2\xe7\x2f\x83\xff\x02\x00\x00\xff\xff\xe9\x50\xbe\xbe\xbf\x11\x00\x00") + +func chartCrdsNetworkHarvesterhciIo_virtualmachinenetworkconfigsYamlBytes() ([]byte, error) { + return bindataRead( + _chartCrdsNetworkHarvesterhciIo_virtualmachinenetworkconfigsYaml, + "chart/crds/network.harvesterhci.io_virtualmachinenetworkconfigs.yaml", + ) +} + +func chartCrdsNetworkHarvesterhciIo_virtualmachinenetworkconfigsYaml() (*asset, error) { + bytes, err := chartCrdsNetworkHarvesterhciIo_virtualmachinenetworkconfigsYamlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "chart/crds/network.harvesterhci.io_virtualmachinenetworkconfigs.yaml", size: 4543, mode: os.FileMode(420), modTime: time.Unix(1706866345, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +// Asset loads and returns the asset for the given name. +// It returns an error if the asset could not be found or +// could not be loaded. +func Asset(name string) ([]byte, error) { + cannonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[cannonicalName]; ok { + a, err := f() + if err != nil { + return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) + } + return a.bytes, nil + } + return nil, fmt.Errorf("Asset %s not found", name) +} + +// MustAsset is like Asset but panics when Asset would return an error. +// It simplifies safe initialization of global variables. +func MustAsset(name string) []byte { + a, err := Asset(name) + if err != nil { + panic("asset: Asset(" + name + "): " + err.Error()) + } + + return a +} + +// AssetInfo loads and returns the asset info for the given name. +// It returns an error if the asset could not be found or +// could not be loaded. +func AssetInfo(name string) (os.FileInfo, error) { + cannonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[cannonicalName]; ok { + a, err := f() + if err != nil { + return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) + } + return a.info, nil + } + return nil, fmt.Errorf("AssetInfo %s not found", name) +} + +// AssetNames returns the names of the assets. +func AssetNames() []string { + names := make([]string, 0, len(_bindata)) + for name := range _bindata { + names = append(names, name) + } + return names +} + +// _bindata is a table, holding each asset generator, mapped to its name. +var _bindata = map[string]func() (*asset, error){ + "chart/crds/network.harvesterhci.io_ippools.yaml": chartCrdsNetworkHarvesterhciIo_ippoolsYaml, + "chart/crds/network.harvesterhci.io_virtualmachinenetworkconfigs.yaml": chartCrdsNetworkHarvesterhciIo_virtualmachinenetworkconfigsYaml, +} + +// AssetDir returns the file names below a certain +// directory embedded in the file by go-bindata. +// For example if you run go-bindata on data/... and data contains the +// following hierarchy: +// data/ +// foo.txt +// img/ +// a.png +// b.png +// then AssetDir("data") would return []string{"foo.txt", "img"} +// AssetDir("data/img") would return []string{"a.png", "b.png"} +// AssetDir("foo.txt") and AssetDir("notexist") would return an error +// AssetDir("") will return []string{"data"}. +func AssetDir(name string) ([]string, error) { + node := _bintree + if len(name) != 0 { + cannonicalName := strings.Replace(name, "\\", "/", -1) + pathList := strings.Split(cannonicalName, "/") + for _, p := range pathList { + node = node.Children[p] + if node == nil { + return nil, fmt.Errorf("Asset %s not found", name) + } + } + } + if node.Func != nil { + return nil, fmt.Errorf("Asset %s not found", name) + } + rv := make([]string, 0, len(node.Children)) + for childName := range node.Children { + rv = append(rv, childName) + } + return rv, nil +} + +type bintree struct { + Func func() (*asset, error) + Children map[string]*bintree +} + +var _bintree = &bintree{nil, map[string]*bintree{ + "chart": &bintree{nil, map[string]*bintree{ + "crds": &bintree{nil, map[string]*bintree{ + "network.harvesterhci.io_ippools.yaml": &bintree{chartCrdsNetworkHarvesterhciIo_ippoolsYaml, map[string]*bintree{}}, + "network.harvesterhci.io_virtualmachinenetworkconfigs.yaml": &bintree{chartCrdsNetworkHarvesterhciIo_virtualmachinenetworkconfigsYaml, map[string]*bintree{}}, + }}, + }}, +}} + +// RestoreAsset restores an asset under the given directory +func RestoreAsset(dir, name string) error { + data, err := Asset(name) + if err != nil { + return err + } + info, err := AssetInfo(name) + if err != nil { + return err + } + err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755)) + if err != nil { + return err + } + err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode()) + if err != nil { + return err + } + err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) + if err != nil { + return err + } + return nil +} + +// RestoreAssets restores an asset under the given directory recursively +func RestoreAssets(dir, name string) error { + children, err := AssetDir(name) + // File + if err != nil { + return RestoreAsset(dir, name) + } + // Dir + for _, child := range children { + err = RestoreAssets(dir, filepath.Join(name, child)) + if err != nil { + return err + } + } + return nil +} + +func _filePath(dir, name string) string { + cannonicalName := strings.Replace(name, "\\", "/", -1) + return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) +} diff --git a/pkg/indexer/indexer.go b/pkg/indexer/indexer.go index d1c5102..bd80c9f 100644 --- a/pkg/indexer/indexer.go +++ b/pkg/indexer/indexer.go @@ -9,7 +9,7 @@ const ( ) func VmNetCfgByNetwork(obj *networkv1.VirtualMachineNetworkConfig) ([]string, error) { - ncs := obj.Spec.NetworkConfig + ncs := obj.Spec.NetworkConfigs networkNames := make([]string, 0, len(ncs)) for _, nc := range ncs { networkNames = append(networkNames, nc.NetworkName) diff --git a/pkg/webhook/vmnetcfg/validator.go b/pkg/webhook/vmnetcfg/validator.go index 5436d6b..f0af62a 100644 --- a/pkg/webhook/vmnetcfg/validator.go +++ b/pkg/webhook/vmnetcfg/validator.go @@ -30,7 +30,7 @@ func (v *Validator) Create(request *admission.Request, newObj runtime.Object) er vmNetCfg := newObj.(*networkv1.VirtualMachineNetworkConfig) logrus.Infof("create vmnetcfg %s/%s", vmNetCfg.Namespace, vmNetCfg.Name) - for _, nc := range vmNetCfg.Spec.NetworkConfig { + for _, nc := range vmNetCfg.Spec.NetworkConfigs { ipPoolNamespace, ipPoolName := kv.RSplit(nc.NetworkName, "/") if ipPoolNamespace == "" { ipPoolNamespace = "default" From 84cc3bb2c2db65aa60b01023a822be6593029a17 Mon Sep 17 00:00:00 2001 From: Zespre Chang Date: Fri, 2 Feb 2024 17:56:46 +0800 Subject: [PATCH 4/4] fix(webhook): validate pool-related inputs Signed-off-by: Zespre Chang --- pkg/controller/ippool/common.go | 14 +- pkg/controller/ippool/controller.go | 5 +- pkg/controller/ippool/controller_test.go | 12 +- pkg/util/network.go | 62 +++- pkg/webhook/ippool/validator.go | 129 ++++++-- pkg/webhook/ippool/validator_test.go | 372 +++++++++++++++++++++-- 6 files changed, 536 insertions(+), 58 deletions(-) diff --git a/pkg/controller/ippool/common.go b/pkg/controller/ippool/common.go index eb9d65a..67c93b0 100644 --- a/pkg/controller/ippool/common.go +++ b/pkg/controller/ippool/common.go @@ -26,7 +26,7 @@ func prepareAgentPod( clusterNetwork string, agentServiceAccountName string, agentImage *config.Image, -) *corev1.Pod { +) (*corev1.Pod, error) { name := util.SafeAgentConcatName(ipPool.Namespace, ipPool.Name) nadNamespace, nadName := kv.RSplit(ipPool.Spec.NetworkName, "/") @@ -37,9 +37,15 @@ func prepareAgentPod( InterfaceName: "eth1", }, } - networksStr, _ := json.Marshal(networks) + networksStr, err := json.Marshal(networks) + if err != nil { + return nil, err + } - _, ipNet, _ := net.ParseCIDR(ipPool.Spec.IPv4Config.CIDR) + _, ipNet, err := net.ParseCIDR(ipPool.Spec.IPv4Config.CIDR) + if err != nil { + return nil, err + } prefixLength, _ := ipNet.Mask.Size() args := []string{ @@ -143,7 +149,7 @@ func prepareAgentPod( }, }, }, - } + }, nil } func setRegisteredCondition(ipPool *networkv1.IPPool, status corev1.ConditionStatus, reason, message string) { diff --git a/pkg/controller/ippool/controller.go b/pkg/controller/ippool/controller.go index ab05004..4edce43 100644 --- a/pkg/controller/ippool/controller.go +++ b/pkg/controller/ippool/controller.go @@ -297,7 +297,10 @@ func (h *Handler) DeployAgent(ipPool *networkv1.IPPool, status networkv1.IPPoolS } } - agent := prepareAgentPod(ipPool, h.noDHCP, h.agentNamespace, clusterNetwork, h.agentServiceAccountName, h.agentImage) + agent, err := prepareAgentPod(ipPool, h.noDHCP, h.agentNamespace, clusterNetwork, h.agentServiceAccountName, h.agentImage) + if err != nil { + return status, err + } if status.AgentPodRef == nil { status.AgentPodRef = new(networkv1.PodReference) diff --git a/pkg/controller/ippool/controller_test.go b/pkg/controller/ippool/controller_test.go index f86a36a..fc4c11d 100644 --- a/pkg/controller/ippool/controller_test.go +++ b/pkg/controller/ippool/controller_test.go @@ -239,7 +239,7 @@ func TestHandler_DeployAgent(t *testing.T) { expectedStatus := newTestIPPoolStatusBuilder(). AgentPodRef(testPodNamespace, testPodName, testImage, "").Build() - expectedPod := prepareAgentPod( + expectedPod, _ := prepareAgentPod( NewIPPoolBuilder(testIPPoolNamespace, testIPPoolName). ServerIP(testServerIP). CIDR(testCIDR). @@ -336,7 +336,7 @@ func TestHandler_DeployAgent(t *testing.T) { AgentPodRef(testPodNamespace, testPodName, testImage, "").Build() givenNAD := newTestNetworkAttachmentDefinitionBuilder(). Label(clusterNetworkLabelKey, testClusterNetwork).Build() - givenPod := prepareAgentPod( + givenPod, _ := prepareAgentPod( NewIPPoolBuilder(testIPPoolNamespace, testIPPoolName). ServerIP(testServerIP). CIDR(testCIDR). @@ -353,7 +353,7 @@ func TestHandler_DeployAgent(t *testing.T) { expectedStatus := newTestIPPoolStatusBuilder(). AgentPodRef(testPodNamespace, testPodName, testImage, "").Build() - expectedPod := prepareAgentPod( + expectedPod, _ := prepareAgentPod( NewIPPoolBuilder(testIPPoolNamespace, testIPPoolName). ServerIP(testServerIP). CIDR(testCIDR). @@ -408,12 +408,12 @@ func TestHandler_DeployAgent(t *testing.T) { ServerIP(testServerIP). CIDR(testCIDR). NetworkName(testNetworkNameLong).Build() - givenNAD := newNetworkAttachmentDefinitionBuilder(testNADNamespace, testNADNameLong). + givenNAD := NewNetworkAttachmentDefinitionBuilder(testNADNamespace, testNADNameLong). Label(clusterNetworkLabelKey, testClusterNetwork).Build() expectedStatus := newTestIPPoolStatusBuilder(). AgentPodRef(testPodNamespace, testPodNameLong, testImage, "").Build() - expectedPod := prepareAgentPod( + expectedPod, _ := prepareAgentPod( NewIPPoolBuilder(testIPPoolNamespace, testIPPoolNameLong). ServerIP(testServerIP). CIDR(testCIDR). @@ -510,7 +510,7 @@ func TestHandler_DeployAgent(t *testing.T) { AgentPodRef(testPodNamespace, testPodName, testImage, testUID).Build() givenNAD := newTestNetworkAttachmentDefinitionBuilder(). Label(clusterNetworkLabelKey, testClusterNetwork).Build() - givenPod := prepareAgentPod( + givenPod, _ := prepareAgentPod( NewIPPoolBuilder(testIPPoolNamespace, testIPPoolName). ServerIP(testServerIP). CIDR(testCIDR). diff --git a/pkg/util/network.go b/pkg/util/network.go index 2a3bb9f..8115fee 100644 --- a/pkg/util/network.go +++ b/pkg/util/network.go @@ -4,9 +4,21 @@ import ( "fmt" "net" "net/netip" + + networkv1 "github.com/harvester/vm-dhcp-controller/pkg/apis/network.harvesterhci.io/v1alpha1" ) -func LoadCIDR(cidr string) (ipNet *net.IPNet, networkIPAddr netip.Addr, broadcastIPAddr netip.Addr, err error) { +type PoolInfo struct { + IPNet *net.IPNet + NetworkIPAddr netip.Addr + BroadcastIPAddr netip.Addr + StartIPAddr netip.Addr + EndIPAddr netip.Addr + ServerIPAddr netip.Addr + RouterIPAddr netip.Addr +} + +func loadCIDR(cidr string) (ipNet *net.IPNet, networkIPAddr netip.Addr, broadcastIPAddr netip.Addr, err error) { _, ipNet, err = net.ParseCIDR(cidr) if err != nil { return @@ -31,3 +43,51 @@ func LoadCIDR(cidr string) (ipNet *net.IPNet, networkIPAddr netip.Addr, broadcas return } + +func LoadPool(ipPool *networkv1.IPPool) (pi PoolInfo, err error) { + pi.IPNet, pi.NetworkIPAddr, pi.BroadcastIPAddr, err = loadCIDR(ipPool.Spec.IPv4Config.CIDR) + if err != nil { + return + } + + if ipPool.Spec.IPv4Config.Pool.Start != "" { + pi.StartIPAddr, err = netip.ParseAddr(ipPool.Spec.IPv4Config.Pool.Start) + if err != nil { + return + } + } + + if ipPool.Spec.IPv4Config.Pool.End != "" { + pi.EndIPAddr, err = netip.ParseAddr(ipPool.Spec.IPv4Config.Pool.End) + if err != nil { + return + } + } + + if ipPool.Spec.IPv4Config.ServerIP != "" { + pi.ServerIPAddr, err = netip.ParseAddr(ipPool.Spec.IPv4Config.ServerIP) + if err != nil { + return + } + } + + if ipPool.Spec.IPv4Config.Router != "" { + pi.RouterIPAddr, err = netip.ParseAddr(ipPool.Spec.IPv4Config.Router) + if err != nil { + return + } + } + + return +} + +func LoadAllocated(allocated map[string]string) (ipAddrList []netip.Addr) { + for ip := range allocated { + ipAddr, err := netip.ParseAddr(ip) + if err != nil { + continue + } + ipAddrList = append(ipAddrList, ipAddr) + } + return +} diff --git a/pkg/webhook/ippool/validator.go b/pkg/webhook/ippool/validator.go index e6746c9..131fc9d 100644 --- a/pkg/webhook/ippool/validator.go +++ b/pkg/webhook/ippool/validator.go @@ -36,11 +36,25 @@ func (v *Validator) Create(_ *admission.Request, newObj runtime.Object) error { ipPool := newObj.(*networkv1.IPPool) logrus.Infof("create ippool %s/%s", ipPool.Namespace, ipPool.Name) - if err := v.checkNAD(ipPool); err != nil { + // sanity check + poolInfo, err := util.LoadPool(ipPool) + if err != nil { + return fmt.Errorf(webhook.CreateErr, "IPPool", ipPool.Namespace, ipPool.Name, err) + } + + if err := v.checkNAD(ipPool.Spec.NetworkName); err != nil { + return fmt.Errorf(webhook.CreateErr, "IPPool", ipPool.Namespace, ipPool.Name, err) + } + + if err := v.checkPoolRange(poolInfo); err != nil { return fmt.Errorf(webhook.CreateErr, "IPPool", ipPool.Namespace, ipPool.Name, err) } - if err := v.checkServerIP(ipPool); err != nil { + if err := v.checkServerIP(poolInfo); err != nil { + return fmt.Errorf(webhook.CreateErr, "IPPool", ipPool.Namespace, ipPool.Name, err) + } + + if err := v.checkRouter(poolInfo); err != nil { return fmt.Errorf(webhook.CreateErr, "IPPool", ipPool.Namespace, ipPool.Name, err) } @@ -56,11 +70,30 @@ func (v *Validator) Update(_ *admission.Request, _, newObj runtime.Object) error logrus.Infof("update ippool %s/%s", ipPool.Namespace, ipPool.Name) - if err := v.checkNAD(ipPool); err != nil { + // sanity check + poolInfo, err := util.LoadPool(ipPool) + if err != nil { return fmt.Errorf(webhook.CreateErr, "IPPool", ipPool.Namespace, ipPool.Name, err) } - if err := v.checkServerIP(ipPool); err != nil { + var allocatedIPAddrList []netip.Addr + if ipPool.Status.IPv4 != nil { + allocatedIPAddrList = util.LoadAllocated(ipPool.Status.IPv4.Allocated) + } + + if err := v.checkNAD(ipPool.Spec.NetworkName); err != nil { + return fmt.Errorf(webhook.CreateErr, "IPPool", ipPool.Namespace, ipPool.Name, err) + } + + if err := v.checkPoolRange(poolInfo); err != nil { + return fmt.Errorf(webhook.CreateErr, "IPPool", ipPool.Namespace, ipPool.Name, err) + } + + if err := v.checkServerIP(poolInfo, allocatedIPAddrList...); err != nil { + return fmt.Errorf(webhook.CreateErr, "IPPool", ipPool.Namespace, ipPool.Name, err) + } + + if err := v.checkRouter(poolInfo); err != nil { return fmt.Errorf(webhook.CreateErr, "IPPool", ipPool.Namespace, ipPool.Name, err) } @@ -93,8 +126,8 @@ func (v *Validator) Resource() admission.Resource { } } -func (v *Validator) checkNAD(ipPool *networkv1.IPPool) error { - nadNamespace, nadName := kv.RSplit(ipPool.Spec.NetworkName, "/") +func (v *Validator) checkNAD(namespacedName string) error { + nadNamespace, nadName := kv.RSplit(namespacedName, "/") if nadNamespace == "" { nadNamespace = "default" } @@ -103,49 +136,87 @@ func (v *Validator) checkNAD(ipPool *networkv1.IPPool) error { return err } -func (v *Validator) checkServerIP(ipPool *networkv1.IPPool) error { - ipNet, networkIPAddr, broadcastIPAddr, err := util.LoadCIDR(ipPool.Spec.IPv4Config.CIDR) - if err != nil { - return err +func (v *Validator) checkPoolRange(pi util.PoolInfo) error { + if pi.StartIPAddr.IsValid() { + if !pi.IPNet.Contains(pi.StartIPAddr.AsSlice()) { + return fmt.Errorf("start ip %s is not within subnet", pi.StartIPAddr) + } + + if pi.StartIPAddr.As4() == pi.NetworkIPAddr.As4() { + return fmt.Errorf("start ip %s is the same as network ip", pi.StartIPAddr) + } + + if pi.StartIPAddr.As4() == pi.BroadcastIPAddr.As4() { + return fmt.Errorf("start ip %s is the same as broadcast ip", pi.StartIPAddr) + } } - routerIPAddr, err := netip.ParseAddr(ipPool.Spec.IPv4Config.Router) - if err != nil { - routerIPAddr = netip.Addr{} + if pi.EndIPAddr.IsValid() { + if !pi.IPNet.Contains(pi.EndIPAddr.AsSlice()) { + return fmt.Errorf("end ip %s is not within subnet", pi.EndIPAddr) + } + + if pi.EndIPAddr.As4() == pi.NetworkIPAddr.As4() { + return fmt.Errorf("end ip %s is the same as network ip", pi.EndIPAddr) + } + + if pi.EndIPAddr.As4() == pi.BroadcastIPAddr.As4() { + return fmt.Errorf("end ip %s is the same as broadcast ip", pi.EndIPAddr) + } } + return nil +} - serverIPAddr, err := netip.ParseAddr(ipPool.Spec.IPv4Config.ServerIP) - if err != nil { - return err +func (v *Validator) checkServerIP(pi util.PoolInfo, allocatedIPs ...netip.Addr) error { + if !pi.ServerIPAddr.IsValid() { + return nil } - if !ipNet.Contains(serverIPAddr.AsSlice()) { - return fmt.Errorf("server ip %s is not within subnet", serverIPAddr) + if !pi.IPNet.Contains(pi.ServerIPAddr.AsSlice()) { + return fmt.Errorf("server ip %s is not within subnet", pi.ServerIPAddr) } - if serverIPAddr.As4() == networkIPAddr.As4() { - return fmt.Errorf("server ip %s cannot be the same as network ip", serverIPAddr) + if pi.ServerIPAddr.As4() == pi.NetworkIPAddr.As4() { + return fmt.Errorf("server ip %s cannot be the same as network ip", pi.ServerIPAddr) } - if serverIPAddr.As4() == broadcastIPAddr.As4() { - return fmt.Errorf("server ip %s cannot be the same as broadcast ip", serverIPAddr) + if pi.ServerIPAddr.As4() == pi.BroadcastIPAddr.As4() { + return fmt.Errorf("server ip %s cannot be the same as broadcast ip", pi.ServerIPAddr) } - if routerIPAddr.IsValid() && serverIPAddr.As4() == routerIPAddr.As4() { - return fmt.Errorf("server ip %s cannot be the same as router ip", serverIPAddr) + if pi.RouterIPAddr.IsValid() && pi.ServerIPAddr.As4() == pi.RouterIPAddr.As4() { + return fmt.Errorf("server ip %s cannot be the same as router ip", pi.ServerIPAddr) } - if ipPool.Status.IPv4 != nil { - for ip, mac := range ipPool.Status.IPv4.Allocated { - if serverIPAddr.String() == ip { - return fmt.Errorf("server ip %s is already allocated by mac %s", serverIPAddr, mac) - } + for _, ip := range allocatedIPs { + if pi.ServerIPAddr == ip { + return fmt.Errorf("server ip %s is already allocated", pi.ServerIPAddr) } } return nil } +func (v *Validator) checkRouter(pi util.PoolInfo) error { + if !pi.RouterIPAddr.IsValid() { + return nil + } + + if !pi.IPNet.Contains(pi.RouterIPAddr.AsSlice()) { + return fmt.Errorf("router ip %s is not within subnet", pi.RouterIPAddr) + } + + if pi.RouterIPAddr.As4() == pi.NetworkIPAddr.As4() { + return fmt.Errorf("router ip %s is the same as network ip", pi.RouterIPAddr) + } + + if pi.RouterIPAddr.As4() == pi.BroadcastIPAddr.As4() { + return fmt.Errorf("router ip %s is the same as broadcast ip", pi.BroadcastIPAddr) + } + + return nil +} + func (v *Validator) checkVmNetCfgs(ipPool *networkv1.IPPool) error { vmnetcfgGetter := util.VmnetcfgGetter{ VmnetcfgCache: v.vmnetcfgCache, diff --git a/pkg/webhook/ippool/validator_test.go b/pkg/webhook/ippool/validator_test.go index e9e7a4a..309b294 100644 --- a/pkg/webhook/ippool/validator_test.go +++ b/pkg/webhook/ippool/validator_test.go @@ -20,6 +20,7 @@ const ( testNADName = "net-1" testIPPoolNamespace = testNADNamespace testIPPoolName = testNADName + testCIDR = "192.168.0.0/24" testServerIPOutOfRange = "192.168.100.2" testRouter = "192.168.0.1" testNetworkName = testNADNamespace + "/" + testNADName @@ -111,6 +112,174 @@ func TestValidator_Create(t *testing.T) { err: fmt.Errorf("could not create IPPool %s/%s because server ip %s cannot be the same as router ip", testIPPoolNamespace, testIPPoolName, "192.168.0.254"), }, }, + { + name: "invalid router ip which is malformed", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + Router("192.168.0.1000"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because ParseAddr(\"%s\"): IPv4 field has value >255", testIPPoolNamespace, testIPPoolName, "192.168.0.1000"), + }, + }, + { + name: "invalid router ip which is out of subnet", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + Router("192.168.1.1"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because router ip %s is not within subnet", testIPPoolNamespace, testIPPoolName, "192.168.1.1"), + }, + }, + { + name: "invalid router ip which is the same as network ip", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + Router("192.168.0.0"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because router ip %s is the same as network ip", testIPPoolNamespace, testIPPoolName, "192.168.0.0"), + }, + }, + { + name: "invalid router ip which is the same as broadcast ip", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + Router("192.168.0.255"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because router ip %s is the same as broadcast ip", testIPPoolNamespace, testIPPoolName, "192.168.0.255"), + }, + }, + { + name: "invalid start ip which is malformed", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + PoolRange("192.168.0.1000", ""). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because ParseAddr(\"%s\"): IPv4 field has value >255", testIPPoolNamespace, testIPPoolName, "192.168.0.1000"), + }, + }, + { + name: "invalid start ip which is out of subnet", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + PoolRange("192.168.1.100", ""). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because start ip %s is not within subnet", testIPPoolNamespace, testIPPoolName, "192.168.1.100"), + }, + }, + { + name: "invalid start ip which is the same as network ip", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + PoolRange("192.168.0.0", ""). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because start ip %s is the same as network ip", testIPPoolNamespace, testIPPoolName, "192.168.0.0"), + }, + }, + { + name: "invalid start ip which is the same as broadcast ip", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + PoolRange("192.168.0.255", ""). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because start ip %s is the same as broadcast ip", testIPPoolNamespace, testIPPoolName, "192.168.0.255"), + }, + }, + { + name: "invalid end ip which is malformed", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + PoolRange("", "192.168.0.1000"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because ParseAddr(\"%s\"): IPv4 field has value >255", testIPPoolNamespace, testIPPoolName, "192.168.0.1000"), + }, + }, + { + name: "invalid end ip which is out of subnet", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + PoolRange("", "192.168.1.100"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because end ip %s is not within subnet", testIPPoolNamespace, testIPPoolName, "192.168.1.100"), + }, + }, + { + name: "invalid emd ip which is the same as network ip", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + PoolRange("", "192.168.0.0"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because end ip %s is the same as network ip", testIPPoolNamespace, testIPPoolName, "192.168.0.0"), + }, + }, + { + name: "invalid end ip which is the same as broadcast ip", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + PoolRange("", "192.168.0.255"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because end ip %s is the same as broadcast ip", testIPPoolNamespace, testIPPoolName, "192.168.0.255"), + }, + }, + { + name: "non-existed network name", + given: input{ + ipPool: newTestIPPoolBuilder(). + CIDR("192.168.0.0/24"). + NetworkName("nonexist").Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool default/net-1 because network-attachment-definitions.k8s.cni.cncf.io \"%s\" not found", "nonexist"), + }, + }, } nadGVR := schema.GroupVersionResource{ @@ -158,11 +327,11 @@ func TestValidator_Update(t *testing.T) { name: "valid server ip", given: input{ oldIPPool: newTestIPPoolBuilder(). - CIDR("192.168.0.0/24"). + CIDR(testCIDR). ServerIP("192.168.0.2"). NetworkName(testNetworkName).Build(), newIPPool: newTestIPPoolBuilder(). - CIDR("192.168.0.0/24"). + CIDR(testCIDR). ServerIP("192.168.0.254"). NetworkName(testNetworkName).Build(), nad: newTestNetworkAttachmentDefinitionBuilder().Build(), @@ -172,11 +341,11 @@ func TestValidator_Update(t *testing.T) { name: "invalid server ip which is out of range", given: input{ oldIPPool: newTestIPPoolBuilder(). - CIDR("192.168.0.0/24"). + CIDR(testCIDR). ServerIP("192.168.0.2"). NetworkName(testNetworkName).Build(), newIPPool: newTestIPPoolBuilder(). - CIDR("192.168.0.0/24"). + CIDR(testCIDR). ServerIP("192.168.100.2"). NetworkName(testNetworkName).Build(), nad: newTestNetworkAttachmentDefinitionBuilder().Build(), @@ -189,45 +358,46 @@ func TestValidator_Update(t *testing.T) { name: "invalid server ip which is the same as network ip", given: input{ oldIPPool: newTestIPPoolBuilder(). - CIDR("192.168.0.0/24"). + CIDR(testCIDR). ServerIP("192.168.0.2"). NetworkName(testNetworkName).Build(), newIPPool: newTestIPPoolBuilder(). - CIDR("192.168.0.128/25"). - ServerIP("192.168.0.128"). + CIDR(testCIDR). + ServerIP("192.168.0.0"). NetworkName(testNetworkName).Build(), nad: newTestNetworkAttachmentDefinitionBuilder().Build(), }, expected: output{ - err: fmt.Errorf("could not create IPPool %s/%s because server ip %s cannot be the same as network ip", testIPPoolNamespace, testIPPoolName, "192.168.0.128"), + err: fmt.Errorf("could not create IPPool %s/%s because server ip %s cannot be the same as network ip", testIPPoolNamespace, testIPPoolName, "192.168.0.0"), }, }, { name: "invalid server ip which is the same as broadcast ip", given: input{ oldIPPool: newTestIPPoolBuilder(). - CIDR("192.168.0.0/24"). + CIDR(testCIDR). ServerIP("192.168.0.2"). NetworkName(testNetworkName).Build(), newIPPool: newTestIPPoolBuilder(). - CIDR("192.168.0.0/25"). - ServerIP("192.168.0.127"). + CIDR(testCIDR). + ServerIP("192.168.0.255"). NetworkName(testNetworkName).Build(), nad: newTestNetworkAttachmentDefinitionBuilder().Build(), }, expected: output{ - err: fmt.Errorf("could not create IPPool %s/%s because server ip %s cannot be the same as broadcast ip", testIPPoolNamespace, testIPPoolName, "192.168.0.127"), + err: fmt.Errorf("could not create IPPool %s/%s because server ip %s cannot be the same as broadcast ip", testIPPoolNamespace, testIPPoolName, "192.168.0.255"), }, }, { name: "invalid server ip which is the same as router ip", given: input{ oldIPPool: newTestIPPoolBuilder(). - CIDR("192.168.0.0/24"). + CIDR(testCIDR). ServerIP("192.168.0.2"). + Router("192.168.0.254"). NetworkName(testNetworkName).Build(), newIPPool: newTestIPPoolBuilder(). - CIDR("192.168.0.254/24"). + CIDR(testCIDR). ServerIP("192.168.0.254"). Router("192.168.0.254"). NetworkName(testNetworkName).Build(), @@ -242,19 +412,187 @@ func TestValidator_Update(t *testing.T) { given: input{ oldIPPool: newTestIPPoolBuilder(). - CIDR("192.168.0.254/24"). + CIDR(testCIDR). ServerIP("192.168.0.2"). NetworkName(testNetworkName). Allocated("192.168.0.100", "11:22:33:44:55:66").Build(), newIPPool: newTestIPPoolBuilder(). - CIDR("192.168.0.254/24"). + CIDR(testCIDR). ServerIP("192.168.0.100"). NetworkName(testNetworkName). Allocated("192.168.0.100", "11:22:33:44:55:66").Build(), nad: newTestNetworkAttachmentDefinitionBuilder().Build(), }, expected: output{ - err: fmt.Errorf("could not create IPPool %s/%s because server ip %s is already allocated by mac %s", testIPPoolNamespace, testIPPoolName, "192.168.0.100", "11:22:33:44:55:66"), + err: fmt.Errorf("could not create IPPool %s/%s because server ip %s is already allocated", testIPPoolNamespace, testIPPoolName, "192.168.0.100"), + }, + }, + { + name: "invalid router ip which is malformed", + given: input{ + newIPPool: newTestIPPoolBuilder(). + CIDR(testCIDR). + Router("192.168.0.1000"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because ParseAddr(\"%s\"): IPv4 field has value >255", testIPPoolNamespace, testIPPoolName, "192.168.0.1000"), + }, + }, + { + name: "invalid router ip which is out of subnet", + given: input{ + newIPPool: newTestIPPoolBuilder(). + CIDR(testCIDR). + Router("192.168.1.1"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because router ip %s is not within subnet", testIPPoolNamespace, testIPPoolName, "192.168.1.1"), + }, + }, + { + name: "invalid router ip which is the same as network ip", + given: input{ + newIPPool: newTestIPPoolBuilder(). + CIDR(testCIDR). + Router("192.168.0.0"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because router ip %s is the same as network ip", testIPPoolNamespace, testIPPoolName, "192.168.0.0"), + }, + }, + { + name: "invalid router ip which is the same as broadcast ip", + given: input{ + newIPPool: newTestIPPoolBuilder(). + CIDR(testCIDR). + Router("192.168.0.255"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because router ip %s is the same as broadcast ip", testIPPoolNamespace, testIPPoolName, "192.168.0.255"), + }, + }, + { + name: "invalid start ip which is malformed", + given: input{ + newIPPool: newTestIPPoolBuilder(). + CIDR(testCIDR). + PoolRange("192.168.0.1000", ""). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because ParseAddr(\"%s\"): IPv4 field has value >255", testIPPoolNamespace, testIPPoolName, "192.168.0.1000"), + }, + }, + { + name: "invalid start ip which is out of subnet", + given: input{ + newIPPool: newTestIPPoolBuilder(). + CIDR(testCIDR). + PoolRange("192.168.1.100", ""). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because start ip %s is not within subnet", testIPPoolNamespace, testIPPoolName, "192.168.1.100"), + }, + }, + { + name: "invalid start ip which is the same as network ip", + given: input{ + newIPPool: newTestIPPoolBuilder(). + CIDR(testCIDR). + PoolRange("192.168.0.0", ""). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because start ip %s is the same as network ip", testIPPoolNamespace, testIPPoolName, "192.168.0.0"), + }, + }, + { + name: "invalid start ip which is the same as broadcast ip", + given: input{ + newIPPool: newTestIPPoolBuilder(). + CIDR(testCIDR). + PoolRange("192.168.0.255", ""). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because start ip %s is the same as broadcast ip", testIPPoolNamespace, testIPPoolName, "192.168.0.255"), + }, + }, + { + name: "invalid end ip which is malformed", + given: input{ + newIPPool: newTestIPPoolBuilder(). + CIDR(testCIDR). + PoolRange("", "192.168.0.1000"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because ParseAddr(\"%s\"): IPv4 field has value >255", testIPPoolNamespace, testIPPoolName, "192.168.0.1000"), + }, + }, + { + name: "invalid end ip which is out of subnet", + given: input{ + newIPPool: newTestIPPoolBuilder(). + CIDR(testCIDR). + PoolRange("", "192.168.1.100"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because end ip %s is not within subnet", testIPPoolNamespace, testIPPoolName, "192.168.1.100"), + }, + }, + { + name: "invalid emd ip which is the same as network ip", + given: input{ + newIPPool: newTestIPPoolBuilder(). + CIDR(testCIDR). + PoolRange("", "192.168.0.0"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because end ip %s is the same as network ip", testIPPoolNamespace, testIPPoolName, "192.168.0.0"), + }, + }, + { + name: "invalid end ip which is the same as broadcast ip", + given: input{ + newIPPool: newTestIPPoolBuilder(). + CIDR(testCIDR). + PoolRange("", "192.168.0.255"). + NetworkName(testNetworkName).Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool %s/%s because end ip %s is the same as broadcast ip", testIPPoolNamespace, testIPPoolName, "192.168.0.255"), + }, + }, + { + name: "non-existed network name", + given: input{ + newIPPool: newTestIPPoolBuilder(). + CIDR(testCIDR). + NetworkName("nonexist").Build(), + nad: newTestNetworkAttachmentDefinitionBuilder().Build(), + }, + expected: output{ + err: fmt.Errorf("could not create IPPool default/net-1 because network-attachment-definitions.k8s.cni.cncf.io \"%s\" not found", "nonexist"), }, }, }