Documentation ¶
Index ¶
Constants ¶
View Source
const ( Truncated = "truncated" TruncationFailure = "truncation_failed" OtherError = "other_error" )
Variables ¶
View Source
var ( ErrLabelTruncated = errors.New("label is truncated") ErrLabelTruncationFailed = errors.New("failed to truncate label") )
Functions ¶
func GetPodLabelMapSize ¶
func GetPodLabelMapSize(podLabelMap PodLabelMap) int
PodLabelMapSize calculates the size of a podLabelMap.
Types ¶
type EndpointPodLabelMap ¶
type EndpointPodLabelMap map[negtypes.NetworkEndpoint]PodLabelMap
EndpointPodLabelMap is a map of network endpoint, endpoint annotations.
type PodLabelMap ¶
PodLabelMap is a map of pod label key, label values.
func GetPodLabelMap ¶
func GetPodLabelMap(pod *v1.Pod, lpConfig PodLabelPropagationConfig) (PodLabelMap, error)
GetPodLabelMap will return the label map extracted from a pod according to PodLabelPropagationConfig. The returned map has the pod label key as key and label value as value. This function will raise an error if pod label truncation happens or truncation fails.
type PodLabelPropagationConfig ¶
type PodLabelPropagationConfig struct {
Labels []Label
}
PodLabelPropagationConfig contains a list of configurations for labels to be propagated to GCE network endpoints.
Click to show internal directories.
Click to hide internal directories.