package
1.1.2
Repository: https://github.com/openshift/rook.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
AddRookVersionLabelToDaemonSet adds or updates a label reporting the Rook version which last modified a DaemonSet.
AddRookVersionLabelToDeployment adds or updates a label reporting the Rook version which last modified a deployment.
AddRookVersionLabelToJob adds or updates a label reporting the Rook version which last modified a Job.
No description provided by the author
ApplyMultus apply multus selector to Pods Multus supports short and json syntax, use only one kind at a time.
BaseKubernetesDeleteOptions returns the base set of Kubernetes delete options which most delete operations should use.
No description provided by the author
ClusterDaemonEnvVars Environment variables used by storage cluster daemon.
ConfigDirEnvVar config dir env var.
ConfigOverrideEnvVar config override env var.
ConfigOverrideMount is an override mount.
ConfigOverrideVolume is an override volume.
CreateDaemonSet creates.
No description provided by the author
CreateOrUpdatePrometheusRule creates a prometheusRule object or an error.
CreateOrUpdateService creates a service or updates the service declaratively if it already exists.
CreateOrUpdateServiceMonitor creates serviceMonitor object or an error.
create a apps.statefulset.
DeleteBatchJob deletes a Kubernetes job.
DeleteConfigMap deletes a ConfigMap.
DeleteDaemonset makes a best effort at deleting a daemonset and its pods, then waits for them to be deleted.
DeleteDeployment makes a best effort at deleting a deployment and its pods, then waits for them to be deleted.
DeleteReplicaSet makes a best effort at deleting a deployment and its pods, then waits for them to be deleted.
DeleteResource implements the DeleteOptions logic around deletion of a Kubernetes resource.
GenerateNodeAffinity will return v1.NodeAffinity or error.
GetContainerImage returns the container image matching the given name for a pod.
GetDaemonsets returns a list of daemonsets names labels matching a given selector example of a label selector might be "app=rook-ceph-mon, mon!=b" more: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/.
GetDeploymentImage returns the version of the image running in the pod spec for the desired container.
GetDeployments returns a list of deployment names labels matching a given selector example of a label selector might be "app=rook-ceph-mon, mon!=b" more: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/.
GetDeploymentSpecImage returns the image name from the spec.
GetK8SVersion gets the version of the running K8S cluster.
GetKubernetesNodesMatchingRookNodes lists all the nodes in Kubernetes and returns all the Kubernetes nodes that have a corresponding match in the list of Rook nodes.
GetMatchingContainer takes a list of containers and a name, and returns the first container in the list matching the name.
GetMultusIfName return a network interface name that multus will assign when connected to the multus network.
GetNodeHostName returns the hostname label given the node name.
GetNodeHostNames returns the name of the node resource mapped to their hostname label.
GetNodeNameFromHostname returns the name of the node resource looked up by the hostname label Typically these will be the same name, but sometimes they are not such as when nodes have a longer dns name, but the hostname is short.
GetNodeSchedulable returns a boolean if the node is tainted as Schedulable or not true -> Node is schedulable false -> Node is unschedulable.
GetJobLog gets the logs for the pod.
GetPodPhaseMap takes a list of pods and returns a map of pod phases to the names of pods that are in that phase.
GetPrometheusRule returns provided prometheus rules or an error.
GetRunningPod reads the name and namespace of a pod from the environment, and returns the pod (if it exists).
GetServiceMonitor returns servicemonitor or an error.
GetSpecContainerImage returns the container image for a podspec, given a container name.
GetValidNodes returns all nodes that (1) are not cordoned, (2) meet Rook's placement terms, and (3) are ready.
Hash MD5 hash a given string.
IndexToName converts an index to a daemon name based on as few letters of the alphabet as possible.
MakeRookImage formats the container name.
No description provided by the author
NameEnvVar pod name env var.
NamespaceEnvVar namespace env var.
NameToIndex converts a daemon name to an index, which is the inverse of IndexToName For example: a -> 0 b -> 1.
No description provided by the author
NodeConfigURI returns the node config URI path for this node.
NodeEnvVar node env var.
NodeIsInRookNodeList will return true if the target node is found in a given list of Rook nodes.
NodeIsReady returns true if the node is ready.
NodeIsTolerable returns true if the node's taints are all tolerated by the given tolerations.
NodeMeetsAffinityTerms returns true if the node meets the terms of the node affinity.
NodeMeetsPlacementTerms returns true if the Rook placement allows the node to have resources scheduled on it.
ParseServiceType parses a string and returns a*v1.ServiceType.
PathToVolumeName converts a path to a valid volume name.
PodIPEnvVar returns an env var such that the pod's ip will be mapped to the given property (env var) name within the container.
PodsRunningWithLabel returns the number of running pods with the given label.
RookNodesMatchingKubernetesNodes returns only the given Rook nodes which have a corresponding match in the list of Kubernetes nodes.
RunReplaceableJob runs a Kubernetes job with the intention that the job can be replaced by another call to this function with the same job name.
No description provided by the author
No description provided by the author
TaintIsWellKnown returns true if the taint's key is in the WellKnownTaints list.
TruncateNodeName hashes the nodeName in case it would case the name to be longer than 63 characters WARNING If your format and nodeName as a hash, are longer than 63 chars it won't be truncated! Your format alone should only be 31 chars at max because of MD5 hash being 32 chars.
UpdateDeploymentAndWait updates a deployment and waits until it is running to return.
UpdateService updates a service declaratively.
ValidNode returns true if the node (1) is schedulable, (2) meets Rook's placement terms, and (3) is ready.
ValidNodeNoSched returns true if the node (1) meets Rook's placement terms, and (2) is ready.
WaitForDeploymentImage waits for all deployments with the given labels are running.
WaitForJobCompletion waits for a job to reach the completed state.
This function takes raw YAML string and converts it to Kubernetes Tolerations array.

# Constants

AppAttr app label.
No description provided by the author
ClusterAttr cluster label.
ConfigOverrideName config override name.
ConfigOverrideVal config override value.
DataDir folder.
DataDirVolume data dir volume.
DefaultNamespace for the cluster.
DefaultRepoPrefix repo prefix.
Namespace for rook.
NodeNameEnvVar is the env variable for getting the node via downward api.
PodNameEnvVar is the env variable for getting the pod name via downward api.
PodNamespaceEnvVar is the env variable for getting the pod namespace via downward api.
PrivateIPEnvVar pod IP env var.
PublicIPEnvVar public IP env var.
RookType for the CRD.
RookVersionLabelKey is the key used for reporting the Rook version which last created or modified a resource.

# Variables

WellKnownTaints is a list of well-known taint keys in the Kubernetes code base.

# Structs

No description provided by the author
DeleteOptions are a common set of options controlling the behavior of k8sutil delete operations.
WaitOptions are a common set of options controlling the behavior of k8sutil operations.