diff --git a/doc/usage/tutorial.md b/doc/usage/tutorial.md index c7734087..02fc6fe0 100644 --- a/doc/usage/tutorial.md +++ b/doc/usage/tutorial.md @@ -312,7 +312,7 @@ Delete the first `AppWrapper` job. ```bash $ kubectl delete -f aw-01.yaml -appwrapper.workload.codeflare.dev "0001-aw-generic-deployment-1" deleted +workload.codeflare.dev/appwrapper "0001-aw-generic-deployment-1" deleted ``` Check the pods status of the `AppWrapper` jobs. The new pods from the second `AppWrapper` job: `0002-aw-generic-deployment-2` job should now be deployed and running. diff --git a/go.mod b/go.mod index 2dd1bcea..4226f45d 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,9 @@ require ( k8s.io/client-go v0.26.2 k8s.io/klog/v2 v2.90.1 k8s.io/metrics v0.26.2 + k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 sigs.k8s.io/custom-metrics-apiserver v0.0.0 + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 ) replace sigs.k8s.io/custom-metrics-apiserver => sigs.k8s.io/custom-metrics-apiserver v1.25.1-0.20230306170449-63d8c93851f3 @@ -107,9 +109,7 @@ require ( k8s.io/component-base v0.26.2 // indirect k8s.io/kms v0.26.2 // indirect k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d // indirect - k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.35 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/pkg/apis/controller/v1beta1/appwrapper.go b/pkg/apis/controller/v1beta1/appwrapper.go index 038737ce..d638b91b 100644 --- a/pkg/apis/controller/v1beta1/appwrapper.go +++ b/pkg/apis/controller/v1beta1/appwrapper.go @@ -26,7 +26,7 @@ const AppWrapperPlural string = "appwrappers" // AppWrapperAnnotationKey is the annotation key of Pod to identify // which AppWrapper it belongs to. -const AppWrapperAnnotationKey = "appwrapper.mcad.ibm.com/appwrapper-name" +const AppWrapperAnnotationKey = "workload.codeflare.dev/appwrapper-name" // +genclient // +kubebuilder:object:root=true diff --git a/pkg/controller/queuejob/queuejob_controller_ex.go b/pkg/controller/queuejob/queuejob_controller_ex.go index 0b7ca80a..ec70f530 100644 --- a/pkg/controller/queuejob/queuejob_controller_ex.go +++ b/pkg/controller/queuejob/queuejob_controller_ex.go @@ -143,7 +143,7 @@ func GetQueueJobKey(obj interface{}) (string, error) { // UpdateQueueJobStatus was part of pod informer, this is now a method of queuejob_controller file. // This change is done in an effort to simplify the controller and enable to move to controller runtime. func (qjm *XController) UpdateQueueJobStatus(queuejob *arbv1.AppWrapper) error { - labelSelector := fmt.Sprintf("%s=%s", "appwrapper.mcad.ibm.com", queuejob.Name) + labelSelector := fmt.Sprintf("%s=%s", "workload.codeflare.dev/appwrapper", queuejob.Name) pods, errt := qjm.clients.CoreV1().Pods("").List(context.TODO(), metav1.ListOptions{LabelSelector: labelSelector}) if errt != nil { return errt @@ -208,7 +208,7 @@ func (qjm *XController) allocatableCapacity() *clusterstateapi.Resource { klog.Errorf("[allocatableCapacity] Error listing pods %v", err) } for _, pod := range podList.Items { - if _, ok := pod.GetLabels()["appwrappers.mcad.ibm.com"]; !ok && pod.Status.Phase != v1.PodFailed && pod.Status.Phase != v1.PodSucceeded { + if _, ok := pod.GetLabels()["workload.codeflare.dev/appwrappers"]; !ok && pod.Status.Phase != v1.PodFailed && pod.Status.Phase != v1.PodSucceeded { for _, container := range pod.Spec.Containers { usedResource := clusterstateapi.NewResource(container.Resources.Requests) capacity.Sub(usedResource) diff --git a/pkg/controller/queuejobresources/genericresource/genericresource.go b/pkg/controller/queuejobresources/genericresource/genericresource.go index a1057f76..f9bcc7eb 100644 --- a/pkg/controller/queuejobresources/genericresource/genericresource.go +++ b/pkg/controller/queuejobresources/genericresource/genericresource.go @@ -21,6 +21,7 @@ import ( "encoding/json" "fmt" "math" + "math/rand" "runtime/debug" "strings" "time" @@ -43,8 +44,9 @@ import ( "k8s.io/client-go/restmapper" ) -var appwrapperJobName = "appwrapper.mcad.ibm.com" -var resourceName = "resourceName" +var appwrapperJobLabelName = "workload.codeflare.dev/appwrapper" +var appwrapperJobLabelNamespace = "workload.codeflare.dev/appwrapper-namespace" +var resourceName = "workload.codeflare.dev/resourceName" var appWrapperKind = arbv1.SchemeGroupVersion.WithKind("AppWrapper") type GenericResources struct { @@ -72,6 +74,18 @@ func join(strs ...string) string { return result } + +func GetRandomString(n int) string { + var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") + + rand.Seed(time.Now().UnixNano()) + b := make([]rune, n) + for i := range b { + b[i] = letters[rand.Intn(len(letters))] + } + return string(b) +} + func (gr *GenericResources) Cleanup(aw *arbv1.AppWrapper, awr *arbv1.AppWrapperGenericResource) (genericResourceName string, groupversionkind *schema.GroupVersionKind, erro error) { var err error err = nil @@ -166,7 +180,7 @@ func (gr *GenericResources) Cleanup(aw *arbv1.AppWrapper, awr *arbv1.AppWrapperG } // Get the resource to see if it exists in the AppWrapper namespace - labelSelector := fmt.Sprintf("%s=%s, %s=%s", appwrapperJobName, aw.Name, resourceName, unstruct.GetName()) + labelSelector := fmt.Sprintf("%s=%s, %s=%s, %s=%s", appwrapperJobLabelName, aw.Name, appwrapperJobLabelNamespace, aw.Namespace, resourceName, unstruct.GetName()) inEtcd, err := dclient.Resource(rsrc).Namespace(aw.Namespace).List(context.Background(), metav1.ListOptions{LabelSelector: labelSelector}) if err != nil { return name, gvk, err @@ -175,9 +189,10 @@ func (gr *GenericResources) Cleanup(aw *arbv1.AppWrapper, awr *arbv1.AppWrapperG // Check to see if object already exists in etcd, if not, create the object. if inEtcd != nil || len(inEtcd.Items) > 0 { newName := name - if len(newName) > 63 { - newName = newName[:63] + if len(newName) > 60 { + newName = newName[:60] } + newName += GetRandomString(3) err = deleteObject(namespaced, namespace, newName, rsrc, dclient) if err != nil { @@ -187,7 +202,7 @@ func (gr *GenericResources) Cleanup(aw *arbv1.AppWrapper, awr *arbv1.AppWrapperG return name, gvk, err } } else { - klog.Warningf("[Cleanup] %s/%s not found using label selector: %s.\n", name, namespace, labelSelector) + klog.Warningf("[Cleanup] %s/%s not found using label selector: %s.\n", namespace, name, labelSelector) } return name, gvk, err @@ -297,18 +312,19 @@ func (gr *GenericResources) SyncQueueJob(aw *arbv1.AppWrapper, awr *arbv1.AppWra } else { labels = unstruct.GetLabels() } - labels[appwrapperJobName] = aw.Name + labels[appwrapperJobLabelName] = aw.Name + labels[appwrapperJobLabelNamespace] = aw.Namespace labels[resourceName] = unstruct.GetName() unstruct.SetLabels(labels) // Add labels to pod template if one exists. podTemplateFound := addLabelsToPodTemplateField(&unstruct, labels) if !podTemplateFound { - klog.V(4).Infof("[SyncQueueJob] No pod template spec exists for resource: %s to add labels.", name) + klog.V(4).Infof("[SyncQueueJob] No pod template spec exists for resource: %s/%s to add labels.", namespace, name) } - // Get the resource to see if it exists - labelSelector := fmt.Sprintf("%s=%s, %s=%s", appwrapperJobName, aw.Name, resourceName, unstruct.GetName()) + // Get the resource to see if it exists + labelSelector := fmt.Sprintf("%s=%s, %s=%s, %s=%s", appwrapperJobLabelName, aw.Name, appwrapperJobLabelNamespace, aw.Namespace, resourceName, unstruct.GetName()) inEtcd, err := dclient.Resource(rsrc).List(context.Background(), metav1.ListOptions{LabelSelector: labelSelector}) if err != nil { return []*v1.Pod{}, err @@ -317,9 +333,10 @@ func (gr *GenericResources) SyncQueueJob(aw *arbv1.AppWrapper, awr *arbv1.AppWra // Check to see if object already exists in etcd, if not, create the object. if inEtcd == nil || len(inEtcd.Items) < 1 { newName := name - if len(newName) > 63 { - newName = newName[:63] + if len(newName) > 60 { + newName = newName[:60] } + newName += GetRandomString(3) unstruct.SetName(newName) //Asumption object is always namespaced //Refer to comment on line 238 @@ -329,7 +346,7 @@ func (gr *GenericResources) SyncQueueJob(aw *arbv1.AppWrapper, awr *arbv1.AppWra if errors.IsAlreadyExists(err) { klog.V(4).Infof("%v\n", err.Error()) } else { - klog.Errorf("Error creating the object `%v`, the error is `%v`", newName, errors.ReasonForError(err)) + klog.Errorf("Error creating the object `%s/%s`, the error is `%v`", namespace, newName, errors.ReasonForError(err)) return []*v1.Pod{}, err } } @@ -499,7 +516,7 @@ func deleteObject(namespaced bool, namespace string, name string, rsrc schema.Gr } if err != nil && !errors.IsNotFound(err) { - klog.Errorf("[deleteObject] Error deleting the object `%v`, the error is `%v`.", name, errors.ReasonForError(err)) + klog.Errorf("[deleteObject] Error deleting the object `%v`, in namespace %v, the error is `%v`.", name, namespace, errors.ReasonForError(err)) return err } else { klog.V(4).Infof("[deleteObject] Resource `%v` deleted.\n", name) @@ -531,7 +548,7 @@ func GetListOfPodResourcesFromOneGenericItem(awr *arbv1.AppWrapperGenericResourc klog.V(8).Infof("[GetListOfPodResourcesFromOneGenericItem] Requested total allocation resource from 1 pod `%v`.\n", podTotalresource) } - // Addd individual pods to results + // Add individual pods to results var replicaCount int = int(replicas) for i := 0; i < replicaCount; i++ { podResourcesList = append(podResourcesList, podTotalresource) @@ -623,7 +640,7 @@ func getContainerResources(container v1.Container, replicas float64) *clustersta } // returns status of an item present in etcd -func (gr *GenericResources) IsItemCompleted(awgr *arbv1.AppWrapperGenericResource, namespace string, appwrapperName string, genericItemName string) (completed bool) { +func (gr *GenericResources) IsItemCompleted(awgr *arbv1.AppWrapperGenericResource, appwrapperNamespace string, appwrapperName string, genericItemName string) (completed bool) { dd := gr.clients.Discovery() apigroups, err := restmapper.GetAPIGroupResources(dd) if err != nil { @@ -654,8 +671,8 @@ func (gr *GenericResources) IsItemCompleted(awgr *arbv1.AppWrapperGenericResourc return false } - labelSelector := fmt.Sprintf("%s=%s", appwrapperJobName, appwrapperName) - inEtcd, err := dclient.Resource(rsrc).Namespace(namespace).List(context.Background(), metav1.ListOptions{LabelSelector: labelSelector}) + labelSelector := fmt.Sprintf("%s=%s, %s=%s", appwrapperJobLabelName, appwrapperName, appwrapperJobLabelNamespace, appwrapperNamespace) + inEtcd, err := dclient.Resource(rsrc).Namespace(appwrapperNamespace).List(context.Background(), metav1.ListOptions{LabelSelector: labelSelector}) if err != nil { klog.Errorf("[IsItemCompleted] Error listing object: %v", err) return false @@ -675,7 +692,7 @@ func (gr *GenericResources) IsItemCompleted(awgr *arbv1.AppWrapperGenericResourc } } if !validAwOwnerRef { - klog.Warningf("[IsItemCompleted] Item owner name %v does match appwrappper name %v in namespace %v", unstructuredObjectName, appwrapperName, namespace) + klog.Warningf("[IsItemCompleted] Item owner name %v does match appwrappper name %v in namespace %v", unstructuredObjectName, appwrapperName, appwrapperNamespace) continue } diff --git a/test/e2e-kuttl-borrowing/steps/03-install.yaml b/test/e2e-kuttl-borrowing/steps/03-install.yaml index 88b9923f..a3a40bd0 100644 --- a/test/e2e-kuttl-borrowing/steps/03-install.yaml +++ b/test/e2e-kuttl-borrowing/steps/03-install.yaml @@ -31,7 +31,7 @@ spec: name: my-job-1 namespace: test labels: - appwrapper.mcad.ibm.com: my-job-1 + workload.codeflare.dev/appwrapper: my-job-1 spec: parallelism: 1 completions: 1 @@ -40,7 +40,7 @@ spec: name: my-job-1 namespace: test labels: - appwrapper.mcad.ibm.com: my-job-1 + workload.codeflare.dev/appwrapper: my-job-1 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/e2e-kuttl-borrowing/steps/04-install.yaml b/test/e2e-kuttl-borrowing/steps/04-install.yaml index 2b4fe84b..3fe9e0d3 100644 --- a/test/e2e-kuttl-borrowing/steps/04-install.yaml +++ b/test/e2e-kuttl-borrowing/steps/04-install.yaml @@ -31,7 +31,7 @@ spec: name: my-job-2 namespace: test labels: - appwrapper.mcad.ibm.com: my-job-2 + workload.codeflare.dev/appwrapper: my-job-2 spec: parallelism: 1 completions: 1 @@ -40,7 +40,7 @@ spec: name: my-job-2 namespace: test labels: - appwrapper.mcad.ibm.com: my-job-2 + workload.codeflare.dev/appwrapper: my-job-2 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/e2e-kuttl-deployment-01/steps/01-assert.yaml b/test/e2e-kuttl-deployment-01/steps/01-assert.yaml index cbf35849..347a5710 100644 --- a/test/e2e-kuttl-deployment-01/steps/01-assert.yaml +++ b/test/e2e-kuttl-deployment-01/steps/01-assert.yaml @@ -14,8 +14,9 @@ metadata: namespace: start-up labels: app: no-quota-deployment-01 - appwrapper.mcad.ibm.com: no-quota-deployment-01 - resourceName: no-quota-deployment-01 + workload.codeflare.dev/appwrapper: no-quota-deployment-01 + workload.codeflare.dev/appwrapper-namespace: start-up + workload.codeflare.dev/resourceName: no-quota-deployment-01 status: availableReplicas: 1 observedGeneration: 1 diff --git a/test/e2e-kuttl-deployment-01/steps/02-install.yaml b/test/e2e-kuttl-deployment-01/steps/02-install.yaml index 556ad04a..4b834a46 100644 --- a/test/e2e-kuttl-deployment-01/steps/02-install.yaml +++ b/test/e2e-kuttl-deployment-01/steps/02-install.yaml @@ -27,7 +27,7 @@ spec: name: no-quota-job-02 namespace: start-up labels: - appwrapper.mcad.ibm.com: no-quota-job-02 + workload.codeflare.dev/appwrapper: no-quota-job-02 spec: parallelism: 1 completions: 1 @@ -36,7 +36,7 @@ spec: name: no-quota-job-1 namespace: start-up labels: - appwrapper.mcad.ibm.com: no-quota-job-02 + workload.codeflare.dev/appwrapper: no-quota-job-02 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/e2e-kuttl-deployment-01/steps/03-assert.yaml b/test/e2e-kuttl-deployment-01/steps/03-assert.yaml index fb5d6ba6..f6e97c24 100644 --- a/test/e2e-kuttl-deployment-01/steps/03-assert.yaml +++ b/test/e2e-kuttl-deployment-01/steps/03-assert.yaml @@ -12,28 +12,31 @@ metadata: name: hold-completion-job-03-01 namespace: start-up labels: - appwrapper.mcad.ibm.com: hold-completion-job-03 - resourceName: hold-completion-job-03-01 + workload.codeflare.dev/appwrapper: hold-completion-job-03 + workload.codeflare.dev/appwrapper-namespace: start-up + workload.codeflare.dev/resourceName: hold-completion-job-03-01 status: conditions: - status: "True" type: Complete succeeded: 1 --- -apiVersion: v1 -kind: Pod -metadata: +apiVersion: v1 +kind: Pod +metadata: namespace: start-up - labels: - appwrapper.mcad.ibm.com: hold-completion-job-03 - job-name: hold-completion-job-03-01 - resourceName: hold-completion-job-03-01 + labels: + workload.codeflare.dev/appwrapper: hold-completion-job-03 + workload.codeflare.dev/appwrapper-namespace: start-up + job-name: hold-completion-job-03-01 + workload.codeflare.dev/resourceName: hold-completion-job-03-01 --- -apiVersion: v1 -kind: Pod -metadata: +apiVersion: v1 +kind: Pod +metadata: namespace: start-up - labels: - appwrapper.mcad.ibm.com: hold-completion-job-03 - job-name: hold-completion-job-03-02 - resourceName: hold-completion-job-03-02 + labels: + workload.codeflare.dev/appwrapper: hold-completion-job-03 + workload.codeflare.dev/appwrapper-namespace: start-up + job-name: hold-completion-job-03-02 + workload.codeflare.dev/resourceName: hold-completion-job-03-02 diff --git a/test/e2e-kuttl-deployment-01/steps/03-install.yaml b/test/e2e-kuttl-deployment-01/steps/03-install.yaml index 78c9566a..6ecc6a24 100644 --- a/test/e2e-kuttl-deployment-01/steps/03-install.yaml +++ b/test/e2e-kuttl-deployment-01/steps/03-install.yaml @@ -31,7 +31,7 @@ spec: name: hold-completion-job-03-01 namespace: start-up labels: - appwrapper.mcad.ibm.com: hold-completion-job-03 + workload.codeflare.dev/appwrapper: hold-completion-job-03 spec: parallelism: 1 completions: 1 @@ -40,7 +40,7 @@ spec: name: hold-completion-job-03-01 namespace: start-up labels: - appwrapper.mcad.ibm.com: hold-completion-job-03 + workload.codeflare.dev/appwrapper: hold-completion-job-03 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never @@ -80,7 +80,7 @@ spec: name: hold-completion-job-03-02 namespace: start-up labels: - appwrapper.mcad.ibm.com: hold-completion-job-03 + workload.codeflare.dev/appwrapper: hold-completion-job-03 spec: parallelism: 1 completions: 1 @@ -89,7 +89,7 @@ spec: name: hold-completion-job-03-02 namespace: start-up labels: - appwrapper.mcad.ibm.com: hold-completion-job-03 + workload.codeflare.dev/appwrapper: hold-completion-job-03 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/e2e-kuttl-deployment-01/steps/06-install.yaml b/test/e2e-kuttl-deployment-01/steps/06-install.yaml index d623c272..96a3f1ca 100644 --- a/test/e2e-kuttl-deployment-01/steps/06-install.yaml +++ b/test/e2e-kuttl-deployment-01/steps/06-install.yaml @@ -31,7 +31,7 @@ spec: name: no-quota-job-06 namespace: start-up labels: - appwrapper.mcad.ibm.com: no-quota-job-06 + workload.codeflare.dev/appwrapper: no-quota-job-06 spec: parallelism: 1 completions: 1 @@ -40,7 +40,7 @@ spec: name: no-quota-job-06 namespace: start-up labels: - appwrapper.mcad.ibm.com: no-quota-job-06 + workload.codeflare.dev/appwrapper: no-quota-job-06 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/e2e-kuttl-deployment-01/steps/07-assert.yaml b/test/e2e-kuttl-deployment-01/steps/07-assert.yaml index dc0ade42..cddab300 100644 --- a/test/e2e-kuttl-deployment-01/steps/07-assert.yaml +++ b/test/e2e-kuttl-deployment-01/steps/07-assert.yaml @@ -7,12 +7,12 @@ metadata: status: state: Running --- -apiVersion: v1 -kind: Pod -metadata: +apiVersion: v1 +kind: Pod +metadata: namespace: start-up - labels: - appwrapper.mcad.ibm.com: no-quota-job-06 - job-name: no-quota-job-06 - resourceName: no-quota-job-06 - + labels: + workload.codeflare.dev/appwrapper: no-quota-job-06 + workload.codeflare.dev/appwrapper-namespace: start-up + job-name: no-quota-job-06 + workload.codeflare.dev/resourceName: no-quota-job-06 diff --git a/test/e2e-kuttl-deployment-01/steps/08-install.yaml b/test/e2e-kuttl-deployment-01/steps/08-install.yaml index 530a1e83..6ca257c8 100644 --- a/test/e2e-kuttl-deployment-01/steps/08-install.yaml +++ b/test/e2e-kuttl-deployment-01/steps/08-install.yaml @@ -29,7 +29,7 @@ spec: name: bronze-quota-job-08 namespace: start-up labels: - appwrapper.mcad.ibm.com: bronze-quota-job-08 + workload.codeflare.dev/appwrapper: bronze-quota-job-08 spec: parallelism: 1 completions: 1 @@ -38,7 +38,7 @@ spec: name: bronze-quota-job-08 namespace: start-up labels: - appwrapper.mcad.ibm.com: bronze-quota-job-08 + workload.codeflare.dev/appwrapper: bronze-quota-job-08 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/e2e-kuttl-deployment-02/steps/01-install.yaml b/test/e2e-kuttl-deployment-02/steps/01-install.yaml index c7b6a1c4..ce4b83ba 100644 --- a/test/e2e-kuttl-deployment-02/steps/01-install.yaml +++ b/test/e2e-kuttl-deployment-02/steps/01-install.yaml @@ -30,7 +30,7 @@ spec: name: bronze-quota-job-01 namespace: start-up-02 labels: - appwrapper.mcad.ibm.com: bronze-quota-job-01 + workload.codeflare.dev/appwrapper: bronze-quota-job-01 spec: parallelism: 1 completions: 1 @@ -39,7 +39,7 @@ spec: name: bronze-quota-job-01 namespace: start-up-02 labels: - appwrapper.mcad.ibm.com: bronze-quota-job-01 + workload.codeflare.dev/appwrapper: bronze-quota-job-01 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/e2e-kuttl-deployment-02/steps/02-assert.yaml b/test/e2e-kuttl-deployment-02/steps/02-assert.yaml index aa9a6f7e..0833b6cf 100644 --- a/test/e2e-kuttl-deployment-02/steps/02-assert.yaml +++ b/test/e2e-kuttl-deployment-02/steps/02-assert.yaml @@ -14,8 +14,9 @@ metadata: namespace: start-up-02 labels: app: no-quota-deployment-02 - appwrapper.mcad.ibm.com: no-quota-deployment-02 - resourceName: no-quota-deployment-02 + workload.codeflare.dev/appwrapper: no-quota-deployment-02 + workload.codeflare.dev/appwrapper-namespace: start-up-02 + workload.codeflare.dev/resourceName: no-quota-deployment-02 status: availableReplicas: 1 observedGeneration: 1 diff --git a/test/e2e-kuttl-deployment-02/steps/04-install.yaml b/test/e2e-kuttl-deployment-02/steps/04-install.yaml index f6f46417..0d7e1d1b 100644 --- a/test/e2e-kuttl-deployment-02/steps/04-install.yaml +++ b/test/e2e-kuttl-deployment-02/steps/04-install.yaml @@ -30,7 +30,7 @@ spec: name: gold-quota-job-04 namespace: start-up-02 labels: - appwrapper.mcad.ibm.com: gold-quota-job-04 + workload.codeflare.dev/appwrapper: gold-quota-job-04 spec: parallelism: 1 completions: 1 @@ -39,7 +39,7 @@ spec: name: gold-quota-job-04 namespace: start-up-02 labels: - appwrapper.mcad.ibm.com: gold-quota-job-04 + workload.codeflare.dev/appwrapper: gold-quota-job-04 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/e2e-kuttl-deployment-03/steps/01-install.yaml b/test/e2e-kuttl-deployment-03/steps/01-install.yaml index faee9e33..82f345c7 100644 --- a/test/e2e-kuttl-deployment-03/steps/01-install.yaml +++ b/test/e2e-kuttl-deployment-03/steps/01-install.yaml @@ -30,7 +30,7 @@ spec: name: bronze-quota-job-01 namespace: start-up-03 labels: - appwrapper.mcad.ibm.com: bronze-quota-job-01 + workload.codeflare.dev/appwrapper: bronze-quota-job-01 spec: parallelism: 1 completions: 1 @@ -39,7 +39,7 @@ spec: name: bronze-quota-job-01 namespace: start-up-03 labels: - appwrapper.mcad.ibm.com: bronze-quota-job-01 + workload.codeflare.dev/appwrapper: bronze-quota-job-01 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/e2e-kuttl-deployment-03/steps/02-assert.yaml b/test/e2e-kuttl-deployment-03/steps/02-assert.yaml index 8551bdf6..550196cc 100644 --- a/test/e2e-kuttl-deployment-03/steps/02-assert.yaml +++ b/test/e2e-kuttl-deployment-03/steps/02-assert.yaml @@ -14,7 +14,8 @@ metadata: namespace: start-up-03 labels: app: no-quota-deployment-02 - appwrapper.mcad.ibm.com: no-quota-deployment-02 - resourceName: no-quota-deployment-02 + workload.codeflare.dev/appwrapper: no-quota-deployment-02 + workload.codeflare.dev/appwrapper-namespace: start-up-03 + workload.codeflare.dev/resourceName: no-quota-deployment-02 status: availableReplicas: 1 diff --git a/test/e2e-kuttl-deployment-03/steps/04-install.yaml b/test/e2e-kuttl-deployment-03/steps/04-install.yaml index aa99097e..e0bedc9d 100644 --- a/test/e2e-kuttl-deployment-03/steps/04-install.yaml +++ b/test/e2e-kuttl-deployment-03/steps/04-install.yaml @@ -29,7 +29,7 @@ spec: name: gold-quota-job-04 namespace: start-up-03 labels: - appwrapper.mcad.ibm.com: gold-quota-job-04 + workload.codeflare.dev/appwrapper: gold-quota-job-04 spec: parallelism: 1 completions: 1 @@ -38,7 +38,7 @@ spec: name: gold-quota-job-04 namespace: start-up-03 labels: - appwrapper.mcad.ibm.com: gold-quota-job-04 + workload.codeflare.dev/appwrapper: gold-quota-job-04 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/e2e-kuttl-deployment-03/steps/05-install.yaml b/test/e2e-kuttl-deployment-03/steps/05-install.yaml index a6c83b01..e5d35240 100644 --- a/test/e2e-kuttl-deployment-03/steps/05-install.yaml +++ b/test/e2e-kuttl-deployment-03/steps/05-install.yaml @@ -31,7 +31,7 @@ spec: name: plutonium-quota-job-05 namespace: start-up-03 labels: - appwrapper.mcad.ibm.com: plutonium-quota-job-05 + workload.codeflare.dev/appwrapper: plutonium-quota-job-05 spec: parallelism: 1 completions: 1 @@ -40,7 +40,7 @@ spec: name: plutonium-quota-job-05 namespace: start-up-03 labels: - appwrapper.mcad.ibm.com: plutonium-quota-job-05 + workload.codeflare.dev/appwrapper: plutonium-quota-job-05 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/e2e-kuttl/quota-errors/03-assert.yaml b/test/e2e-kuttl/quota-errors/03-assert.yaml index 629127c4..6cd15881 100644 --- a/test/e2e-kuttl/quota-errors/03-assert.yaml +++ b/test/e2e-kuttl/quota-errors/03-assert.yaml @@ -17,8 +17,9 @@ metadata: namespace: quota-errors labels: app: deployment-silver-lo-pri-1replica - appwrapper.mcad.ibm.com: deployment-silver-lo-pri-1replica - resourceName: deployment-silver-lo-pri-1replica + workload.codeflare.dev/appwrapper: deployment-silver-lo-pri-1replica + workload.codeflare.dev/appwrapper-namespace: quota-errors + workload.codeflare.dev/resourceName: deployment-silver-lo-pri-1replica status: availableReplicas: 1 observedGeneration: 1 diff --git a/test/e2e-kuttl/quota-forest/09-install.yaml b/test/e2e-kuttl/quota-forest/09-install.yaml index a7579ef3..948a0983 100644 --- a/test/e2e-kuttl/quota-forest/09-install.yaml +++ b/test/e2e-kuttl/quota-forest/09-install.yaml @@ -36,7 +36,7 @@ spec: name: my-job-1 namespace: test labels: - appwrapper.mcad.ibm.com: my-job-1 + workload.codeflare.dev/appwrapper: my-job-1 spec: parallelism: 1 completions: 1 @@ -45,7 +45,7 @@ spec: name: my-job-1 namespace: test labels: - appwrapper.mcad.ibm.com: my-job-1 + workload.codeflare.dev/appwrapper: my-job-1 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never @@ -100,7 +100,7 @@ spec: name: my-job-2 namespace: test labels: - appwrapper.mcad.ibm.com: my-job-2 + workload.codeflare.dev/appwrapper: my-job-2 spec: parallelism: 1 completions: 1 @@ -109,7 +109,7 @@ spec: name: my-job-2 namespace: test labels: - appwrapper.mcad.ibm.com: my-job-2 + workload.codeflare.dev/appwrapper: my-job-2 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/e2e-kuttl/quota-forest/10-install.yaml b/test/e2e-kuttl/quota-forest/10-install.yaml index 17d8e726..c2be1d09 100644 --- a/test/e2e-kuttl/quota-forest/10-install.yaml +++ b/test/e2e-kuttl/quota-forest/10-install.yaml @@ -28,7 +28,7 @@ spec: name: job-without-labels namespace: test labels: - appwrapper.mcad.ibm.com: job-without-labels + workload.codeflare.dev/appwrapper: job-without-labels spec: parallelism: 1 completions: 1 @@ -37,7 +37,7 @@ spec: name: job-without-labels namespace: test labels: - appwrapper.mcad.ibm.com: job-without-labels + workload.codeflare.dev/appwrapper: job-without-labels spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/e2e-kuttl/quota-forest/11-install.yaml b/test/e2e-kuttl/quota-forest/11-install.yaml index 8e7b04fd..8d915d23 100644 --- a/test/e2e-kuttl/quota-forest/11-install.yaml +++ b/test/e2e-kuttl/quota-forest/11-install.yaml @@ -30,7 +30,7 @@ spec: name: job-with-labels-no-quota namespace: test labels: - appwrapper.mcad.ibm.com: job-with-labels-no-quota + workload.codeflare.dev/appwrapper: job-with-labels-no-quota spec: parallelism: 1 completions: 1 @@ -39,7 +39,7 @@ spec: name: job-with-labels-no-quota namespace: test labels: - appwrapper.mcad.ibm.com: job-with-labels-no-quota + workload.codeflare.dev/appwrapper: job-with-labels-no-quota spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/e2e/util.go b/test/e2e/util.go index 363a208e..8b7c582e 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -91,6 +91,7 @@ func initTestContext() *context { Name: cxt.namespace, }, }, metav1.CreateOptions{}) + // Expect(err).NotTo(HaveOccurred()) /* _, err = cxt.kubeclient.SchedulingV1beta1().PriorityClasses().Create(gcontext.Background(), &schedv1.PriorityClass{ @@ -187,7 +188,7 @@ func createGenericAWTimeoutWithStatus(context *context, name string) *arbv1.AppW "template": { "metadata": { "labels": { - "appwrapper.mcad.ibm.com": "aw-test-jobtimeout-with-comp-1" + "workload.codeflare.dev/appwrapper": "aw-test-jobtimeout-with-comp-1" } }, "spec": { @@ -264,7 +265,7 @@ func anyPodsExist(ctx *context, awNamespace string, awName string) wait.Conditio for _, podFromPodList := range podList.Items { // First find a pod from the list that is part of the AW - if awn, found := podFromPodList.Labels["appwrapper.mcad.ibm.com"]; !found || awn != awName { + if awn, found := podFromPodList.Labels["workload.codeflare.dev/appwrapper"]; !found || awn != awName { // DEBUG fmt.Fprintf(GinkgoWriter, "[anyPodsExist] Pod %s in phase: %s not part of AppWrapper: %s, labels: %#v\n", // DEBUG podFromPodList.Name, podFromPodList.Status.Phase, awName, podFromPodList.Labels) continue @@ -293,7 +294,7 @@ func podPhase(ctx *context, awNamespace string, awName string, pods []*v1.Pod, p for _, podFromPodList := range podList.Items { // First find a pod from the list that is part of the AW - if awn, found := podFromPodList.Labels["appwrapper.mcad.ibm.com"]; !found || awn != awName { + if awn, found := podFromPodList.Labels["workload.codeflare.dev/appwrapper"]; !found || awn != awName { fmt.Fprintf(GinkgoWriter, "[podPhase] Pod %s in phase: %s not part of AppWrapper: %s, labels: %#v\n", podFromPodList.Name, podFromPodList.Status.Phase, awName, podFromPodList.Labels) continue @@ -404,7 +405,7 @@ func awPodPhase(ctx *context, aw *arbv1.AppWrapper, phase []v1.PodPhase, taskNum readyTaskNum := 0 for _, pod := range podList.Items { - if awn, found := pod.Labels["appwrapper.mcad.ibm.com"]; !found || awn != aw.Name { + if awn, found := pod.Labels["workload.codeflare.dev/appwrapper"]; !found || awn != aw.Name { if !quite { fmt.Fprintf(GinkgoWriter, "[awPodPhase] Pod %s not part of AppWrapper: %s, labels: %s\n", pod.Name, aw.Name, pod.Labels) } @@ -468,7 +469,7 @@ func awNamespacePhase(ctx *context, aw *arbv1.AppWrapper, phase []v1.NamespacePh readyTaskNum := 0 for _, namespace := range namespaces.Items { - if awns, found := namespace.Labels["appwrapper.mcad.ibm.com"]; !found || awns != aw.Name { + if awns, found := namespace.Labels["workload.codeflare.dev/appwrapper"]; !found || awns != aw.Name { continue } @@ -576,7 +577,7 @@ func createJobAWWithInitContainer(context *context, name string, requeuingTimeIn "app": "aw-job-3-init-container" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "aw-job-3-init-container" + "workload.codeflare.dev/appwrapper-name": "aw-job-3-init-container" } }, "spec": { @@ -669,7 +670,7 @@ func createDeploymentAW(context *context, name string) *arbv1.AppWrapper { "app": "aw-deployment-3" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "aw-deployment-3" + "workload.codeflare.dev/appwrapper-name": "aw-deployment-3" } }, "spec": { @@ -740,7 +741,7 @@ func createDeploymentAWwith550CPU(context *context, name string) *arbv1.AppWrapp "app": "` + name + `" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "` + name + `" + "workload.codeflare.dev/appwrapper-name": "` + name + `" } }, "spec": { @@ -816,7 +817,7 @@ func createDeploymentAWwith350CPU(context *context, name string) *arbv1.AppWrapp "app": "aw-deployment-2-350cpu" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "aw-deployment-2-350cpu" + "workload.codeflare.dev/appwrapper-name": "aw-deployment-2-350cpu" } }, "spec": { @@ -892,7 +893,7 @@ func createDeploymentAWwith426CPU(context *context, name string) *arbv1.AppWrapp "app": "` + name + `" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "` + name + `" + "workload.codeflare.dev/appwrapper-name": "` + name + `" } }, "spec": { @@ -968,7 +969,7 @@ func createDeploymentAWwith425CPU(context *context, name string) *arbv1.AppWrapp "app": "aw-deployment-2-425cpu" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "aw-deployment-2-425cpu" + "workload.codeflare.dev/appwrapper-name": "aw-deployment-2-425cpu" } }, "spec": { @@ -1044,7 +1045,7 @@ func createGenericDeploymentAW(context *context, name string) *arbv1.AppWrapper "app": "aw-generic-deployment-3" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "aw-generic-deployment-3" + "workload.codeflare.dev/appwrapper-name": "aw-generic-deployment-3" } }, "spec": { @@ -1107,7 +1108,7 @@ func createGenericJobAWWithStatus(context *context, name string) *arbv1.AppWrapp "template": { "metadata": { "labels": { - "appwrapper.mcad.ibm.com": "aw-test-job-with-comp-1" + "workload.codeflare.dev/appwrapper": "aw-test-job-with-comp-1" } }, "spec": { @@ -1186,7 +1187,7 @@ func createGenericJobAWWithMultipleStatus(context *context, name string) *arbv1. "template": { "metadata": { "labels": { - "appwrapper.mcad.ibm.com": "aw-test-job-with-comp-ms-21" + "workload.codeflare.dev/appwrapper": "aw-test-job-with-comp-ms-21" } }, "spec": { @@ -1234,7 +1235,7 @@ func createGenericJobAWWithMultipleStatus(context *context, name string) *arbv1. "template": { "metadata": { "labels": { - "appwrapper.mcad.ibm.com": "aw-test-job-with-comp-ms-21" + "workload.codeflare.dev/appwrapper": "aw-test-job-with-comp-ms-21" } }, "spec": { @@ -1310,7 +1311,7 @@ func createAWGenericItemWithoutStatus(context *context, name string) *arbv1.AppW "name": "aw-schd-spec-with-timeout-1", "namespace": "default", "labels":{ - "appwrapper.mcad.ibm.com": "aw-test-job-with-comp-44" + "workload.codeflare.dev/appwrapper": "aw-test-job-with-comp-44" } }, "spec": { @@ -1360,7 +1361,7 @@ func createGenericJobAWWithScheduleSpec(context *context, name string) *arbv1.Ap "template": { "metadata": { "labels": { - "appwrapper.mcad.ibm.com": "aw-test-job-with-scheduling-spec" + "workload.codeflare.dev/appwrapper": "aw-test-job-with-scheduling-spec" } }, "spec": { @@ -1438,7 +1439,7 @@ func createGenericJobAWtWithLargeCompute(context *context, name string) *arbv1.A "template": { "metadata": { "labels": { - "appwrapper.mcad.ibm.com": "aw-test-job-with-large-comp-1" + "workload.codeflare.dev/appwrapper": "aw-test-job-with-large-comp-1" } }, "spec": { @@ -1511,8 +1512,9 @@ func createGenericServiceAWWithNoStatus(context *context, name string) *arbv1.Ap "kind": "Service", "metadata": { "labels": { - "appwrapper.mcad.ibm.com": "test-dep-job-item", - "resourceName": "test-dep-job-item-svc" + "workload.codeflare.dev/appwrapper": "test-dep-job-item", + "workload.codeflare.dev/appwrapper-namespace": "test", + "workload.codeflare.dev/resourceName": "test-dep-job-item-svc" }, "name": "test-dep-job-item-svc", "namespace": "test" @@ -1599,7 +1601,7 @@ func createGenericDeploymentAWWithMultipleItems(context *context, name string) * "app": "` + name + `-deployment-1" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "` + name + `" + "workload.codeflare.dev/appwrapper-name": "` + name + `" } }, "spec": { @@ -1652,7 +1654,7 @@ func createGenericDeploymentAWWithMultipleItems(context *context, name string) * "app": "` + name + `-deployment-2" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "` + name + `" + "workload.codeflare.dev/appwrapper-name": "` + name + `" } }, "spec": { @@ -1732,7 +1734,7 @@ func createGenericDeploymentWithCPUAW(context *context, name string, cpuDemand s "app": "%s" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "%s" + "workload.codeflare.dev/appwrapper-name": "%s" } }, "spec": { @@ -1810,7 +1812,7 @@ func createGenericDeploymentCustomPodResourcesWithCPUAW(context *context, name s "app": "%s" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "%s" + "workload.codeflare.dev/appwrapper-name": "%s" } }, "spec": { @@ -1968,7 +1970,7 @@ func createStatefulSetAW(context *context, name string) *arbv1.AppWrapper { "app": "aw-statefulset-2" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "aw-statefulset-2" + "workload.codeflare.dev/appwrapper-name": "aw-statefulset-2" } }, "spec": { @@ -2040,7 +2042,7 @@ func createGenericStatefulSetAW(context *context, name string) *arbv1.AppWrapper "app": "aw-generic-statefulset-2" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "aw-generic-statefulset-2" + "workload.codeflare.dev/appwrapper-name": "aw-generic-statefulset-2" } }, "spec": { @@ -2101,7 +2103,7 @@ func createBadPodTemplateAW(context *context, name string) *arbv1.AppWrapper { "app": "aw-bad-podtemplate-2" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "aw-bad-podtemplate-2" + "workload.codeflare.dev/appwrapper-name": "aw-bad-podtemplate-2" } }, "spec": { @@ -2155,7 +2157,7 @@ func createPodTemplateAW(context *context, name string) *arbv1.AppWrapper { "name": "aw-podtemplate-1", "namespace": "test", "labels": { - "appwrapper.mcad.ibm.com": "aw-podtemplate-2" + "workload.codeflare.dev/appwrapper": "aw-podtemplate-2" } }, "spec": { @@ -2179,7 +2181,7 @@ func createPodTemplateAW(context *context, name string) *arbv1.AppWrapper { "name": "aw-podtemplate-2", "namespace": "test", "labels": { - "appwrapper.mcad.ibm.com": "aw-podtemplate-2" + "workload.codeflare.dev/appwrapper": "aw-podtemplate-2" } }, "spec": { @@ -2238,7 +2240,7 @@ func createPodCheckFailedStatusAW(context *context, name string) *arbv1.AppWrapp "name": "aw-checkfailedstatus-1", "namespace": "test", "labels": { - "appwrapper.mcad.ibm.com": "aw-checkfailedstatus-1" + "workload.codeflare.dev/appwrapper": "aw-checkfailedstatus-1" } }, "spec": { @@ -2305,7 +2307,7 @@ func createGenericPodAWCustomDemand(context *context, name string, cpuDemand str "app": "%s" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "%s" + "workload.codeflare.dev/appwrapper-name": "%s" } }, "spec": { @@ -2376,7 +2378,7 @@ func createGenericPodAW(context *context, name string) *arbv1.AppWrapper { "app": "aw-generic-pod-1" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "aw-generic-pod-1" + "workload.codeflare.dev/appwrapper-name": "aw-generic-pod-1" } }, "spec": { @@ -2446,7 +2448,7 @@ func createGenericPodTooBigAW(context *context, name string) *arbv1.AppWrapper { "app": "aw-generic-big-pod-1" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "aw-generic-big-pod-1" + "workload.codeflare.dev/appwrapper-name": "aw-generic-big-pod-1" } }, "spec": { @@ -2516,7 +2518,7 @@ func createBadGenericPodAW(context *context, name string) *arbv1.AppWrapper { "app": "aw-bad-generic-pod-1" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "aw-bad-generic-pod-1" + "workload.codeflare.dev/appwrapper-name": "aw-bad-generic-pod-1" } }, "spec": { @@ -2608,7 +2610,7 @@ func createBadGenericPodTemplateAW(context *context, name string) (*arbv1.AppWra "app": "aw-generic-podtemplate-2" }, "annotations": { - "appwrapper.mcad.ibm.com/appwrapper-name": "aw-generic-podtemplate-2" + "workload.codeflare.dev/appwrapper-name": "aw-generic-podtemplate-2" } }, "spec": { diff --git a/test/kuttl-test-borrowing.yaml b/test/kuttl-test-borrowing.yaml index beb9995e..26b205a4 100644 --- a/test/kuttl-test-borrowing.yaml +++ b/test/kuttl-test-borrowing.yaml @@ -5,5 +5,5 @@ testDirs: timeout: 60 artifactsDir: _output/logs commands: - - script: helm upgrade --install mcad-controller deployment/mcad-controller --namespace kube-system --wait --set loglevel=${LOG_LEVEL} --set resources.requests.cpu=1000m --set resources.requests.memory=1024Mi --set resources.limits.cpu=4000m --set resources.limits.memory=4096Mi --set image.repository=$IMAGE_REPOSITORY_MCAD --set image.tag=$IMAGE_TAG_MCAD --set image.pullPolicy=$MCAD_IMAGE_PULL_POLICY --set configMap.quotaEnabled='"true"' --set quotaManagement.rbac.apiGroup=ibm.com --set quotaManagement.rbac.resource=quotasubtrees --set configMap.name=mcad-controller-configmap --set configMap.preemptionEnabled='"true"' + - script: helm upgrade --install mcad-controller deployment/mcad-controller --namespace kube-system --wait --set loglevel=${LOG_LEVEL} --set resources.requests.cpu=1000m --set resources.requests.memory=1024Mi --set resources.limits.cpu=4000m --set resources.limits.memory=4096Mi --set image.repository=$IMAGE_REPOSITORY_MCAD --set image.tag=$IMAGE_TAG_MCAD --set image.pullPolicy=$MCAD_IMAGE_PULL_POLICY --set configMap.quotaEnabled='"true"' --set quotaManagement.rbac.apiGroup=quota.codeflare.dev --set quotaManagement.rbac.resource=quotasubtrees --set configMap.name=mcad-controller-configmap --set configMap.preemptionEnabled='"true"' - script: kubectl apply -f ${ROOT_DIR}/test/e2e-kuttl-borrowing/install-quota-subtree.yaml diff --git a/test/perf-test/preempt-exp-kwok.yaml b/test/perf-test/preempt-exp-kwok.yaml index 0bab8c85..d9bfc8d5 100644 --- a/test/perf-test/preempt-exp-kwok.yaml +++ b/test/perf-test/preempt-exp-kwok.yaml @@ -38,7 +38,7 @@ spec: metadata: namespace: default labels: - appwrapper.mcad.ibm.com: "fake-defaultaw-schd-spec-with-timeout-1" + workload.codeflare.dev/appwrapper: "fake-defaultaw-schd-spec-with-timeout-1" spec: affinity: nodeAffinity: diff --git a/test/perf-test/preempt-exp.yaml b/test/perf-test/preempt-exp.yaml index 13d9e003..b3dc5983 100644 --- a/test/perf-test/preempt-exp.yaml +++ b/test/perf-test/preempt-exp.yaml @@ -31,7 +31,7 @@ spec: namespace: default name: defaultaw-schd-spec-with-timeout-1 labels: - appwrapper.mcad.ibm.com: defaultaw-schd-spec-with-timeout-1 + workload.codeflare.dev/appwrapper: defaultaw-schd-spec-with-timeout-1 spec: parallelism: 1 completions: 1 @@ -39,7 +39,7 @@ spec: metadata: namespace: default labels: - appwrapper.mcad.ibm.com: "defaultaw-schd-spec-with-timeout-1" + workload.codeflare.dev/appwrapper: "defaultaw-schd-spec-with-timeout-1" spec: containers: - name: defaultaw-schd-spec-with-timeout-1 diff --git a/test/yaml/0002-aw-job-quota.yaml b/test/yaml/0002-aw-job-quota.yaml index e454fac2..39264eeb 100644 --- a/test/yaml/0002-aw-job-quota.yaml +++ b/test/yaml/0002-aw-job-quota.yaml @@ -30,7 +30,7 @@ spec: name: my-job-1 namespace: test labels: - appwrapper.mcad.ibm.com: my-job-1 + workload.codeflare.dev/appwrapper: my-job-1 spec: parallelism: 1 completions: 1 @@ -39,7 +39,7 @@ spec: name: my-job-1 namespace: test labels: - appwrapper.mcad.ibm.com: my-job-1 + workload.codeflare.dev/appwrapper: my-job-1 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/yaml/0003-aw-job-no-quota.yaml b/test/yaml/0003-aw-job-no-quota.yaml index 8aca9690..5a8ca3a5 100644 --- a/test/yaml/0003-aw-job-no-quota.yaml +++ b/test/yaml/0003-aw-job-no-quota.yaml @@ -27,7 +27,7 @@ spec: name: my-no-quota-job-0003 namespace: test labels: - appwrapper.mcad.ibm.com: my-no-quota-job-0003 + workload.codeflare.dev/appwrapper: my-no-quota-job-0003 spec: parallelism: 1 completions: 1 @@ -36,7 +36,7 @@ spec: name: my-no-quota-job-0003 namespace: test labels: - appwrapper.mcad.ibm.com: my-no-quota-job-0003 + workload.codeflare.dev/appwrapper: my-no-quota-job-0003 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/yaml/0004-aw-large-job-no-quota.yaml b/test/yaml/0004-aw-large-job-no-quota.yaml index e5013d9c..24e601c7 100644 --- a/test/yaml/0004-aw-large-job-no-quota.yaml +++ b/test/yaml/0004-aw-large-job-no-quota.yaml @@ -27,7 +27,7 @@ spec: name: large-job-no-quota namespace: test labels: - appwrapper.mcad.ibm.com: large-job-no-quota + workload.codeflare.dev/appwrapper: large-job-no-quota spec: parallelism: 1 completions: 1 @@ -36,7 +36,7 @@ spec: name: large-job-no-quota namespace: test labels: - appwrapper.mcad.ibm.com: large-job-no-quota + workload.codeflare.dev/appwrapper: large-job-no-quota spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/yaml/0005-aw-two-quota-jobs.yaml b/test/yaml/0005-aw-two-quota-jobs.yaml index 447afee7..d2e97973 100644 --- a/test/yaml/0005-aw-two-quota-jobs.yaml +++ b/test/yaml/0005-aw-two-quota-jobs.yaml @@ -30,7 +30,7 @@ spec: name: bronze-job-0005-01 namespace: test labels: - appwrapper.mcad.ibm.com: bronze-job-0005-01 + workload.codeflare.dev/appwrapper: bronze-job-0005-01 spec: parallelism: 1 completions: 1 @@ -39,7 +39,7 @@ spec: name: bronze-job-0005-01 namespace: test labels: - appwrapper.mcad.ibm.com: bronze-job-0005-01 + workload.codeflare.dev/appwrapperm: bronze-job-0005-01 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never @@ -94,7 +94,7 @@ spec: name: bronze-job-0005-02 namespace: test labels: - appwrapper.mcad.ibm.com: bronze-job-0005-02 + workload.codeflare.dev/appwrapper: bronze-job-0005-02 spec: parallelism: 1 completions: 1 @@ -103,7 +103,7 @@ spec: name: bronze-job-0005-02 namespace: test labels: - appwrapper.mcad.ibm.com: bronze-job-0005-02 + workload.codeflare.dev/appwrapper: bronze-job-0005-02 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/yaml/0006-aw-init-containers.yaml b/test/yaml/0006-aw-init-containers.yaml index 75ed22da..483e248c 100644 --- a/test/yaml/0006-aw-init-containers.yaml +++ b/test/yaml/0006-aw-init-containers.yaml @@ -34,7 +34,7 @@ spec: name: bronnze-init-job-0006 namespace: test labels: - appwrapper.mcad.ibm.com: bronnze-init-job-0006 + workload.codeflare.dev/appwrapper: bronnze-init-job-0006 spec: parallelism: 3 terminationGracePeriodSeconds: 1 @@ -44,7 +44,7 @@ spec: name: bronnze-init-job-0006 namespace: test labels: - appwrapper.mcad.ibm.com: bronnze-init-job-0006 + workload.codeflare.dev/appwrapper: bronnze-init-job-0006 spec: terminationGracePeriodSeconds: 1 restartPolicy: Never diff --git a/test/yaml/0008-aw-default.yaml b/test/yaml/0008-aw-default.yaml index 4bbf0c5c..f469f66a 100644 --- a/test/yaml/0008-aw-default.yaml +++ b/test/yaml/0008-aw-default.yaml @@ -31,7 +31,7 @@ spec: namespace: default name: defaultaw-schd-spec-with-timeout-1 # labels: - # appwrapper.mcad.ibm.com: defaultaw-schd-spec-with-timeout-1 + # workload.codeflare.dev/appwrapper: defaultaw-schd-spec-with-timeout-1 spec: parallelism: 1 completions: 1 @@ -39,7 +39,7 @@ spec: metadata: namespace: default labels: - appwrapper.mcad.ibm.com: "defaultaw-schd-spec-with-timeout-1" + workload.codeflare.dev/appwrapper: "defaultaw-schd-spec-with-timeout-1" spec: containers: - name: defaultaw-schd-spec-with-timeout-1