Documentation ¶
Index ¶
- Constants
- func NewKubernetesProvider() (cloudprovider.CloudProvider, error)
- type HostPortPlugin
- func (hpp *HostPortPlugin) Alias() string
- func (hpp *HostPortPlugin) Init(c client.Client, options cloudprovider.CloudProviderOptions, ...) error
- func (hpp *HostPortPlugin) Name() string
- func (hpp *HostPortPlugin) OnPodAdded(c client.Client, pod *corev1.Pod, ctx context.Context) (*corev1.Pod, errors.PluginError)
- func (hpp *HostPortPlugin) OnPodDeleted(c client.Client, pod *corev1.Pod, ctx context.Context) errors.PluginError
- func (hpp *HostPortPlugin) OnPodUpdated(c client.Client, pod *corev1.Pod, ctx context.Context) (*corev1.Pod, errors.PluginError)
- type IngressPlugin
- func (i IngressPlugin) Alias() string
- func (i IngressPlugin) Init(client client.Client, options cloudprovider.CloudProviderOptions, ...) error
- func (i IngressPlugin) Name() string
- func (i IngressPlugin) OnPodAdded(c client.Client, pod *corev1.Pod, ctx context.Context) (*corev1.Pod, cperrors.PluginError)
- func (i IngressPlugin) OnPodDeleted(c client.Client, pod *corev1.Pod, ctx context.Context) cperrors.PluginError
- func (i IngressPlugin) OnPodUpdated(c client.Client, pod *corev1.Pod, ctx context.Context) (*corev1.Pod, cperrors.PluginError)
- type Provider
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 (hpp *HostPortPlugin) Init(c client.Client, options cloudprovider.CloudProviderOptions, ctx context.Context) error
func (*HostPortPlugin) Name ¶
func (hpp *HostPortPlugin) Name() string
func (*HostPortPlugin) OnPodAdded ¶
func (*HostPortPlugin) OnPodDeleted ¶
func (hpp *HostPortPlugin) OnPodDeleted(c client.Client, pod *corev1.Pod, ctx context.Context) errors.PluginError
func (*HostPortPlugin) OnPodUpdated ¶
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 (i IngressPlugin) Init(client client.Client, options cloudprovider.CloudProviderOptions, ctx context.Context) error
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
Click to show internal directories.
Click to hide internal directories.