kube

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Overview

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	// IngressV1 represents the Ingress in networking/v1 group version.
	IngressV1 = "networking/v1"
	// IngressV1beta1 represents the Ingress in networking/v1beta1 group version.
	IngressV1beta1 = "networking/v1beta1"
)

Variables

This section is empty.

Functions

func BuildRestConfig

func BuildRestConfig(kubeconfig, context string) (*rest.Config, error)

BuildRestConfig builds the rest.Config object from kubeconfig filepath and context, if kubeconfig is missing, building from in-cluster configuration.

Types

type ApisixClusterConfig added in v1.7.0

type ApisixClusterConfig interface {
	// GroupVersion returns the api group version of the
	// real ApisixClusterConfig.
	GroupVersion() string
	// V2 returns the ApisixClusterConfig in apisix.apache.org/v2, the real
	// ApisixClusterConfig must be in this group version, otherwise will panic.
	V2() *configv2.ApisixClusterConfig
	// ResourceVersion returns the resource version field inside
	// the real ApisixClusterConfig.
	ResourceVersion() string
}

ApisixClusterConfig is an encapsulation for ApisixClusterConfig resource with different versions, for now, they are apisix.apache.org/v1 and apisix.apache.org/v2alpha1

func MustNewApisixClusterConfig added in v1.7.0

func MustNewApisixClusterConfig(obj interface{}) ApisixClusterConfig

MustNewApisixClusterConfig creates a kube.ApisixClusterConfig object according to the type of obj.

func NewApisixClusterConfig added in v1.7.0

func NewApisixClusterConfig(obj interface{}) (ApisixClusterConfig, error)

NewApisixClusterConfig creates a kube.ApisixClusterConfig object according to the type of obj. It returns nil and the error reason when the type assertion fails.

type ApisixClusterConfigEvent added in v1.7.0

type ApisixClusterConfigEvent struct {
	Key          string
	OldObject    ApisixClusterConfig
	GroupVersion string
}

ApisixClusterConfigEvent contains the ApisixClusterConfig key (namespace/name) and the group version message.

type ApisixClusterConfigInformer added in v1.7.0

type ApisixClusterConfigInformer interface {
	Run(chan struct{})
}

ApisixClusterConfigInformer is an encapsulation for the informer of ApisixClusterConfig, it aims at to be compatible with different ApisixClusterConfig versions.

type ApisixClusterConfigLister added in v1.7.0

type ApisixClusterConfigLister interface {
	// V2 gets the ApisixClusterConfig in apisix.apache.org/v2.
	V2(string) (ApisixClusterConfig, error)
}

ApisixClusterConfigLister is an encapsulation for the lister of ApisixClusterConfig, it aims at to be compatible with different ApisixClusterConfig versions.

func NewApisixClusterConfigLister added in v1.7.0

func NewApisixClusterConfigLister(v2 listersv2.ApisixClusterConfigLister) ApisixClusterConfigLister

type ApisixConsumer added in v1.7.0

type ApisixConsumer interface {
	// GroupVersion returns the api group version of the
	// real ApisixConsumer.
	GroupVersion() string
	// V2 returns the ApisixConsumer in apisix.apache.org/v2, the real
	// ApisixConsumer must be in this group version, otherwise will panic.
	V2() *configv2.ApisixConsumer
	// ResourceVersion returns the the resource version field inside
	// the real ApisixConsumer.
	ResourceVersion() string

	metav1.Object
}

ApisixConsumer is an encapsulation for ApisixConsumer resource with different versions, for now, they only includes apisix.apache.org/v2

func MustNewApisixConsumer added in v1.7.0

func MustNewApisixConsumer(obj interface{}) ApisixConsumer

MustNewApisixConsumer creates a kube.ApisixConsumer object according to the type of obj.

func NewApisixConsumer added in v1.7.0

func NewApisixConsumer(obj interface{}) (ApisixConsumer, error)

NewApisixConsumer creates a kube.ApisixConsumer object according to the type of obj. It returns nil and the error reason when the type assertion fails.

type ApisixConsumerEvent added in v1.7.0

type ApisixConsumerEvent struct {
	Key          string
	OldObject    ApisixConsumer
	GroupVersion string
}

ApisixConsumerEvent contains the ApisixConsumer key (namespace/name) and the group version message.

type ApisixConsumerInformer added in v1.7.0

type ApisixConsumerInformer interface {
	Run(chan struct{})
}

