Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PodBelongsToStatefulset ¶ added in v0.20.1
func PodBelongsToStatefulset(pod *types.NamespacedName, ssName *types.NamespacedName) (error, bool, int)
This function returns whether a pod belongs to a statefulset and if so, also returns the pod's number attached to its name It depends on the naming convention between a statefulset and its pods: The pods always take the form <ssName>-<n>, where <ssName> is the owning statefulset name and <n> is a non-negative numerical number. for example if a statefulset's name is "ex-aao-ss", it's pod name should be "ex-aao-ss-0", or "ex-aao-ss-1" and so on so forth. Note: the statefulset and pod must be in the same namespace.
Types ¶
Click to show internal directories.
Click to hide internal directories.