Documentation ¶
Overview ¶
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed 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 * * https://opensource.org/licenses/Apache-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 OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const ( K8S_POD_NAMESPACE = "K8S_POD_NAMESPACE" K8S_POD_NAME = "K8S_POD_NAME" K8S_POD_INFRA_CONTAINER_ID = "K8S_POD_INFRA_CONTAINER_ID" PortMappingPortsAnnotation = "tkestack.io/portmapping" )
k8s cni args
Args: [][2]string{ {"IgnoreUnknown", "1"}, {"K8S_POD_NAMESPACE", podNs}, {"K8S_POD_NAME", podName}, {"K8S_POD_INFRA_CONTAINER_ID", podInfraContainerID.ID}, }
Variables ¶
This section is empty.
Functions ¶
func GetHostname ¶
func GetHostname() string
GetHostname returns OS's hostname if 'hostnameOverride' is empty and environment 'MY_NODE_NAME'; otherwise, return 'hostnameOverride'.
func GetPodFullName ¶
GetPodFullName returns a name that uniquely identifies a pod.
func RemovePortFile ¶
Types ¶
type NetworkSelectionElement ¶
type NetworkSelectionElement struct { // Name contains the name of the Network object this element selects Name string `json:"name"` // Namespace contains the optional namespace that the network referenced // by Name exists in Namespace string `json:"namespace,omitempty"` // IPRequest contains an optional requested IP address for this network // attachment IPRequest string `json:"ips,omitempty"` // MacRequest contains an optional requested MAC address for this // network attachment MacRequest string `json:"mac,omitempty"` // InterfaceRequest contains an optional requested name for the // network interface this attachment will create in the container InterfaceRequest string `json:"interface,omitempty"` }
NetworkSelectionElement represents one element of the JSON format Network Attachment Selection Annotation as described in section 4.1.2 of the CRD specification.
func ParsePodNetworkAnnotation ¶
func ParsePodNetworkAnnotation(podNetworks string) ([]*NetworkSelectionElement, error)
type Port ¶
type Port struct { // This must be a valid port number, 0 <= x < 65536. // If HostNetwork is specified, this must match ContainerPort. HostPort int32 `json:"hostPort"` // Required: This must be a valid port number, 0 < x < 65536. ContainerPort int32 `json:"containerPort"` // Required: Supports "TCP" and "UDP". Protocol string `json:"protocol"` HostIP string `json:"hostIP,omitempty"` PodName string `json:"podName"` PodIP string `json:"podIP"` }
func ConsumePort ¶
type PortMapConf ¶
type PortMapConf struct { RuntimeConfig struct { PortMaps []Port `json:"portMappings,omitempty"` } `json:"runtimeConfig,omitempty"` }
Directories ¶
Path | Synopsis |
---|---|
* Tencent is pleased to support the open source community by making TKEStack available.
|
* Tencent is pleased to support the open source community by making TKEStack available. |
* Tencent is pleased to support the open source community by making TKEStack available.
|
* Tencent is pleased to support the open source community by making TKEStack available. |
* Tencent is pleased to support the open source community by making TKEStack available.
|
* Tencent is pleased to support the open source community by making TKEStack available. |