ingressroute

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupName    = "traefik.containo.us"
	GroupVersion = "v1alpha1"
)
View Source
const IngressRouteResource string = "ingressroutes"

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{
	Group:   GroupName,
	Version: GroupVersion,
}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client manages communication with the Traefik IngressRoute.

func NewClient

func NewClient(clientset Interface) *Client

NewClient constructs a new Client.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, name, namespace string) (err error)

Delete deletes IngressRoute

func (*Client) GetIngressHosts added in v0.17.8

func (c *Client) GetIngressHosts(ctx context.Context, namespace, label string) (nodes []ingress.NodeInfo, err error)

GetIngressHosts list Ingress Routes hosts using label as selector, for the given namespace. If label is empty, all Ingresses are listed.

func (*Client) Set

func (c *Client) Set(ctx context.Context, name, namespace string, o Options) (ing *IngressRoute, err error)

Set updates IngressRoute or creates it if it does not exist

type CustomResourceClient

type CustomResourceClient struct {
	// contains filtered or unexported fields
}

func NewForConfig

func NewForConfig(c *rest.Config) (*CustomResourceClient, error)

func (*CustomResourceClient) IngressRoutes

func (c *CustomResourceClient) IngressRoutes(namespace string) IngressRouteInterface

type IngressRoute

type IngressRoute struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec IngressRouteSpec `json:"spec"`
}

func (*IngressRoute) DeepCopyInto

func (in *IngressRoute) DeepCopyInto(out *IngressRoute)

DeepCopyInto copies all properties of this object into another object of the same type that is provided as a pointer.

func (*IngressRoute) DeepCopyObject

func (ir *IngressRoute) DeepCopyObject() runtime.Object

DeepCopyObject implements runtime.Object

type IngressRouteInterface

type IngressRouteInterface interface {
	List(ctx context.Context, opts metav1.ListOptions) (*IngressRouteList, error)
	Get(ctx context.Context, name string, options metav1.GetOptions) (*IngressRoute, error)
	Create(ctx context.Context, ir *IngressRoute) (*IngressRoute, error)
	Update(ctx context.Context, ir *IngressRoute, opts metav1.UpdateOptions) (*IngressRoute, error)
	Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
	Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
}

IngressRouteInterface has methods to work with IngressRoute resources.

type IngressRouteList

type IngressRouteList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []IngressRoute `json:"items"`
}

func (*IngressRouteList) DeepCopyObject

func (in *IngressRouteList) DeepCopyObject() runtime.Object

DeepCopyObject implements runtime.Object

type IngressRouteSpec

type IngressRouteSpec struct {
	Routes []Route `json:"routes"`
}

type Interface

type Interface interface {
	IngressRoutes(namespace string) IngressRouteInterface
}

type Options

type Options struct {
	Annotations map[string]string
	Labels      map[string]string
	Spec        IngressRouteSpec
}

Options holds optional parameters for the Client.

type Route

type Route struct {
	Kind     string    `json:"kind"`
	Match    string    `json:"match"`
	Services []Service `json:"services"`
}

func (*Route) GetHost added in v0.12.3

func (r *Route) GetHost() string

type Service

type Service struct {
	Kind      string `json:"kind"`
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Port      string `json:"port"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL