kubernetes

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HostPortNetwork = "Kubernetes-HostPort"
	//ContainerPortsKey represents the configuration key when using hostPort.
	//Its corresponding value format is as follows, containerName:port1/protocol1,port2/protocol2,... e.g. game-server:25565/TCP
	//When no protocol is specified, TCP is used by default
	ContainerPortsKey = "ContainerPorts"
)
View Source
const (
	IngressNetwork = "Kubernetes-Ingress"
	// PathTypeKey determines the interpretation of the Path matching, which is same as PathType in HTTPIngressPath.
	PathTypeKey = "PathType"
	// PathKey is matched against the path of an incoming request, the meaning of which is same as Path in HTTPIngressPath.
	// Users can add <id> to any position of the path, and the network plugin will generate the path corresponding to the game server.
	// e.g. /game<id>(/|$)(.*) The ingress path of GameServer 0 is /game0(/|$)(.*), the ingress path of GameServer 1 is /game1(/|$)(.*), and so on.
	PathKey = "Path"
	// PortKey indicates the exposed port value of game server.
	PortKey = "Port"
	// IngressClassNameKey indicates the name of the IngressClass cluster resource, which is same as IngressClassName in IngressSpec.
	IngressClassNameKey = "IngressClassName"
	// HostKey indicates domain name, which is same as Host in IngressRule.
	HostKey = "Host"
	// TlsHostsKey indicates hosts that included in the TLS certificate, the meaning of which is the same as that of Hosts in IngressTLS.
	// Its corresponding value format is as follows, host1,host2,... e.g. xxx.xx.com
	TlsHostsKey = "TlsHosts"
	// TlsSecretNameKey indicates the name of the secret used to terminate TLS traffic on port 443, which is same as SecretName in IngressTLS.
	TlsSecretNameKey = "TlsSecretName"
	// AnnotationKey is the key of an annotation for ingress.
	// Its corresponding value format is as follows, key: value(note that there is a space after: ) e.g. nginx.ingress.kubernetes.io/rewrite-target: /$2
	// If the user wants to fill in multiple annotations, just fill in multiple AnnotationKeys in the network config.
	AnnotationKey = "Annotation"
	// FixedKey indicates whether the ingress object is still retained when the pod is deleted.
	// If True, ingress will not be deleted even though the pod is deleted.
	// If False, ingress will be deleted along with pod deletion.
	FixedKey = "Fixed"
)
View Source
const (
	SvcSelectorKey = "statefulset.kubernetes.io/pod-name"
	IngressHashKey = "game.kruise.io/ingress-hash"
	ServiceHashKey = "game.kruise.io/svc-hash"
)

Variables

This section is empty.

Functions

func NewKubernetesProvider

func NewKubernetesProvider() (cloudprovider.CloudProvider, error)

Types

type HostPortPlugin

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

func (*HostPortPlugin) Alias

func (hpp *HostPortPlugin) Alias() string

func (*HostPortPlugin) Init

func (*HostPortPlugin) Name

func (hpp *HostPortPlugin) Name() string

func (*HostPortPlugin) OnPodAdded

func (hpp *HostPortPlugin) OnPodAdded(c client.Client, pod *corev1.Pod, ctx context.Context) (*corev1.Pod, errors.PluginError)

func (*HostPortPlugin) OnPodDeleted

func (hpp *HostPortPlugin) OnPodDeleted(c client.Client, pod *corev1.Pod, ctx context.Context) errors.PluginError

func (*HostPortPlugin) OnPodUpdated

func (hpp *HostPortPlugin) OnPodUpdated(c client.Client, pod *corev1.Pod, ctx context.Context) (*corev1.Pod, errors.PluginError)

type IngressPlugin added in v0.3.0

type IngressPlugin struct {
}

func (IngressPlugin) Alias added in v0.3.0

func (i IngressPlugin) Alias() string

func (IngressPlugin) Init added in v0.3.0

func (IngressPlugin) Name added in v0.3.0

func (i IngressPlugin) Name() string

func (IngressPlugin) OnPodAdded added in v0.3.0

func (IngressPlugin) OnPodDeleted added in v0.3.0

func (i IngressPlugin) OnPodDeleted(c client.Client, pod *corev1.Pod, ctx context.Context) cperrors.PluginError

func (IngressPlugin) OnPodUpdated added in v0.3.0

func (i IngressPlugin) OnPodUpdated(c client.Client, pod *corev1.Pod, ctx context.Context) (*corev1.Pod, cperrors.PluginError)

type Provider

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

func (*Provider) ListPlugins

func (kp *Provider) ListPlugins() (map[string]cloudprovider.Plugin, error)

func (*Provider) Name

func (kp *Provider) Name() string

Jump to

Keyboard shortcuts

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