ApisixConsumerInformer is an encapsulation for the informer of ApisixConsumer, it aims at to be compatible with different ApisixConsumer versions.

type ApisixConsumerLister added in v1.7.0

type ApisixConsumerLister interface {
	// V2 gets the ApisixConsumer in apisix.apache.org/v2.
	V2(string, string) (ApisixConsumer, error)
}

ApisixConsumerLister is an encapsulation for the lister of ApisixConsumer, it aims at to be compatible with different ApisixConsumer versions.

func NewApisixConsumerLister added in v1.7.0

func NewApisixConsumerLister(v2 listersv2.ApisixConsumerLister) ApisixConsumerLister

type ApisixGlobalRule added in v1.7.0

type ApisixGlobalRule interface {
	// GroupVersion returns the api group version of the
	// real ApisixGlobalRule.
	GroupVersion() string
	// V2 returns the ApisixGlobalRule in apisix.apache.org/v2, the real
	// ApisixGlobalRule must be in this group version, otherwise will panic.
	V2() *configv2.ApisixGlobalRule
	// ResourceVersion returns the the resource version field inside
	// the real ApisixGlobalRule.
	ResourceVersion() string

	metav1.Object
}

ApisixGlobalRule is an encapsulation for ApisixGlobalRule resource with different versions, for now, they are apisix.apache.org/v1 and apisix.apache.org/v2alpha1

func MustNewApisixGlobalRule added in v1.7.0

func MustNewApisixGlobalRule(obj interface{}) ApisixGlobalRule

MustNewApisixGlobalRule creates a kube.ApisixGlobalRule object according to the type of obj.

func NewApisixGlobalRule added in v1.7.0

func NewApisixGlobalRule(obj interface{}) (ApisixGlobalRule, error)

NewApisixGlobalRule creates a kube.ApisixGlobalRule object according to the type of obj. It returns nil and the error reason when the type assertion fails.

type ApisixGlobalRuleEvent added in v1.7.0

type ApisixGlobalRuleEvent struct {
	Key          string
	OldObject    ApisixGlobalRule
	GroupVersion string
}

ApisixGlobalRuleEvent contains the ApisixGlobalRule key (namespace/name) and the group version message.

type ApisixGlobalRuleInformer added in v1.7.0

type ApisixGlobalRuleInformer interface {
	Run(chan struct{})
}

ApisixGlobalRuleInformer is an encapsulation for the informer of ApisixGlobalRule, it aims at to be compatible with different ApisixGlobalRule versions.

type ApisixGlobalRuleLister added in v1.7.0

type ApisixGlobalRuleLister interface {
	// V2 gets the ApisixGlobalRule in apisix.apache.org/v2.
	V2(string, string) (ApisixGlobalRule, error)

	ApisixGlobalRule(string, string) (ApisixGlobalRule, error)
}

ApisixGlobalRuleLister is an encapsulation for the lister of ApisixGlobalRule, it aims at to be compatible with different ApisixGlobalRule versions.

func NewApisixGlobalRuleLister added in v1.7.0

func NewApisixGlobalRuleLister(apiVersion string, v2 listersv2.ApisixGlobalRuleLister) ApisixGlobalRuleLister

type ApisixPluginConfig added in v1.4.0

type ApisixPluginConfig interface {
	// GroupVersion returns the api group version of the
	// real ApisixPluginConfig.
	GroupVersion() string
	// V2 returns the ApisixPluginConfig in apisix.apache.org/v2, the real
	// ApisixPluginConfig must be in this group version, otherwise will panic.
	V2() *configv2.ApisixPluginConfig
	// ResourceVersion returns the the resource version field inside
	// the real ApisixPluginConfig.
	ResourceVersion() string

	metav1.Object
}

ApisixPluginConfig is an encapsulation for ApisixPluginConfig resource with different versions, for now, they are apisix.apache.org/v1 and apisix.apache.org/v2alpha1

func MustNewApisixPluginConfig added in v1.4.0

func MustNewApisixPluginConfig(obj interface{}) ApisixPluginConfig

MustNewApisixPluginConfig creates a kube.ApisixPluginConfig object according to the type of obj.

func NewApisixPluginConfig added in v1.4.0

func NewApisixPluginConfig(obj interface{}) (ApisixPluginConfig, error)

NewApisixPluginConfig creates a kube.ApisixPluginConfig object according to the type of obj. It returns nil and the error reason when the type assertion fails.

