Documentation ¶
Index ¶
- Variables
- func GetDockerContainerIPNetwork(containerID, networkName string) (*net.IPNet, error)
- func GetKindContainerID(clusterName string) string
- func InspectDockerContainer(containerID string) (*types.ContainerJSON, error)
- func ReadFileFromContainer(ctx context.Context, containerID string, path string) (*bytes.Buffer, error)
- func RunPrivilegedCommand(ctx context.Context, containerID, command string, args ...string) error
- func WriteFileToContainer(ctx context.Context, containerID string, path string, mode int64, data []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// KindContainerSuffix provides the string suffix that Kind names all cluster containers with.
KindContainerSuffix = "-control-plane"
)
Functions ¶
func GetDockerContainerIPNetwork ¶
GetDockerContainerIPNetwork supports retreiving the *net.IP4Net of a container specified by name (and a specified network name for the case of multiple networks).
func GetKindContainerID ¶
GetKindContainerID produces the docker container ID for the given kind cluster by name.
func InspectDockerContainer ¶
func InspectDockerContainer(containerID string) (*types.ContainerJSON, error)
InspectDockerContainer is a helper function that uses the local docker environment provides the full container spec for a container present in that environment by name.
func ReadFileFromContainer ¶ added in v0.11.0
func ReadFileFromContainer(ctx context.Context, containerID string, path string) (*bytes.Buffer, error)
ReadFileFromContainer reads a specific file from a given container by ID.
func RunPrivilegedCommand ¶ added in v0.11.0
RunPrivilegedCommand is a very basic and opinionated helper function which runs the given command and arguments on the given container (by ID) privileged.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.