diff --git a/go.mod b/go.mod index 7ec12bd08d..414728d27d 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( k8s.io/kubernetes v1.19.15 sigs.k8s.io/yaml v1.2.0 stathat.com/c/consistent v1.0.0 - volcano.sh/apis v0.0.0-20211109104455-7e8d893a9f66 + volcano.sh/apis v1.5.0-beta.0 ) replace ( diff --git a/go.sum b/go.sum index 6cdf589eba..75091b1e46 100644 --- a/go.sum +++ b/go.sum @@ -1143,5 +1143,5 @@ sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= stathat.com/c/consistent v1.0.0 h1:ezyc51EGcRPJUxfHGSgJjWzJdj3NiMU9pNfLNGiXV0c= stathat.com/c/consistent v1.0.0/go.mod h1:QkzMWzcbB+yQBL2AttO6sgsQS/JSTapcDISJalmCDS0= vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= -volcano.sh/apis v0.0.0-20211109104455-7e8d893a9f66 h1:vmCou3lcAeNSmyMXBVlfQnJYsQvhfS3mMv2FJrtACyg= -volcano.sh/apis v0.0.0-20211109104455-7e8d893a9f66/go.mod h1:UaeJ/s5Hyd+ZhFLc+Kw9YlgM8gRZ/5OzXqHa0yKOoXY= +volcano.sh/apis v1.5.0-beta.0 h1:INpucg/p8Q/6aw8nKB4YrRMIqhFQIWPujE5qbYp/QYQ= +volcano.sh/apis v1.5.0-beta.0/go.mod h1:UaeJ/s5Hyd+ZhFLc+Kw9YlgM8gRZ/5OzXqHa0yKOoXY= diff --git a/vendor/modules.txt b/vendor/modules.txt index 0d767d4952..4acd136eb7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -855,7 +855,7 @@ sigs.k8s.io/yaml # stathat.com/c/consistent v1.0.0 ## explicit stathat.com/c/consistent -# volcano.sh/apis v0.0.0-20211109104455-7e8d893a9f66 +# volcano.sh/apis v1.5.0-beta.0 ## explicit volcano.sh/apis/pkg/apis/batch/v1alpha1 volcano.sh/apis/pkg/apis/bus/v1alpha1 diff --git a/vendor/volcano.sh/apis/pkg/apis/helpers/helpers.go b/vendor/volcano.sh/apis/pkg/apis/helpers/helpers.go index 32e37c50fd..5346ad1227 100644 --- a/vendor/volcano.sh/apis/pkg/apis/helpers/helpers.go +++ b/vendor/volcano.sh/apis/pkg/apis/helpers/helpers.go @@ -143,22 +143,10 @@ func CreateOrUpdateSecret(job *vcbatch.Job, kubeClients kubernetes.Interface, da // DeleteConfigmap deletes the config map resource. func DeleteConfigmap(job *vcbatch.Job, kubeClients kubernetes.Interface, cmName string) error { - if _, err := kubeClients.CoreV1().ConfigMaps(job.Namespace).Get(context.TODO(), cmName, metav1.GetOptions{}); err != nil { - if !apierrors.IsNotFound(err) { - klog.V(3).Infof("Failed to get Configmap for Job <%s/%s>: %v", - job.Namespace, job.Name, err) - return err - } - return nil - - } - - if err := kubeClients.CoreV1().ConfigMaps(job.Namespace).Delete(context.TODO(), cmName, metav1.DeleteOptions{}); err != nil { - if !apierrors.IsNotFound(err) { - klog.Errorf("Failed to delete Configmap of Job %v/%v: %v", - job.Namespace, job.Name, err) - return err - } + if err := kubeClients.CoreV1().ConfigMaps(job.Namespace).Delete(context.TODO(), cmName, metav1.DeleteOptions{}); err != nil && !apierrors.IsNotFound(err) { + klog.Errorf("Failed to delete Configmap of Job %v/%v: %v", + job.Namespace, job.Name, err) + return err } return nil diff --git a/vendor/volcano.sh/apis/pkg/apis/scheduling/v1beta1/labels.go b/vendor/volcano.sh/apis/pkg/apis/scheduling/v1beta1/labels.go index 5943f3502d..c8d7e6b320 100644 --- a/vendor/volcano.sh/apis/pkg/apis/scheduling/v1beta1/labels.go +++ b/vendor/volcano.sh/apis/pkg/apis/scheduling/v1beta1/labels.go @@ -46,3 +46,6 @@ const JDBMaxUnavailable = "volcano.sh/jdb-max-unavailable" // NumaPolicyKey is the key of pod nuam-topology policy const NumaPolicyKey = "volcano.sh/numa-topology-policy" + +// TopologyDecisionAnnotation is the key of topology decision about pod request resource +const TopologyDecisionAnnotation = "volcano.sh/topology-decision" \ No newline at end of file