type ApisixPluginConfigEvent added in v1.4.0

type ApisixPluginConfigEvent struct {
	Key          string
	OldObject    ApisixPluginConfig
	GroupVersion string
}

ApisixPluginConfigEvent contains the ApisixPluginConfig key (namespace/name) and the group version message.

type ApisixPluginConfigInformer added in v1.4.0

type ApisixPluginConfigInformer interface {
	Run(chan struct{})
}

ApisixPluginConfigInformer is an encapsulation for the informer of ApisixPluginConfig, it aims at to be compatible with different ApisixPluginConfig versions.

type ApisixPluginConfigLister added in v1.4.0

type ApisixPluginConfigLister interface {
	// V2 gets the ApisixPluginConfig in apisix.apache.org/v2.
	V2(string, string) (ApisixPluginConfig, error)
}

ApisixPluginConfigLister is an encapsulation for the lister of ApisixPluginConfig, it aims at to be compatible with different ApisixPluginConfig versions.

func NewApisixPluginConfigLister added in v1.4.0

func NewApisixPluginConfigLister(v2 listersv2.ApisixPluginConfigLister) ApisixPluginConfigLister

type ApisixRoute added in v0.4.0

type ApisixRoute interface {
	// GroupVersion returns the api group version of the
	// real ApisixRoute.
	GroupVersion() string
	// V2 returns the ApisixRoute in apisix.apache.org/v2, the real
	// ApisixRoute must be in this group version, otherwise will panic.
	V2() *configv2.ApisixRoute
	// ResourceVersion returns the the resource version field inside
	// the real ApisixRoute.
	ResourceVersion() string

	metav1.Object
}

ApisixRoute is an encapsulation for ApisixRoute resource with different versions, for now, they are apisix.apache.org/v1 and apisix.apache.org/v2alpha1

func MustNewApisixRoute added in v0.4.0

func MustNewApisixRoute(obj interface{}) ApisixRoute

MustNewApisixRoute creates a kube.ApisixRoute object according to the type of obj.

func NewApisixRoute added in v0.4.0

func NewApisixRoute(obj interface{}) (ApisixRoute, error)

NewApisixRoute creates a kube.ApisixRoute object according to the type of obj. It returns nil and the error reason when the type assertion fails.

type ApisixRouteEvent added in v0.4.0

type ApisixRouteEvent struct {
	Key          string
	OldObject    ApisixRoute
	GroupVersion string
}

ApisixRouteEvent contains the ApisixRoute key (namespace/name) and the group version message.

type ApisixRouteInformer added in v0.4.0

type ApisixRouteInformer interface {
	Run(chan struct{})
}

ApisixRouteInformer is an encapsulation for the informer of ApisixRoute, it aims at to be compatible with different ApisixRoute versions.

type ApisixRouteLister added in v0.4.0

type ApisixRouteLister interface {
	// V2 gets the ApisixRoute in apisix.apache.org/v2.
	V2(string, string) (ApisixRoute, error)
	// V2Lister gets the v2 lister
	V2Lister() listersv2.ApisixRouteLister
}

ApisixRouteLister is an encapsulation for the lister of ApisixRoute, it aims at to be compatible with different ApisixRoute versions.

func NewApisixRouteLister added in v0.4.0

func NewApisixRouteLister(v2 listersv2.ApisixRouteLister) ApisixRouteLister

type ApisixTls added in v1.7.0

type ApisixTls interface {
	// GroupVersion returns the api group version of the
	// real ApisixTls.
	GroupVersion() string
	// V2 returns the ApisixTls in apisix.apache.org/v2, the real
	// ApisixTls must be in this group version, otherwise will panic.
	V2() *configv2.ApisixTls
	// ResourceVersion returns the the resource version field inside
	// the real ApisixTls.
	ResourceVersion() string

	metav1.Object
}

ApisixTls is an encapsulation for ApisixTls resource with different versions, for now, they are apisix.apache.org/v1 and apisix.apache.org/v2alpha1

func MustNewApisixTls added in v1.7.0

func MustNewApisixTls(obj interface{}) ApisixTls

MustNewApisixTls creates a kube.ApisixTls object according to the type of obj.

func NewApisixTls added in v1.7.0

func NewApisixTls(obj interface{}) (ApisixTls, error)

NewApisixTls creates a kube.ApisixTls object according to the type of obj. It returns nil and the error reason when the type assertion fails.

type ApisixTlsEvent added in v1.7.0

