Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ResourceFlavor API #133

Merged
merged 1 commit into from
Mar 21, 2022
Merged

Conversation

ahg-g
Copy link
Contributor

@ahg-g ahg-g commented Mar 19, 2022

What type of PR is this?

/kind feature

What this PR does / why we need it:

Implements the ResourceFlavor API. ClusterQueues now don't embed the labels/taints of a flavor, they are looked-up from a matching ResourceFlavor resource.

The scheduler will skip flavors with no matching ResourceFlavor. In a followup work we need to introduce a new "OutOfCommision/Frozen" state for ClusterQueue when this happens. ClusterQueues in this state should be taken out of the cohort and no jobs can schedule via them until the referenced flavors are defined. This will be tracked in #134.

Which issue(s) this PR fixes:

Fixes #59

Special notes for your reviewer:

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 19, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 19, 2022
@ahg-g
Copy link
Contributor Author

ahg-g commented Mar 19, 2022

/hold

Just so it doesn't get merged by mistake

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 19, 2022
@ahg-g
Copy link
Contributor Author

ahg-g commented Mar 21, 2022

@alculquicondor

@ahg-g
Copy link
Contributor Author

ahg-g commented Mar 21, 2022

/retest

api/v1alpha1/clusterqueue_types.go Outdated Show resolved Hide resolved
api/v1alpha1/clusterqueue_types.go Outdated Show resolved Hide resolved
pkg/cache/cache.go Outdated Show resolved Hide resolved
pkg/cache/cache_test.go Outdated Show resolved Hide resolved
pkg/cache/cache.go Show resolved Hide resolved
pkg/cache/cache.go Show resolved Hide resolved
pkg/controller/workload/job/job_controller.go Show resolved Hide resolved
pkg/controller/workload/job/job_controller.go Show resolved Hide resolved
pkg/scheduler/scheduler.go Show resolved Hide resolved
@alculquicondor
Copy link
Contributor

Also update the sample yamls, please https://github.com/kubernetes-sigs/kueue/tree/main/config/samples

@ahg-g
Copy link
Contributor Author

ahg-g commented Mar 21, 2022

Also update the sample yamls, please https://github.com/kubernetes-sigs/kueue/tree/main/config/samples

done.

@alculquicondor
Copy link
Contributor

can you rebase to see if that fixes verify?

go.mod Outdated
@@ -24,30 +24,50 @@ require (
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alculquicondor @ArangoGutierrez any idea where those changes came from? I had to run o get sigs.k8s.io/kustomize/kustomize/v4 to deploy, so probably from that; is it expected?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you shouldn't use go get, but go install instead. The new makefile does that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not working for me, make deploy still fails with

no required module provides package sigs.k8s.io/kustomize/kustomize/v4; to add it:
        go get sigs.k8s.io/kustomize/kustomize/v4
make: *** [Makefile:183: kustomize] Error 1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you figure it out or did you just revert the file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just reverted the file

Copy link
Contributor

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

go.mod Outdated
@@ -24,30 +24,50 @@ require (
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update your go to 1.18?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated but I also reverted this file

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 21, 2022
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 21, 2022
@alculquicondor
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 21, 2022
@ahg-g
Copy link
Contributor Author

ahg-g commented Mar 21, 2022

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 21, 2022
@k8s-ci-robot k8s-ci-robot merged commit 1d0c8bf into kubernetes-sigs:main Mar 21, 2022
@shuheiktgw shuheiktgw mentioned this pull request May 15, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flavors with matching names should have identical labels/taints
3 participants