From 2682661521d48e46aa235228226c1edbe62afb13 Mon Sep 17 00:00:00 2001 From: Ze Chen Date: Fri, 3 Jul 2020 20:10:38 +0800 Subject: [PATCH] Add Linode Provioner Adds Linode provisioner in operator by integrating inletsctl which supports Linode starting from 0.5.5. Signed-off-by: Ze Chen --- README.md | 56 ++++++++ chart/inlets-operator/README.md | 16 ++- controller.go | 71 ++++++++-- go.mod | 11 +- go.sum | 121 ++++++++++-------- hack/update-codegen.sh | 2 +- hack/update-crds.sh | 8 ++ main.go | 2 +- .../clientset/versioned/clientset.go | 2 +- .../v1alpha1/fake/fake_tunnel.go | 22 ++-- .../typed/inletsoperator/v1alpha1/tunnel.go | 72 ++++++----- .../inletsoperator/v1alpha1/tunnel.go | 11 +- 12 files changed, 275 insertions(+), 119 deletions(-) diff --git a/README.md b/README.md index 46deeff7..d78c5807 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ Operator cloud host provisioning: - [x] Provision to Scaleway - [x] Provision to GCP - [x] Provision to AWS EC2 + - [x] Provision to Linode - [x] Publish stand-alone [Go provisioning library/SDK](https://github.com/inlets/inletsctl/tree/master/pkg/provision) With [`inlets-pro`](https://github.com/inlets/inlets-pro) configured, you get the following additional benefits: @@ -226,6 +227,61 @@ helm upgrade inlets-operator --install inlets/inlets-operator \ --set provider=gce,zone=us-central1-a,projectID=$PROJECTID ``` +## Running in-cluster, using Linode for the exit node + +Install using helm: +```bash +kubectl apply -f ./artifacts/crds/ + +# Create a secret to store the service account key file +kubectl create secret generic inlets-access-key --from-literal inlets-access-key= + +# Add and update the inlets-operator helm repo +helm repo add inlets https://inlets.github.io/inlets-operator/ + +helm repo update + +# Install inlets-operator with the required fields +helm upgrade inlets-operator --install inlets/inlets-operator \ + --set provider=linode,region=us-east +``` + +You can also install the inlets-operator using a single command using [arkade](https://get-arkade.dev/), arkade runs against any Kubernetes cluster. + +Install with inlets PRO: + +```bash +arkade install inlets-operator \ + --provider linode \ + --region us-east \ + --access-key \ + --license $(cat $HOME/inlets-pro-license.txt) +``` + +Install with inlets OSS: + +```bash +arkade install inlets-operator \ + --provider linode \ + --region us-east \ + --access-key +``` + +You can also install using kubectl without helm: (Change `-provider` and `-region` in `./artifacts/operator.yaml`) + +```bash +# Create a secret to store the access token + +kubectl create secret generic inlets-access-key \ + --from-literal inlets-access-key= + +kubectl apply -f ./artifacts/crds/ + +# Apply the operator deployment and RBAC role +kubectl apply -f ./artifacts/operator-rbac.yaml +kubectl apply -f ./artifacts/operator.yaml +``` + ## Expose a service with a LoadBalancer The LoadBalancer type is usually provided by a cloud controller, but when that is not available, then you can use the inlets-operator to get a public IP and ingress. The free OSS version of inlets provides a HTTP tunnel, inlets PRO can provide TCP and full functionality to an IngressController. diff --git a/chart/inlets-operator/README.md b/chart/inlets-operator/README.md index ea088512..5b625831 100644 --- a/chart/inlets-operator/README.md +++ b/chart/inlets-operator/README.md @@ -70,7 +70,7 @@ helm upgrade inlets-operator --install inlets/inlets-operator \ ```sh helm upgrade inlets-operator --install inlets/inlets-operator \ - --set provider=packet,region=ams1,projectID=PROJECTID,inletsProLicense=WT_GOES_HERE + --set provider=packet,region=ams1,projectID=PROJECTID,inletsProLicense=JWT_GOES_HERE ``` ### Scaleway with inlets OSS @@ -80,6 +80,20 @@ helm upgrade inlets-operator --install inlets/inlets-operator \ --set provider=scaleway,region=ams1,organizationID=ORGANIZATIONID ``` +### Linode with inlets OSS + +```sh +helm upgrade inlets-operator --install inlets/inlets-operator \ + --set provider=linode,region=us-east +``` + +### Linode with inlets-pro + +```sh +helm upgrade inlets-operator --install inlets/inlets-operator \ + --set provider=linode,region=us-east,inletsProLicense=JWT_GOES_HERE +``` + ## Chart parameters diff --git a/controller.go b/controller.go index 43f1a1a0..142a7314 100644 --- a/controller.go +++ b/controller.go @@ -4,6 +4,7 @@ package main import ( + "context" "encoding/base64" "fmt" "log" @@ -152,6 +153,9 @@ func NewController( case "civo": provisioner, _ = provision.NewCivoProvisioner(controller.infraConfig.GetAccessKey()) break + case "linode": + provisioner, _ = provision.NewLinodeProvisioner(controller.infraConfig.GetAccessKey()) + break } if provisioner != nil { @@ -362,7 +366,7 @@ func (c *Controller) syncHandler(key string) error { ops := metav1.GetOptions{} name := service.Name + "-tunnel" - found, err := tunnels.Get(name, ops) + found, err := tunnels.Get(context.Background(), name, ops) if errors.IsNotFound(err) { if manageService(*c, *service) { @@ -390,7 +394,8 @@ func (c *Controller) syncHandler(key string) error { }, } - _, err := tunnels.Create(tunnel) + ops := metav1.CreateOptions{} + _, err := tunnels.Create(context.Background(), tunnel, ops) if err != nil { log.Printf("Error creating tunnel: %s", err.Error()) @@ -402,7 +407,7 @@ func (c *Controller) syncHandler(key string) error { if manageService(*c, *service) == false { log.Printf("Removing tunnel: %s\n", found.Name) - err := tunnels.Delete(found.Name, &metav1.DeleteOptions{}) + err := tunnels.Delete(context.Background(), found.Name, metav1.DeleteOptions{}) if err != nil { log.Printf("Error deleting tunnel: %s", err.Error()) @@ -430,6 +435,7 @@ func (c *Controller) syncHandler(key string) error { var id string + log.Printf("Provisioning started with provider:%s host:%s\n", c.infraConfig.Provider, tunnel.Name) start := time.Now() if c.infraConfig.Provider == "packet" { @@ -566,7 +572,27 @@ func (c *Controller) syncHandler(key string) error { return err } id = res.ID + } else if c.infraConfig.Provider == "linode" { + provisioner, _ := provision.NewLinodeProvisioner(c.infraConfig.GetAccessKey()) + + userData := makeUserdata(tunnel.Spec.AuthToken, c.infraConfig.UsePro(), tunnel.Spec.ServiceName) + + res, err := provisioner.Provision(provision.BasicHost{ + Name: tunnel.Name, + OS: "linode/ubuntu16.04lts", // https://api.linode.com/v4/images + Plan: "g6-nanode-1", // https://api.linode.com/v4/linode/types + Region: c.infraConfig.Region, + UserData: userData, + Additional: map[string]string{}, + }) + if err != nil { + return err + } + id = res.ID + + } else { + return fmt.Errorf("unsupported provider: %s", c.infraConfig.Provider) } log.Printf("Provisioning call took: %fs\n", time.Since(start).Seconds()) @@ -727,12 +753,37 @@ func (c *Controller) syncHandler(key string) error { } } } + } else if c.infraConfig.Provider == "linode" { + provisioner, _ := provision.NewLinodeProvisioner(c.infraConfig.GetAccessKey()) + + host, err := provisioner.Status(tunnel.Status.HostID) + + if err != nil { + return err + } + + if host.Status == provision.ActiveStatus { + if host.IP != "" { + err := c.updateTunnelProvisioningStatus(tunnel, provision.ActiveStatus, host.ID, host.IP) + if err != nil { + return err + } + + err = c.updateService(tunnel, host.IP) + if err != nil { + log.Printf("Error updating service: %s, %s", tunnel.Spec.ServiceName, err.Error()) + return fmt.Errorf("tunnel update error %s", err) + } + } + } + } else { + return fmt.Errorf("unsupported provider: %s", c.infraConfig.Provider) } break case provision.ActiveStatus: if tunnel.Spec.ClientDeploymentRef == nil { get := metav1.GetOptions{} - service, getServiceErr := c.kubeclientset.CoreV1().Services(tunnel.Namespace).Get(tunnel.Spec.ServiceName, get) + service, getServiceErr := c.kubeclientset.CoreV1().Services(tunnel.Namespace).Get(context.Background(), tunnel.Spec.ServiceName, get) if getServiceErr != nil { return getServiceErr @@ -758,7 +809,7 @@ func (c *Controller) syncHandler(key string) error { deployment, createDeployErr := c.kubeclientset.AppsV1(). Deployments(tunnel.Namespace). - Create(client) + Create(context.Background(), client, metav1.CreateOptions{}) if createDeployErr != nil { log.Println(createDeployErr) @@ -771,7 +822,7 @@ func (c *Controller) syncHandler(key string) error { _, updateErr := c.operatorclientset.InletsV1alpha1(). Tunnels(tunnel.Namespace). - Update(tunnel) + Update(context.Background(), tunnel, metav1.UpdateOptions{}) if updateErr != nil { log.Println(updateErr) @@ -880,7 +931,7 @@ func makeClient(tunnel *inletsv1alpha1.Tunnel, targetPort int32, clientImage str func (c *Controller) updateService(tunnel *inletsv1alpha1.Tunnel, ip string) error { get := metav1.GetOptions{} - res, err := c.kubeclientset.CoreV1().Services(tunnel.Namespace).Get(tunnel.Spec.ServiceName, get) + res, err := c.kubeclientset.CoreV1().Services(tunnel.Namespace).Get(context.Background(), tunnel.Spec.ServiceName, get) if err != nil { return err } @@ -899,7 +950,7 @@ func (c *Controller) updateService(tunnel *inletsv1alpha1.Tunnel, ip string) err copy.Spec.ExternalIPs = append(copy.Spec.ExternalIPs, ip) } - res, err = c.kubeclientset.CoreV1().Services(tunnel.Namespace).Update(copy) + res, err = c.kubeclientset.CoreV1().Services(tunnel.Namespace).Update(context.Background(), copy, metav1.UpdateOptions{}) if err != nil { return err } @@ -911,7 +962,7 @@ func (c *Controller) updateService(tunnel *inletsv1alpha1.Tunnel, ip string) err copy.Status.LoadBalancer.Ingress[i] = corev1.LoadBalancerIngress{IP: ip} } - _, err = c.kubeclientset.CoreV1().Services(tunnel.Namespace).UpdateStatus(copy) + _, err = c.kubeclientset.CoreV1().Services(tunnel.Namespace).UpdateStatus(context.Background(), copy, metav1.UpdateOptions{}) return err } @@ -923,7 +974,7 @@ func (c *Controller) updateTunnelProvisioningStatus(tunnel *inletsv1alpha1.Tunne tunnelCopy.Status.HostID = id tunnelCopy.Status.HostIP = ip - _, err := c.operatorclientset.InletsV1alpha1().Tunnels(tunnel.Namespace).UpdateStatus(tunnelCopy) + _, err := c.operatorclientset.InletsV1alpha1().Tunnels(tunnel.Namespace).UpdateStatus(context.Background(), tunnelCopy, metav1.UpdateOptions{}) return err } diff --git a/go.mod b/go.mod index f93b5e3b..42c2c820 100644 --- a/go.mod +++ b/go.mod @@ -6,14 +6,13 @@ go 1.13 require ( github.com/aws/aws-sdk-go v1.27.3 // indirect - github.com/inlets/inletsctl v0.0.0-20200211114314-aab68519494e + github.com/inlets/inletsctl v0.0.0-20200630123138-2af07d807845 github.com/sethvargo/go-password v0.1.3 - k8s.io/api v0.17.0 - k8s.io/apimachinery v0.17.1-beta.0 - k8s.io/client-go v0.17.0 - k8s.io/code-generator v0.17.0 + k8s.io/api v0.18.3 + k8s.io/apimachinery v0.18.3 + k8s.io/client-go v0.18.3 + k8s.io/code-generator v0.18.5 k8s.io/gengo v0.0.0-20200127102705-1e9b17e831be // indirect k8s.io/klog v1.0.0 - k8s.io/kube-openapi v0.0.0-20200130172213-cdac1c71ff9f // indirect ) diff --git a/go.sum b/go.sum index e9963d1e..66224775 100644 --- a/go.sum +++ b/go.sum @@ -12,12 +12,35 @@ cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7 cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v39.0.0+incompatible h1:l2FVXqtd34UC7OZYkhcWY843CSFjRdrIRdBCTOanYwg= +github.com/Azure/azure-sdk-for-go v39.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= +github.com/Azure/go-autorest/autorest v0.9.5 h1:IvOB+EPvwfzDNJBPe1i3wtnNKl1d/LJ+tweb0N1H3hg= +github.com/Azure/go-autorest/autorest v0.9.5/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 h1:iM6UAvjR97ZIeR93qTcwpKNMpV+/FTWjwEbuPD495Tk= +github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= +github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 h1:LXl088ZQlP0SBppGFsRZonW6hSvwgL5gRByMbvUbx8U= +github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/to v0.3.0 h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8= +github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= +github.com/Azure/go-autorest/autorest/validation v0.2.0 h1:15vMO4y76dehZSq7pAaOLQxC6dZYsSrj2GQpflyM/L4= +github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -37,17 +60,19 @@ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/digitalocean/godo v1.27.0 h1:78iE9oVvTnAEqhMip2UHFvL01b8LJcydbNUpr0cAmN4= github.com/digitalocean/godo v1.27.0/go.mod h1:iJnN9rVu6K5LioLxLimlq0uRI+y/eAQjROUmeU/r0hY= +github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= +github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -70,8 +95,10 @@ github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8 github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 h1:JVrqSeQfdhYRFk24TvhTZWU0q8lfCojxZQFi3Ou7+uY= +github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903 h1:LbsanbbD6LieFkXbj9YNNBupiGHJgFeLpO0j0Fza1h8= @@ -82,6 +109,7 @@ github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 h1:uHTyIjqVhYRhL github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/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 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -93,11 +121,14 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/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= @@ -109,6 +140,8 @@ github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d h1:7XGaL1e6bYS1yIonGp9761ExpPPV1ui0SAC59Yube9k= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.1.0 h1:rVsPeBmXbYv4If/cumu1AzZPwV58q433hvONV1UEZoI= +github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -120,11 +153,10 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inlets/inletsctl v0.0.0-20200211114314-aab68519494e h1:mfRxAHfk33MTXwRWRUvPM2zd8/zRF2HPJpFD+rtszfQ= -github.com/inlets/inletsctl v0.0.0-20200211114314-aab68519494e/go.mod h1:tg0BetuaJwCrzH2DIWDhKxlXF+kXs2kUywjtKVhFhNg= +github.com/inlets/inletsctl v0.0.0-20200630123138-2af07d807845 h1:kXLRUtZf8bxoFJwmiBvBWFgu06nkLXu3YbNpPHnIyUc= +github.com/inlets/inletsctl v0.0.0-20200630123138-2af07d807845/go.mod h1:TYXLQgu6kEQAH+X2TgZclvJ1h+QK7cJaoPGfkfIr9KI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -137,17 +169,19 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/linode/linodego v0.19.0 h1:JxYBTxUcXcOlCwLMuugc7Il0RMtJ7riaddqz6gG/ACA= +github.com/linode/linodego v0.19.0/go.mod h1:XOWXRHjqeU2uPS84tKLgfWIfTlv3TYzCS0io4GOQzEI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -156,8 +190,8 @@ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8m github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -166,11 +200,9 @@ github.com/packethost/packngo v0.2.0/go.mod h1:RQHg5xR1F614BwJyepfMqrKN+32IH0i7y github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.4 h1:k0j49IgEf+5j0vwqP8StW5gjzVNwmP0+0hWx/z3FKSw= @@ -189,7 +221,6 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= @@ -206,12 +237,11 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 h1:7KByu05hhLed2MO29w7p1XfZvZ13m8mub3shuVftRs0= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= 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= @@ -241,6 +271,7 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -271,8 +302,7 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 h1:ng0gs1AKnRRuEMZoTLLlbOd+C17zUDepwGQBb/n+JVg= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 h1:ZBzSG/7F4eNKz2L3GE9o300RX0Az1Bw5HF7PDraD+qU= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -287,7 +317,6 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -307,9 +336,8 @@ golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2 h1:EtTFh6h4SAKemS+CURDMTDIANuduG5zKEXShyy18bGA= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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= @@ -351,45 +379,38 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 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= -k8s.io/api v0.17.0 h1:H9d/lw+VkZKEVIUc8F3wgiQ+FUXTTr21M87jXLU7yqM= -k8s.io/api v0.17.0/go.mod h1:npsyOePkeP0CPwyGfXDHxvypiYMJxBWAMpQxCaJ4ZxI= -k8s.io/apimachinery v0.17.0/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= -k8s.io/apimachinery v0.17.1-beta.0 h1:0Wl/KpAiFOMe9to5h8x2Y6JnjV+BEWJiTcUk1Vx7zdE= -k8s.io/apimachinery v0.17.1-beta.0/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= -k8s.io/client-go v0.17.0 h1:8QOGvUGdqDMFrm9sD6IUFl256BcffynGoe80sxgTEDg= -k8s.io/client-go v0.17.0/go.mod h1:TYgR6EUHs6k45hb6KWjVD6jFZvJV4gHDikv/It0xz+k= -k8s.io/code-generator v0.17.0 h1:y+KWtDWNqlJzJu/kUy8goJZO0X71PGIpAHLX8a0JYk0= -k8s.io/code-generator v0.17.0/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= +k8s.io/api v0.18.3 h1:2AJaUQdgUZLoDZHrun21PW2Nx9+ll6cUzvn3IKhSIn0= +k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA= +k8s.io/apimachinery v0.18.3 h1:pOGcbVAhxADgUYnjS08EFXs9QMl8qaH5U4fr5LGUrSk= +k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= +k8s.io/client-go v0.18.3 h1:QaJzz92tsN67oorwzmoB0a9r9ZVHuD5ryjbCKP0U22k= +k8s.io/client-go v0.18.3/go.mod h1:4a/dpQEvzAhT1BbuWW09qvIaGw6Gbu1gZYiQZIi1DMw= +k8s.io/code-generator v0.18.5 h1:qMh1fOcU/jOe52e/Sc0ZAnicSk1TCxx81foIYuBIzGk= +k8s.io/code-generator v0.18.5/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20190822140433-26a664648505 h1:ZY6yclUKVbZ+SdWnkfY+Je5vrMpKOxmGeKRbsXVmqYM= -k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200127102705-1e9b17e831be h1:XlQU+KwiOkbaRCKGXKi+vxgphKQMWU/bPyWD9w54gdc= k8s.io/gengo v0.0.0-20200127102705-1e9b17e831be/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20200130172213-cdac1c71ff9f h1:eyoklTFlA40pAqJjvnlVrfr3uTohy60hRad+VdAPEYU= -k8s.io/kube-openapi v0.0.0-20200130172213-cdac1c71ff9f/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f h1:GiPwtSzdP43eI1hpPCbROQCCIgCuiMMNF8YUVLF3vJo= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= -modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= -modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= -modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 h1:Oh3Mzx5pJ+yIumsAD0MOECPVeXsVot0UkiaCGVyfGQY= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index aeb12a4d..10753324 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -9,7 +9,7 @@ set -o pipefail SCRIPT_ROOT=$(git rev-parse --show-toplevel) # Grab code-generator version from go.sum. -CODEGEN_VERSION="v0.17.2" +CODEGEN_VERSION="v0.18.5" CODEGEN_PKG=$(echo `go env GOPATH`"/pkg/mod/k8s.io/code-generator@${CODEGEN_VERSION}") echo ">> Using ${CODEGEN_PKG}" diff --git a/hack/update-crds.sh b/hack/update-crds.sh index e72cd594..70f5477a 100755 --- a/hack/update-crds.sh +++ b/hack/update-crds.sh @@ -16,3 +16,11 @@ echo "$controllergen" \ schemapatch:manifests=./artifacts/crds \ paths=./pkg/apis/... \ output:dir=./artifacts/crds + +# Some versions of controller-tools generate storedVersions and conditions as null, +# We need to change them to [] +echo sed -i.bak \ + -e 's/conditions: null/conditions: \[\]/' \ + -e 's/storedVersions: null/storedVersions: \[\]/' \ + ./artifacts/crds/*.yaml +echo rm -f ./artifacts/crds/*.bak diff --git a/main.go b/main.go index ff65b91b..dccdbcf3 100644 --- a/main.go +++ b/main.go @@ -67,7 +67,7 @@ func main() { ProConfig: InletsProConfig{}, } - flag.StringVar(&infra.Provider, "provider", "packet", "Your infrastructure provider - 'packet', 'digitalocean', 'scaleway', 'civo', 'gce' or 'ec2'") + flag.StringVar(&infra.Provider, "provider", "packet", "Your infrastructure provider - 'packet', 'digitalocean', 'scaleway', 'civo', 'gce', 'linode' or 'ec2'") flag.StringVar(&infra.Region, "region", "", "The region to provision hosts into") flag.StringVar(&infra.Zone, "zone", "us-central1-a", "The zone where the exit node is to be provisioned") flag.StringVar(&infra.AccessKey, "access-key", "", "The access key for your infrastructure provider") diff --git a/pkg/generated/clientset/versioned/clientset.go b/pkg/generated/clientset/versioned/clientset.go index b4a08835..1f373f72 100644 --- a/pkg/generated/clientset/versioned/clientset.go +++ b/pkg/generated/clientset/versioned/clientset.go @@ -59,7 +59,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/pkg/generated/clientset/versioned/typed/inletsoperator/v1alpha1/fake/fake_tunnel.go b/pkg/generated/clientset/versioned/typed/inletsoperator/v1alpha1/fake/fake_tunnel.go index 98cd2fe9..7388dbd2 100644 --- a/pkg/generated/clientset/versioned/typed/inletsoperator/v1alpha1/fake/fake_tunnel.go +++ b/pkg/generated/clientset/versioned/typed/inletsoperator/v1alpha1/fake/fake_tunnel.go @@ -19,6 +19,8 @@ limitations under the License. package fake import ( + "context" + v1alpha1 "github.com/inlets/inlets-operator/pkg/apis/inletsoperator/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -39,7 +41,7 @@ var tunnelsResource = schema.GroupVersionResource{Group: "inlets.inlets.dev", Ve var tunnelsKind = schema.GroupVersionKind{Group: "inlets.inlets.dev", Version: "v1alpha1", Kind: "Tunnel"} // Get takes name of the tunnel, and returns the corresponding tunnel object, and an error if there is any. -func (c *FakeTunnels) Get(name string, options v1.GetOptions) (result *v1alpha1.Tunnel, err error) { +func (c *FakeTunnels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Tunnel, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(tunnelsResource, c.ns, name), &v1alpha1.Tunnel{}) @@ -50,7 +52,7 @@ func (c *FakeTunnels) Get(name string, options v1.GetOptions) (result *v1alpha1. } // List takes label and field selectors, and returns the list of Tunnels that match those selectors. -func (c *FakeTunnels) List(opts v1.ListOptions) (result *v1alpha1.TunnelList, err error) { +func (c *FakeTunnels) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TunnelList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(tunnelsResource, tunnelsKind, c.ns, opts), &v1alpha1.TunnelList{}) @@ -72,14 +74,14 @@ func (c *FakeTunnels) List(opts v1.ListOptions) (result *v1alpha1.TunnelList, er } // Watch returns a watch.Interface that watches the requested tunnels. -func (c *FakeTunnels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeTunnels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(tunnelsResource, c.ns, opts)) } // Create takes the representation of a tunnel and creates it. Returns the server's representation of the tunnel, and an error, if there is any. -func (c *FakeTunnels) Create(tunnel *v1alpha1.Tunnel) (result *v1alpha1.Tunnel, err error) { +func (c *FakeTunnels) Create(ctx context.Context, tunnel *v1alpha1.Tunnel, opts v1.CreateOptions) (result *v1alpha1.Tunnel, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(tunnelsResource, c.ns, tunnel), &v1alpha1.Tunnel{}) @@ -90,7 +92,7 @@ func (c *FakeTunnels) Create(tunnel *v1alpha1.Tunnel) (result *v1alpha1.Tunnel, } // Update takes the representation of a tunnel and updates it. Returns the server's representation of the tunnel, and an error, if there is any. -func (c *FakeTunnels) Update(tunnel *v1alpha1.Tunnel) (result *v1alpha1.Tunnel, err error) { +func (c *FakeTunnels) Update(ctx context.Context, tunnel *v1alpha1.Tunnel, opts v1.UpdateOptions) (result *v1alpha1.Tunnel, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(tunnelsResource, c.ns, tunnel), &v1alpha1.Tunnel{}) @@ -102,7 +104,7 @@ func (c *FakeTunnels) Update(tunnel *v1alpha1.Tunnel) (result *v1alpha1.Tunnel, // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTunnels) UpdateStatus(tunnel *v1alpha1.Tunnel) (*v1alpha1.Tunnel, error) { +func (c *FakeTunnels) UpdateStatus(ctx context.Context, tunnel *v1alpha1.Tunnel, opts v1.UpdateOptions) (*v1alpha1.Tunnel, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(tunnelsResource, "status", c.ns, tunnel), &v1alpha1.Tunnel{}) @@ -113,7 +115,7 @@ func (c *FakeTunnels) UpdateStatus(tunnel *v1alpha1.Tunnel) (*v1alpha1.Tunnel, e } // Delete takes name of the tunnel and deletes it. Returns an error if one occurs. -func (c *FakeTunnels) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeTunnels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(tunnelsResource, c.ns, name), &v1alpha1.Tunnel{}) @@ -121,15 +123,15 @@ func (c *FakeTunnels) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeTunnels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(tunnelsResource, c.ns, listOptions) +func (c *FakeTunnels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(tunnelsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.TunnelList{}) return err } // Patch applies the patch and returns the patched tunnel. -func (c *FakeTunnels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Tunnel, err error) { +func (c *FakeTunnels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Tunnel, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(tunnelsResource, c.ns, name, pt, data, subresources...), &v1alpha1.Tunnel{}) diff --git a/pkg/generated/clientset/versioned/typed/inletsoperator/v1alpha1/tunnel.go b/pkg/generated/clientset/versioned/typed/inletsoperator/v1alpha1/tunnel.go index 81ad629c..f8786099 100644 --- a/pkg/generated/clientset/versioned/typed/inletsoperator/v1alpha1/tunnel.go +++ b/pkg/generated/clientset/versioned/typed/inletsoperator/v1alpha1/tunnel.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "github.com/inlets/inlets-operator/pkg/apis/inletsoperator/v1alpha1" @@ -37,15 +38,15 @@ type TunnelsGetter interface { // TunnelInterface has methods to work with Tunnel resources. type TunnelInterface interface { - Create(*v1alpha1.Tunnel) (*v1alpha1.Tunnel, error) - Update(*v1alpha1.Tunnel) (*v1alpha1.Tunnel, error) - UpdateStatus(*v1alpha1.Tunnel) (*v1alpha1.Tunnel, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.Tunnel, error) - List(opts v1.ListOptions) (*v1alpha1.TunnelList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Tunnel, err error) + Create(ctx context.Context, tunnel *v1alpha1.Tunnel, opts v1.CreateOptions) (*v1alpha1.Tunnel, error) + Update(ctx context.Context, tunnel *v1alpha1.Tunnel, opts v1.UpdateOptions) (*v1alpha1.Tunnel, error) + UpdateStatus(ctx context.Context, tunnel *v1alpha1.Tunnel, opts v1.UpdateOptions) (*v1alpha1.Tunnel, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.Tunnel, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.TunnelList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Tunnel, err error) TunnelExpansion } @@ -64,20 +65,20 @@ func newTunnels(c *InletsV1alpha1Client, namespace string) *tunnels { } // Get takes name of the tunnel, and returns the corresponding tunnel object, and an error if there is any. -func (c *tunnels) Get(name string, options v1.GetOptions) (result *v1alpha1.Tunnel, err error) { +func (c *tunnels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Tunnel, err error) { result = &v1alpha1.Tunnel{} err = c.client.Get(). Namespace(c.ns). Resource("tunnels"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Tunnels that match those selectors. -func (c *tunnels) List(opts v1.ListOptions) (result *v1alpha1.TunnelList, err error) { +func (c *tunnels) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TunnelList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -88,13 +89,13 @@ func (c *tunnels) List(opts v1.ListOptions) (result *v1alpha1.TunnelList, err er Resource("tunnels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested tunnels. -func (c *tunnels) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *tunnels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -105,87 +106,90 @@ func (c *tunnels) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("tunnels"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a tunnel and creates it. Returns the server's representation of the tunnel, and an error, if there is any. -func (c *tunnels) Create(tunnel *v1alpha1.Tunnel) (result *v1alpha1.Tunnel, err error) { +func (c *tunnels) Create(ctx context.Context, tunnel *v1alpha1.Tunnel, opts v1.CreateOptions) (result *v1alpha1.Tunnel, err error) { result = &v1alpha1.Tunnel{} err = c.client.Post(). Namespace(c.ns). Resource("tunnels"). + VersionedParams(&opts, scheme.ParameterCodec). Body(tunnel). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a tunnel and updates it. Returns the server's representation of the tunnel, and an error, if there is any. -func (c *tunnels) Update(tunnel *v1alpha1.Tunnel) (result *v1alpha1.Tunnel, err error) { +func (c *tunnels) Update(ctx context.Context, tunnel *v1alpha1.Tunnel, opts v1.UpdateOptions) (result *v1alpha1.Tunnel, err error) { result = &v1alpha1.Tunnel{} err = c.client.Put(). Namespace(c.ns). Resource("tunnels"). Name(tunnel.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(tunnel). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *tunnels) UpdateStatus(tunnel *v1alpha1.Tunnel) (result *v1alpha1.Tunnel, err error) { +func (c *tunnels) UpdateStatus(ctx context.Context, tunnel *v1alpha1.Tunnel, opts v1.UpdateOptions) (result *v1alpha1.Tunnel, err error) { result = &v1alpha1.Tunnel{} err = c.client.Put(). Namespace(c.ns). Resource("tunnels"). Name(tunnel.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(tunnel). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the tunnel and deletes it. Returns an error if one occurs. -func (c *tunnels) Delete(name string, options *v1.DeleteOptions) error { +func (c *tunnels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("tunnels"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *tunnels) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *tunnels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("tunnels"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched tunnel. -func (c *tunnels) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Tunnel, err error) { +func (c *tunnels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Tunnel, err error) { result = &v1alpha1.Tunnel{} err = c.client.Patch(pt). Namespace(c.ns). Resource("tunnels"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/pkg/generated/informers/externalversions/inletsoperator/v1alpha1/tunnel.go b/pkg/generated/informers/externalversions/inletsoperator/v1alpha1/tunnel.go index 5d024cfc..623c08b1 100644 --- a/pkg/generated/informers/externalversions/inletsoperator/v1alpha1/tunnel.go +++ b/pkg/generated/informers/externalversions/inletsoperator/v1alpha1/tunnel.go @@ -19,9 +19,10 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" - InletsV1alpha1 "github.com/inlets/inlets-operator/pkg/apis/inletsoperator/v1alpha1" + inletsoperatorv1alpha1 "github.com/inlets/inlets-operator/pkg/apis/inletsoperator/v1alpha1" versioned "github.com/inlets/inlets-operator/pkg/generated/clientset/versioned" internalinterfaces "github.com/inlets/inlets-operator/pkg/generated/informers/externalversions/internalinterfaces" v1alpha1 "github.com/inlets/inlets-operator/pkg/generated/listers/inletsoperator/v1alpha1" @@ -61,16 +62,16 @@ func NewFilteredTunnelInformer(client versioned.Interface, namespace string, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.InletsV1alpha1().Tunnels(namespace).List(options) + return client.InletsV1alpha1().Tunnels(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.InletsV1alpha1().Tunnels(namespace).Watch(options) + return client.InletsV1alpha1().Tunnels(namespace).Watch(context.TODO(), options) }, }, - &InletsV1alpha1.Tunnel{}, + &inletsoperatorv1alpha1.Tunnel{}, resyncPeriod, indexers, ) @@ -81,7 +82,7 @@ func (f *tunnelInformer) defaultInformer(client versioned.Interface, resyncPerio } func (f *tunnelInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&InletsV1alpha1.Tunnel{}, f.defaultInformer) + return f.factory.InformerFor(&inletsoperatorv1alpha1.Tunnel{}, f.defaultInformer) } func (f *tunnelInformer) Lister() v1alpha1.TunnelLister {