type ApisixTlsEvent struct {
	Key          string
	OldObject    ApisixTls
	GroupVersion string
}

ApisixTlsEvent contains the ApisixTls key (namespace/name) and the group version message.

type ApisixTlsInformer added in v1.7.0

type ApisixTlsInformer interface {
	Run(chan struct{})
}

ApisixTlsInformer is an encapsulation for the informer of ApisixTls, it aims at to be compatible with different ApisixTls versions.

type ApisixTlsLister added in v1.7.0

type ApisixTlsLister interface {
	// V2 gets the ApisixTls in apisix.apache.org/v2.
	V2(string, string) (ApisixTls, error)
}

ApisixTlsLister is an encapsulation for the lister of ApisixTls, it aims at to be compatible with different ApisixTls versions.

func NewApisixTlsLister added in v1.7.0

func NewApisixTlsLister(v2 listersv2.ApisixTlsLister) ApisixTlsLister

type ApisixUpstream added in v1.7.0

type ApisixUpstream interface {
	// GroupVersion returns the api group version of the
	// real ApisixUpstream.
	GroupVersion() string
	// V2 returns the ApisixUpstream in apisix.apache.org/v2, the real
	// ApisixUpstream must be in this group version, otherwise will panic.
	V2() *configv2.ApisixUpstream
	// ResourceVersion returns the the resource version field inside
	// the real ApisixUpstream.
	ResourceVersion() string

	metav1.Object
}

ApisixUpstream is an encapsulation for ApisixUpstream resource with different versions, for now, they only include apisix.apache.org/v2

func MustNewApisixUpstream added in v1.7.0

func MustNewApisixUpstream(obj interface{}) ApisixUpstream

MustNewApisixUpstream creates a kube.ApisixUpstream object according to the type of obj.

func NewApisixUpstream added in v1.7.0

func NewApisixUpstream(obj interface{}) (ApisixUpstream, error)

NewApisixUpstream creates a kube.ApisixUpstream object according to the type of obj. It returns nil and the error reason when the type assertion fails.

type ApisixUpstreamEvent added in v1.7.0

type ApisixUpstreamEvent struct {
	Key          string
	OldObject    ApisixUpstream
	GroupVersion string
}

ApisixUpstreamEvent contains the ApisixUpstream key (namespace/name) and the group version message.

type ApisixUpstreamInformer added in v1.7.0

type ApisixUpstreamInformer interface {
	Run(chan struct{})
}

ApisixUpstreamInformer is an encapsulation for the informer of ApisixUpstream, it aims at to be compatible with different ApisixUpstream versions.

type ApisixUpstreamLister added in v1.7.0

type ApisixUpstreamLister interface {
	// V2 gets the ApisixUpstream in apisix.apache.org/v2.
	V2(namespace, name string) (ApisixUpstream, error)
	// ListV2 gets v2.ApisixUpstreams
	ListV2(namespace string) ([]*configv2.ApisixUpstream, error)
}

ApisixUpstreamLister is an encapsulation for the lister of ApisixUpstream, it aims at to be compatible with different ApisixUpstream versions.

func NewApisixUpstreamLister added in v1.7.0

func NewApisixUpstreamLister(v2 listersv2.ApisixUpstreamLister) ApisixUpstreamLister

type Endpoint added in v1.1.0

type Endpoint interface {
	// ServiceName returns the corresponding service owner of this endpoint.
	ServiceName() string
	// Namespace returns the residing namespace.
	Namespace() (string, error)
	// Endpoints returns the corresponding endpoints which matches the ServicePort.
	Endpoints(port *corev1.ServicePort) []HostPort
}

Endpoint is an encapsulation for the Kubernetes Endpoint and EndpointSlice objects.

func NewEndpoint added in v1.1.0

func NewEndpoint(ep *corev1.Endpoints) Endpoint

NewEndpoint creates an Endpoint which entity is Kubernetes Endpoints.

func NewEndpointWithSlice added in v1.1.0

func NewEndpointWithSlice(ep *discoveryv1.EndpointSlice) Endpoint

NewEndpointWithSlice creates an Endpoint which entity is Kubernetes EndpointSlices.

type EndpointLister added in v1.1.0

type EndpointLister interface {
	// GetEndpoint fetches an Endpoint which entity is the Kubernetes
	// Endpoint according to the namespace and name.
	// Automatically choose from endpoint/endpointslice
	GetEndpoint(string, string) (Endpoint, error)
}

