Bump k8s client to v0.19.2
This commit is contained in:
parent
afcec56be4
commit
3567ae88ad
12 changed files with 127 additions and 49 deletions
|
@ -37,7 +37,7 @@ import (
|
|||
|
||||
var scheme = runtime.NewScheme()
|
||||
var codecs = serializer.NewCodecFactory(scheme)
|
||||
var parameterCodec = runtime.NewParameterCodec(scheme)
|
||||
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
traefikv1alpha1.AddToScheme,
|
||||
}
|
||||
|
|
|
@ -34,8 +34,10 @@ import (
|
|||
)
|
||||
|
||||
// IngressRouteLister helps list IngressRoutes.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type IngressRouteLister interface {
|
||||
// List lists all IngressRoutes in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.IngressRoute, err error)
|
||||
// IngressRoutes returns an object that can list and get IngressRoutes.
|
||||
IngressRoutes(namespace string) IngressRouteNamespaceLister
|
||||
|
@ -66,10 +68,13 @@ func (s *ingressRouteLister) IngressRoutes(namespace string) IngressRouteNamespa
|
|||
}
|
||||
|
||||
// IngressRouteNamespaceLister helps list and get IngressRoutes.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type IngressRouteNamespaceLister interface {
|
||||
// List lists all IngressRoutes in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.IngressRoute, err error)
|
||||
// Get retrieves the IngressRoute from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.IngressRoute, error)
|
||||
IngressRouteNamespaceListerExpansion
|
||||
}
|
||||
|
|
|
@ -34,8 +34,10 @@ import (
|
|||
)
|
||||
|
||||
// IngressRouteTCPLister helps list IngressRouteTCPs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type IngressRouteTCPLister interface {
|
||||
// List lists all IngressRouteTCPs in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.IngressRouteTCP, err error)
|
||||
// IngressRouteTCPs returns an object that can list and get IngressRouteTCPs.
|
||||
IngressRouteTCPs(namespace string) IngressRouteTCPNamespaceLister
|
||||
|
@ -66,10 +68,13 @@ func (s *ingressRouteTCPLister) IngressRouteTCPs(namespace string) IngressRouteT
|
|||
}
|
||||
|
||||
// IngressRouteTCPNamespaceLister helps list and get IngressRouteTCPs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type IngressRouteTCPNamespaceLister interface {
|
||||
// List lists all IngressRouteTCPs in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.IngressRouteTCP, err error)
|
||||
// Get retrieves the IngressRouteTCP from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.IngressRouteTCP, error)
|
||||
IngressRouteTCPNamespaceListerExpansion
|
||||
}
|
||||
|
|
|
@ -34,8 +34,10 @@ import (
|
|||
)
|
||||
|
||||
// IngressRouteUDPLister helps list IngressRouteUDPs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type IngressRouteUDPLister interface {
|
||||
// List lists all IngressRouteUDPs in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.IngressRouteUDP, err error)
|
||||
// IngressRouteUDPs returns an object that can list and get IngressRouteUDPs.
|
||||
IngressRouteUDPs(namespace string) IngressRouteUDPNamespaceLister
|
||||
|
@ -66,10 +68,13 @@ func (s *ingressRouteUDPLister) IngressRouteUDPs(namespace string) IngressRouteU
|
|||
}
|
||||
|
||||
// IngressRouteUDPNamespaceLister helps list and get IngressRouteUDPs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type IngressRouteUDPNamespaceLister interface {
|
||||
// List lists all IngressRouteUDPs in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.IngressRouteUDP, err error)
|
||||
// Get retrieves the IngressRouteUDP from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.IngressRouteUDP, error)
|
||||
IngressRouteUDPNamespaceListerExpansion
|
||||
}
|
||||
|
|
|
@ -34,8 +34,10 @@ import (
|
|||
)
|
||||
|
||||
// MiddlewareLister helps list Middlewares.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type MiddlewareLister interface {
|
||||
// List lists all Middlewares in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.Middleware, err error)
|
||||
// Middlewares returns an object that can list and get Middlewares.
|
||||
Middlewares(namespace string) MiddlewareNamespaceLister
|
||||
|
@ -66,10 +68,13 @@ func (s *middlewareLister) Middlewares(namespace string) MiddlewareNamespaceList
|
|||
}
|
||||
|
||||
// MiddlewareNamespaceLister helps list and get Middlewares.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type MiddlewareNamespaceLister interface {
|
||||
// List lists all Middlewares in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.Middleware, err error)
|
||||
// Get retrieves the Middleware from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.Middleware, error)
|
||||
MiddlewareNamespaceListerExpansion
|
||||
}
|
||||
|
|
|
@ -34,8 +34,10 @@ import (
|
|||
)
|
||||
|
||||
// ServersTransportLister helps list ServersTransports.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ServersTransportLister interface {
|
||||
// List lists all ServersTransports in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.ServersTransport, err error)
|
||||
// ServersTransports returns an object that can list and get ServersTransports.
|
||||
ServersTransports(namespace string) ServersTransportNamespaceLister
|
||||
|
@ -66,10 +68,13 @@ func (s *serversTransportLister) ServersTransports(namespace string) ServersTran
|
|||
}
|
||||
|
||||
// ServersTransportNamespaceLister helps list and get ServersTransports.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ServersTransportNamespaceLister interface {
|
||||
// List lists all ServersTransports in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.ServersTransport, err error)
|
||||
// Get retrieves the ServersTransport from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.ServersTransport, error)
|
||||
ServersTransportNamespaceListerExpansion
|
||||
}
|
||||
|
|
|
@ -34,8 +34,10 @@ import (
|
|||
)
|
||||
|
||||
// TLSOptionLister helps list TLSOptions.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type TLSOptionLister interface {
|
||||
// List lists all TLSOptions in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.TLSOption, err error)
|
||||
// TLSOptions returns an object that can list and get TLSOptions.
|
||||
TLSOptions(namespace string) TLSOptionNamespaceLister
|
||||
|
@ -66,10 +68,13 @@ func (s *tLSOptionLister) TLSOptions(namespace string) TLSOptionNamespaceLister
|
|||
}
|
||||
|
||||
// TLSOptionNamespaceLister helps list and get TLSOptions.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type TLSOptionNamespaceLister interface {
|
||||
// List lists all TLSOptions in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.TLSOption, err error)
|
||||
// Get retrieves the TLSOption from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.TLSOption, error)
|
||||
TLSOptionNamespaceListerExpansion
|
||||
}
|
||||
|
|
|
@ -34,8 +34,10 @@ import (
|
|||
)
|
||||
|
||||
// TLSStoreLister helps list TLSStores.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type TLSStoreLister interface {
|
||||
// List lists all TLSStores in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.TLSStore, err error)
|
||||
// TLSStores returns an object that can list and get TLSStores.
|
||||
TLSStores(namespace string) TLSStoreNamespaceLister
|
||||
|
@ -66,10 +68,13 @@ func (s *tLSStoreLister) TLSStores(namespace string) TLSStoreNamespaceLister {
|
|||
}
|
||||
|
||||
// TLSStoreNamespaceLister helps list and get TLSStores.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type TLSStoreNamespaceLister interface {
|
||||
// List lists all TLSStores in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.TLSStore, err error)
|
||||
// Get retrieves the TLSStore from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.TLSStore, error)
|
||||
TLSStoreNamespaceListerExpansion
|
||||
}
|
||||
|
|
|
@ -34,8 +34,10 @@ import (
|
|||
)
|
||||
|
||||
// TraefikServiceLister helps list TraefikServices.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type TraefikServiceLister interface {
|
||||
// List lists all TraefikServices in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.TraefikService, err error)
|
||||
// TraefikServices returns an object that can list and get TraefikServices.
|
||||
TraefikServices(namespace string) TraefikServiceNamespaceLister
|
||||
|
@ -66,10 +68,13 @@ func (s *traefikServiceLister) TraefikServices(namespace string) TraefikServiceN
|
|||
}
|
||||
|
||||
// TraefikServiceNamespaceLister helps list and get TraefikServices.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type TraefikServiceNamespaceLister interface {
|
||||
// List lists all TraefikServices in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.TraefikService, err error)
|
||||
// Get retrieves the TraefikService from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.TraefikService, error)
|
||||
TraefikServiceNamespaceListerExpansion
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ import (
|
|||
"io/ioutil"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/hashicorp/go-version"
|
||||
"github.com/traefik/traefik/v2/pkg/log"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
|
@ -28,6 +27,10 @@ const (
|
|||
defaultTimeout = 5 * time.Second
|
||||
)
|
||||
|
||||
type marshaler interface {
|
||||
Marshal() ([]byte, error)
|
||||
}
|
||||
|
||||
type resourceEventHandler struct {
|
||||
ev chan<- interface{}
|
||||
}
|
||||
|
@ -214,7 +217,7 @@ func (c *clientWrapper) GetIngresses() []*networkingv1beta1.Ingress {
|
|||
return results
|
||||
}
|
||||
|
||||
func extensionsToNetworking(ing proto.Marshaler) (*networkingv1beta1.Ingress, error) {
|
||||
func extensionsToNetworking(ing marshaler) (*networkingv1beta1.Ingress, error) {
|
||||
data, err := ing.Marshal()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue