Documentation ¶
Index ¶
- Constants
- func ArePodsAllReady(pods []corev1.Pod) bool
- func ArePodsAllScheduled(pods []corev1.Pod) bool
- func BuildPodMap(pods []corev1.Pod, keyFunc func(pod *corev1.Pod) string) map[string]*corev1.Pod
- func CheckControllerReference(obj, owner metav1.Object) error
- func ContainsOnlyFinalizer(obj client.Object, finalizer string) bool
- func DeepCopyStrMap(m map[string]string) map[string]string
- func FilterPodsBy(pods []corev1.Pod, filter func(pod *corev1.Pod) bool) []corev1.Pod
- func GetClusterAddrFromService(svc *corev1.Service, port string) (string, error)
- func GetContainerFromPod(pod *corev1.Pod, name string) *corev1.Container
- func GetContainerFromPodSpec(podSpec *corev1.PodSpec, name string) *corev1.Container
- func GetPortFromContainer(container *corev1.Container, name string) *corev1.ContainerPort
- func GetPortFromPorts(ports []corev1.ContainerPort, name string) *corev1.ContainerPort
- func GetPortFromService(svc *corev1.Service, port string) *corev1.ServicePort
- func GetServiceDNSRecord(svcName, namespace string, withinNamespace bool) string
- func GetServiceDNSRecordWithSvc(svc *corev1.Service, withinNamespace bool) string
- func HostPathTypePtr(t corev1.HostPathType) *corev1.HostPathType
- func IsContainerQoSGuaranteed(c *corev1.Container) bool
- func IsDeploymentRolledOut(deploy *appsv1.Deployment) bool
- func IsExitError(err error) bool
- func IsPodDeleted(po *corev1.Pod) bool
- func IsPodDeletedOrFailed(po *corev1.Pod) bool
- func IsPodFailed(po *corev1.Pod) bool
- func IsPodReady(pod *corev1.Pod) bool
- func IsPodRunning(pod *corev1.Pod) bool
- func IsPodScheduled(po *corev1.Pod) bool
- func IsResourceQoSGuaranteed(resourceRequirements corev1.ResourceRequirements) bool
- func MountPropagationModePtr(m corev1.MountPropagationMode) *corev1.MountPropagationMode
- func MustGetContainerFromPod(pod *corev1.Pod, name string) *corev1.Container
- func MustGetPortFromContainer(container *corev1.Container, name string) *corev1.ContainerPort
- func MustGetPortFromService(svc *corev1.Service, port string) *corev1.ServicePort
- func NewNamespacedNameFrom(key types.NamespacedName, f func(name string) string) types.NamespacedName
- func NewSecurityContext(privileged bool) *corev1.SecurityContext
- func PatchAffinity(affinity *corev1.Affinity, patches ...*corev1.Affinity) *corev1.Affinity
- func PatchAnnotations(annotations map[string]string, patches ...map[string]string) map[string]string
- func PatchEnvs(origin []corev1.EnvVar, patches ...[]corev1.EnvVar) []corev1.EnvVar
- func PatchLabels(labels map[string]string, patches ...map[string]string) map[string]string
- func PatchVolumeMounts(origin []corev1.VolumeMount, patches ...[]corev1.VolumeMount) []corev1.VolumeMount
- func PatchVolumes(origin []corev1.Volume, patches ...[]corev1.Volume) []corev1.Volume
- func TimePtr(time metav1.Time) *metav1.Time
- func ToObjectInterfaces(slice interface{}) []client.Object
- func ToObjectNameSet(slice interface{}) map[string]struct{}
- func ToObjectNames(slice interface{}) []string
Constants ¶
View Source
const LabelNodeRole = "kubernetes.io/role"
View Source
const NodeRoleKey = "kubernetes.io/role"
View Source
const (
NodeRoleMaster = "master"
)
Variables ¶
This section is empty.
Functions ¶
func ArePodsAllReady ¶
func ArePodsAllScheduled ¶
func BuildPodMap ¶
func FilterPodsBy ¶
func GetContainerFromPodSpec ¶
func GetPortFromContainer ¶
func GetPortFromContainer(container *corev1.Container, name string) *corev1.ContainerPort
func GetPortFromPorts ¶
func GetPortFromPorts(ports []corev1.ContainerPort, name string) *corev1.ContainerPort
func GetPortFromService ¶
func GetPortFromService(svc *corev1.Service, port string) *corev1.ServicePort
func GetServiceDNSRecord ¶
func HostPathTypePtr ¶
func HostPathTypePtr(t corev1.HostPathType) *corev1.HostPathType
func IsDeploymentRolledOut ¶
func IsDeploymentRolledOut(deploy *appsv1.Deployment) bool
func IsExitError ¶
func IsPodDeleted ¶
func IsPodDeletedOrFailed ¶
func IsPodFailed ¶
func IsPodReady ¶
func IsPodRunning ¶
func IsPodScheduled ¶
func IsResourceQoSGuaranteed ¶
func IsResourceQoSGuaranteed(resourceRequirements corev1.ResourceRequirements) bool
func MountPropagationModePtr ¶
func MountPropagationModePtr(m corev1.MountPropagationMode) *corev1.MountPropagationMode
func MustGetContainerFromPod ¶
func MustGetPortFromContainer ¶
func MustGetPortFromContainer(container *corev1.Container, name string) *corev1.ContainerPort
func MustGetPortFromService ¶
func MustGetPortFromService(svc *corev1.Service, port string) *corev1.ServicePort
func NewNamespacedNameFrom ¶
func NewNamespacedNameFrom(key types.NamespacedName, f func(name string) string) types.NamespacedName
func NewSecurityContext ¶
func NewSecurityContext(privileged bool) *corev1.SecurityContext
func PatchAffinity ¶
PatchAffinity is only valid for pod (anti) affinity. Node affinity uses OR among different terms.
func PatchAnnotations ¶
func PatchLabels ¶
func PatchVolumeMounts ¶
func PatchVolumeMounts(origin []corev1.VolumeMount, patches ...[]corev1.VolumeMount) []corev1.VolumeMount
func PatchVolumes ¶
func ToObjectInterfaces ¶
func ToObjectNameSet ¶
func ToObjectNameSet(slice interface{}) map[string]struct{}
func ToObjectNames ¶
func ToObjectNames(slice interface{}) []string
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.