package
0.12.0
Repository: https://github.com/gardener/diki.git
Documentation: pkg.go.dev

# Functions

FindFileMountSource returns a mounted file's source location on the host.
FindFlagValueRaw returns the value of a specific flag in a commands slice.
FindInnerValue returns the value of a specific flag when the format is flag1=value1,flag3=value3,flag3=value3.
GetAllObjectsMetadata returns the object metadata for resources returned by 'kubectl get all' in a given namespace or all namespaces if it's set to "".
GetCommandOptionFromDeployment returns command and args from a specific deployment container.
GetContainerCommand iterates over the passed container names and tries to find a match in the pod containers list.
GetContainerFromDeployment returns a container object with a specific cainerName, if such container is not present it retuns found=false.
GetContainerFromPod returns a container object with a specific cainerName, if such container is not present it retuns found=false.
GetContainerFromStatefulSet returns a container object with a specific cainerName, if such container is not present it retuns found=false.
GetDeploymentPods returns all pods of a given deployment.
GetFileDataFromVolume returns byte slice of the value of a specific Data field in a ConfigMap or Secret volume.
GetKubeletCommand returns the used kubelet command.
GetKubeletConfig returns the kubelet config specified in the kubelet command's option `--config`.
GetKubeProxyConfig returns the kube-proxy config specified by it's path.
GetNamespaces returns a map containing all namespaces, where the names of the namespaces are used as a keys.
GetNodeConfigz returns the runtime kubelet config.
GetNodes return all nodes.
GetNodesAllocatablePodsNum return the number of free allocatable spots of pods for all nodes.
GetObjectsMetadata returns the object metadata for all resources of a given group version kind for a namespace, or all namespaces if it's set to "".
GetPods returns all pods for a given namespace, or all namespaces if it's set to empty string "".
GetReplicaSets returns all replicaSets for a given namespace, or all namespaces if it's set to empty string "".
GetVolumeConfigByteSliceByMountPath returns the byte slice data of a specific volume in a deployment by the volumes mountPath and containerName.
GetVolumeFromDeployment returns a volume object with a specific volumeName, if such volume is not present it retuns found=false.
GetVolumeFromStatefulSet returns a volume object with a specific volumeName, if such volume is not present it retuns found=false.
IsFlagSet returns true if a specific flag is set in the command.
NodeReadyStatus returns true if the given node has NodeReady status condition true and false in every other case.
RESTConfigFromFile builds a [*rest.Config] from a file.
SelectNodes returns a subset of nodes.
SelectPodOfReferenceGroup returns a single pod per owner reference group as well as groups the returned pods by the nodes they are scheduled on.