utils

package
v0.0.0-...-e5f2c3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusReady      = "Ready"
	StatusInProgress = "InProgress"
	StatusUnknown    = "Unknown"
	StatusDisabled   = "Disabled"
)

Constants defining labels

Variables

Functions

func CreateConfigMapsFromLocal

func CreateConfigMapsFromLocal(localClusterInfos, namespace, clusterInfo string, client clientset.Interface) (*corev1.ConfigMap, error)

func DeploymentsEventStatusFromRuntime

func DeploymentsEventStatusFromRuntime(o runtime.Object) (string, error)

func FilterDeploymentPodsByOwnerReference

func FilterDeploymentPodsByOwnerReference(deployment appsv1.Deployment, allRS []metav1.PartialObjectMetadata,
	allPods []corev1.Pod) []corev1.Pod

FilterDeploymentPodsByOwnerReference returns a subset of pods controlled by given deployment.

func FilterPodsByControllerRef

func FilterPodsByControllerRef(owner metav1.Object, remainingPods *[]corev1.Pod) []corev1.Pod

FilterPodsByControllerRef returns a subset of pods controlled by given controller resource, excluding deployments.

func ListDeploymentPods

func ListDeploymentPods(oldCtx context.Context, client clientset.Interface, deployment appsv1.Deployment) ([]corev1.Pod, error)

ListDeploymentPods returns a set of pods controlled by given deployment.

func RuntimeObjectToUnstructured

func RuntimeObjectToUnstructured(o runtime.Object) (*unstructured.Unstructured, error)

func RuntimeToConfigMap

func RuntimeToConfigMap(o runtime.Object) (*corev1.ConfigMap, error)

func Status

func Status(u *unstructured.Unstructured) (string, error)

func StatusFromRuntime

func StatusFromRuntime(o runtime.Object) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL