Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct { // The name of the CNI network attached to. Name string `json:"name"` // The name of the network interface in the pod. Interface string `json:"interface"` // IPs and MAC assigned by CNI to the interface. IPs []string `json:"ips"` MAC string `json:"mac"` Default bool `json:"default"` DNS cnitypes.DNS `json:"dns"` }
func GetAttachments ¶
func GetAttachments() ([]Attachment, error)
Gets the networks this pod is attached to. Expects that the `metadata.annotations['k8s.v1.cni.cncf.io/networks-status']` fieldPath is exposed to this container via the downward API [1] at `/etc/podinfo/attachments`.
[1] https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/
type CNIClient ¶
type CNIClient struct {
// contains filtered or unexported fields
}
Wrapper around the CNI CRD k8s API.
type NetworkDefinition ¶
type NetworkDefinition struct {
Ranges []Range
}
Click to show internal directories.
Click to hide internal directories.