Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

enhance: add the ability to require compute classes #2476

Merged
merged 8 commits into from
Feb 12, 2024
Merged

enhance: add the ability to require compute classes #2476

merged 8 commits into from
Feb 12, 2024

Conversation

keyallis
Copy link
Contributor

@keyallis keyallis commented Feb 12, 2024

acorn-io/manager#1819

Add a new install config flag to require compute classes for workloads to be scheduled.

Checklist

  • The title of this PR would make a good line in Acorn's Release Note's Changelog
  • The title of this PR ends with a link to the main issue being address in parentheses, like: This is a title (#1216). Here's an example
  • All relevant issues are referenced in the PR description. NOTE: don't use GitHub keywords that auto-close issues
  • Commits follow contributing guidance
  • Automated tests added to cover the changes. If tests couldn't be added, an explanation is provided in the Verification and Testing section
  • Changes to user-facing functionality, API, CLI, and upgrade impacts are clearly called out in PR description
  • PR has at least two approvals before merging (or a reasonable exception, like it's just a docs change)

Oscar Ward added 4 commits February 12, 2024 09:53
Signed-off-by: Oscar Ward <[email protected]>
Signed-off-by: Oscar Ward <[email protected]>
Signed-off-by: Oscar Ward <[email protected]>
Signed-off-by: Oscar Ward <[email protected]>
Copy link
Contributor

@thedadams thedadams left a comment

Choose a reason for hiding this comment

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

As far as I can tell, the error produced here will only occur in the controller. It would be nice to see this happen in the API server, too, to catch errors before creating them.

@keyallis keyallis requested a review from thedadams February 12, 2024 19:04
@@ -209,7 +209,8 @@ func (s *Validator) Validate(ctx context.Context, obj runtime.Object) (result fi
project,
workloadsFromImage,
apiv1cfg.WorkloadMemoryDefault,
apiv1cfg.WorkloadMemoryMaximum)
apiv1cfg.WorkloadMemoryMaximum,
apiv1cfg.RequireComputeClass)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: putting this here means this only happens once.

Suggested change
apiv1cfg.RequireComputeClass)
z.Dereference(apiv1cfg.RequireComputeClass),
)

Signed-off-by: Oscar Ward <[email protected]>
pkg/apis/api.acorn.io/v1/types.go Outdated Show resolved Hide resolved
@keyallis keyallis merged commit 8cedbfc into acorn-io:main Feb 12, 2024
5 checks passed
@keyallis keyallis deleted the require-cc branch February 12, 2024 20:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants