Documentation ¶
Index ¶
- Variables
- func GetDockerContainerIPNetwork(containerID, networkName string) (*net.IPNet, *net.IPNet, error)
- func GetKindContainerID(clusterName string) string
- func GetKindContainerIP(clusterName string) (string, error)
- func InspectDockerContainer(containerID string) (*types.ContainerJSON, error)
- func NewNegotiatedClientWithOpts(ctx context.Context, opts ...client.Opt) (*client.Client, 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 ¶
var ( // KindContainerSuffix provides the string suffix that Kind names all cluster containers with. KindContainerSuffix = "-control-plane" // DefaultKindNetwork is the name of the default Docker network used for Kind clusters DefaultKindNetwork = "kind" )
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 GetKindContainerIP ¶ added in v0.20.0
GetContainerIP retrieves the IPv4 address of a Kind container given the cluster 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 NewNegotiatedClientWithOpts ¶ added in v0.44.0
NewNegotiatedClientWithOpts is a wrapper around docker.NewClientWithOpts that negotiates the API version with the server.
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.