datastore: Add Get() for Priority Class
@@ -9,6 +9,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1"
corev1 "k8s.io/api/core/v1"
+ schedulingv1 "k8s.io/api/scheduling/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -264,6 +265,10 @@ func (s *DataStore) GetPersisentVolumeClaim(namespace, pvcName string) (*corev1.
return s.pvcLister.PersistentVolumeClaims(namespace).Get(pvcName)
}
+func (s *DataStore) GetPriorityClass(pcName string) (*schedulingv1.PriorityClass, error) {
+ return s.pcLister.Get(pcName)
+}
+
func (s *DataStore) GetPodContainerLogRequest(podName, containerName string) *rest.Request {
return s.kubeClient.CoreV1().Pods(s.namespace).GetLogs(podName, &corev1.PodLogOptions{
Container: containerName,
