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 ¶
- func GetApp(namespace string, appName string) (*kdv1.KubeDirectorApp, error)
- func GetCluster(namespace string, clusterName string) (*kdv1.KubeDirectorCluster, error)
- func GetConfigMap(namespace string, cmName string) (*corev1.ConfigMap, error)
- func GetDefaultStorageClass() (*storagev1.StorageClass, error)
- func GetDeployment(deploymentName string) (*appsv1.Deployment, error)
- func GetKDConfig(kdConfigName string) (*kdv1.KubeDirectorConfig, error)
- func GetKubeDirectorReference() (*metav1.OwnerReference, error)
- func GetPVC(namespace string, pvcName string) (*corev1.PersistentVolumeClaim, error)
- func GetPod(namespace string, podName string) (*corev1.Pod, error)
- func GetSecret(namespace string, secretName string) (*corev1.Secret, error)
- func GetService(namespace string, serviceName string) (*corev1.Service, error)
- func GetServiceAccount(namespace string, saName string) (*corev1.ServiceAccount, error)
- func GetStatefulSet(namespace string, statefulSetName string) (*appsv1.StatefulSet, error)
- func GetStatusBackup(namespace string, statusBackupName string) (*kdv1.KubeDirectorStatusBackup, error)
- func GetStorageClass(storageClassName string) (*storagev1.StorageClass, error)
- func GetValidatorWebhook(validator string) (*arv1.MutatingWebhookConfiguration, error)
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
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 GetService ¶
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.