EndpointLister is an encapsulation for the lister of Kubernetes Endpoint and EndpointSlice.

func NewEndpointListerAndInformer added in v1.1.0

func NewEndpointListerAndInformer(factory informers.SharedInformerFactory, useEndpointSlice bool) (EndpointLister, cache.SharedIndexInformer)

NewEndpointListerAndInformer creates an EndpointLister and the sharedIndexInformer.

type HostPort added in v1.1.0

type HostPort struct {
	Host string
	Port int
}

type Ingress added in v0.4.0

type Ingress interface {
	// GroupVersion returns the api group version of the
	// real ingress.
	GroupVersion() string
	// V1 returns the ingress in networking/v1, the real
	// ingress must be in networking/v1, or V1() will panic.
	V1() *networkingv1.Ingress
	// V1beta1 returns the ingress in networking/v1beta1, the real
	// ingress must be in networking/v1beta1, or V1beta1() will panic.
	V1beta1() *networkingv1beta1.Ingress
	// ResourceVersion returns the the resource version field inside
	// the real Ingress.
	ResourceVersion() string

	metav1.Object
}

Ingress is an encapsulation for Kubernetes Ingress with different versions, for now, they are networking/v1 and networking/v1beta1.

func MustNewIngress added in v0.4.0

func MustNewIngress(obj interface{}) Ingress

MustNewIngress creates a kube.Ingress object according to the type of obj.

func NewIngress added in v0.4.0

func NewIngress(obj interface{}) (Ingress, error)

NewIngress creates a kube.Ingress object according to the type of obj. It returns nil and the error reason when the type assertion fails.

type IngressEvent added in v0.4.0

type IngressEvent struct {
	Key          string
	GroupVersion string
	OldObject    Ingress
}

IngressEvents contains the ingress key (namespace/name) and the group version message.

type IngressInformer added in v0.4.0

type IngressInformer interface {
	Run(chan struct{})
}

IngressInformer is an encapsulation for the informer of Kubernetes Ingress, it aims at to be compatible with different Ingress versions.

type IngressLister added in v0.4.0

type IngressLister interface {
	// V1 gets the ingress in networking/v1.
	V1(string, string) (Ingress, error)
	// V1beta1 gets the ingress in networking/v1beta1.
	V1beta1(string, string) (Ingress, error)
}

IngressLister is an encapsulation for the lister of Kubernetes Ingress, it aims at to be compatible with different Ingress versions.

func NewIngressLister added in v0.4.0

NewIngressLister creates an version-neutral Ingress lister.

type KubeClient added in v1.0.0

type KubeClient struct {

	// Client is the object used to operate Kubernetes builtin resources.
	Client kubernetes.Interface
	// APISIXClient is the object used to operate resources under apisix.apache.org group.
	APISIXClient clientset.Interface
	// GatewayClient is the object used to operate resources under gateway.networking.k8s.io group.
	GatewayClient gatewayclientset.Interface
	// contains filtered or unexported fields
}

KubeClient contains some objects used to communicate with Kubernetes API Server.

func NewKubeClient added in v1.0.0

func NewKubeClient(cfg *config.Config) (*KubeClient, error)

NewKubeClient creates a high-level Kubernetes client.

func (*KubeClient) NewAPISIXSharedIndexInformerFactory added in v1.0.0

func (k *KubeClient) NewAPISIXSharedIndexInformerFactory() externalversions.SharedInformerFactory

NewAPISIXSharedIndexInformerFactory returns an index informer factory object used to watch and list Kubernetes resources in apisix.apache.org group.

func (*KubeClient) NewGatewaySharedIndexInformerFactory added in v1.4.0

func (k *KubeClient) NewGatewaySharedIndexInformerFactory() gatewayexternalversions.SharedInformerFactory

NewGatewaySharedIndexInformerFactory returns an index informer factory object used to watch and list Kubernetes resources in gateway.networking.k8s.io group.

func (*KubeClient) NewSharedIndexInformerFactory added in v1.0.0

func (k *KubeClient) NewSharedIndexInformerFactory() informers.SharedInformerFactory

NewSharedIndexInformerFactory returns an index informer factory object used to watch and list Kubernetes builtin resources.

Directories

Path Synopsis
apisix
apis/config/v2
+k8s:deepcopy-gen=package +groupName=apisix.apache.org
+k8s:deepcopy-gen=package +groupName=apisix.apache.org
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/config/v2
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/config/v2/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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