observer

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 11 Imported by: 5

Documentation

Overview

Package observer implements queries for k8s objects that compose a cluster.

Each exported function will return the found object (if query succeeds).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetApp

func GetApp(
	namespace string,
	appName string,
) (*kdv1.KubeDirectorApp, error)

GetApp fetches the k8s KubeDirectorApp resource with the given name in the given namespace.

func GetCluster

func GetCluster(
	namespace string,
	clusterName string,
) (*kdv1.KubeDirectorCluster, error)

GetCluster finds the k8s KubeDirectorCluster with the given name in the given namespace.

func GetConfigMap added in v0.5.0

func GetConfigMap(
	namespace string,
	cmName string,
) (*corev1.ConfigMap, error)

GetConfigMap finds the k8s ConfigMap with the given name in the given namespace.

func GetDefaultStorageClass added in v0.2.0

func GetDefaultStorageClass() (*storagev1.StorageClass, error)

GetDefaultStorageClass returns the default storage class, if any, as defined by k8s.

func GetDeployment

func GetDeployment(
	deploymentName string,
) (*appsv1.Deployment, error)

GetDeployment fetches the deployment resource in KubeDirector's namespace.

func GetKDConfig added in v0.2.0

func GetKDConfig(
	kdConfigName string,
) (*kdv1.KubeDirectorConfig, error)

GetKDConfig fetches kubedirector config CR in KubeDirector's namespace.

func GetKubeDirectorReference added in v0.3.0

func GetKubeDirectorReference() (*metav1.OwnerReference, error)

GetKubeDirectorReference is a utility function to fetch a reference to the kubedirector deployment object

func GetPVC

func GetPVC(
	namespace string,
	pvcName string,
) (*corev1.PersistentVolumeClaim, error)

GetPVC finds the k8s PersistentVolumeClaim with the given name in the given namespace.

func GetPod

func GetPod(
	namespace string,
	podName string,
) (*corev1.Pod, error)

GetPod finds the k8s Pod with the given name in the given namespace.

func GetSecret

func GetSecret(
	namespace string,
	secretName string,
) (*corev1.Secret, error)

GetSecret finds the k8s Secret with the given name in the given namespace.

func GetService

func GetService(
	namespace string,
	serviceName string,
) (*corev1.Service, error)

GetService finds the k8s Service with the given name in the given namespace.

func GetServiceAccount added in v0.7.0

func GetServiceAccount(
	namespace string,
	saName string,
) (*corev1.ServiceAccount, error)

GetServiceAccount finds the k8s ServiceAccount with the given name in the given namespace.

func GetStatefulSet

func GetStatefulSet(
	namespace string,
	statefulSetName string,
) (*appsv1.StatefulSet, error)

GetStatefulSet finds the k8s StatefulSet with the given name in the given namespace.

func GetStatusBackup added in v0.7.0

func GetStatusBackup(
	namespace string,
	statusBackupName string,
) (*kdv1.KubeDirectorStatusBackup, error)

GetStatusBackup finds the k8s KubeDirectorStatusBackup with the given name in the given namespace.

func GetStorageClass added in v0.2.0

func GetStorageClass(
	storageClassName string,
) (*storagev1.StorageClass, error)

GetStorageClass fetches the storage class resource with a given name.

func GetValidatorWebhook

func GetValidatorWebhook(
	validator string,
) (*arv1.MutatingWebhookConfiguration, error)

GetValidatorWebhook fetches the webhook validator resource in KubeDirector's namespace.

Types

This section is empty.

Jump to

Keyboard shortcuts

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