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

🌱 workspace_reconcile_scheduling: allow for skipping a shard with a special annotation during scheduling #2782

Merged

Conversation

p0lyn0mial
Copy link
Contributor

@p0lyn0mial p0lyn0mial commented Feb 13, 2023

Summary

introduces an annotation that can be used to indicate that a shard is unschedulable. The annotation is meant to be used by e2e tests that otherwise started a private instance of kcp server.

I decided to go with an annotation because it is easier to change/delete than an API field.

Related issue(s)

Fixes #


// unschedulableAnnotationKey is the annotation key used to indicate that a shard is unschedulable.
// The annotation is meant to be used by e2e tests that otherwise started a private instance of kcp server.
unschedulableAnnotationKey = "internal.kcp.io/unschedulable"
Copy link
Member

Choose a reason for hiding this comment

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

experimental.core.kcp.io/unschedulable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

…cial annotation during scheduling

introduces an annotation that can be used to indicate that a shard is unschedulable.
The annotation is meant to be used by e2e tests that otherwise started a private instance of kcp server.
@p0lyn0mial p0lyn0mial force-pushed the unschedulable-shards-internal branch from b7f9d2d to ae152a6 Compare February 20, 2023 11:00
@fgiloux
Copy link
Contributor

fgiloux commented Feb 20, 2023

An alternative would have been to amend the e2e framework so that the initial shards have a specific label. The fixture used to create workspaces in e2e tests could then use this label for scheduling when no different configuration is provided. With this approach there would be no API or pseudo-API change.

@sttts
Copy link
Member

sttts commented Feb 20, 2023

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 20, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sttts

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 20, 2023
@sttts
Copy link
Member

sttts commented Feb 20, 2023

An alternative would have been to amend the e2e framework so that the initial shards have a specific label

We also have e.g. cli invocations. We cannot easily change those.

@openshift-merge-robot openshift-merge-robot merged commit 7b23f27 into kcp-dev:main Feb 20, 2023
@stevekuznetsov
Copy link
Contributor

Seems like we could have just gone for the spec field ... it's an alpha API. There is no real cost to it. Annotation-driven APIs are hard to learn.

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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants