-
Notifications
You must be signed in to change notification settings - Fork 168
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
feat: add execution contexts api #1266
Conversation
@@ -88,4 +88,27 @@ var tenant = []definition.Descriptor{ | |||
}, | |||
}, | |||
}, | |||
{ | |||
Path: "/tenants/{tenant}/precheck", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"/tenants/{tenant}/executioncontexts" to list all execution contexts for the given tenant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
// WorkerContextStatus describes the status of worker clusters, it contains information that affects | ||
// pipeline execution, like reserved resources, pvc status. | ||
type WorkerContextStatus struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ExecutionContext {
Spec: ...
Status: ...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@cd1989 PTAL |
pkg/server/apis/v1alpha1/types.go
Outdated
type ExecutionContextSpec struct { | ||
Cluster string `json:"cluster"` | ||
Namespace string `json:"namespace"` | ||
Integration string `json:"integration"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need integration
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add a Closed
phase for execution context.
If users want to use a closed execution context, they need to open the related cluster integration firstly.
So I think the integration
field is useful.
@cd1989 WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to remove it.
pkg/server/apis/v1alpha1/types.go
Outdated
// ExecutionContext represtents a context used to execute workflows. | ||
type ExecutionContext struct { | ||
// Metadata for the particular object, including name, namespace, labels, etc | ||
meta_v1.ObjectMeta `json:"metadata,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ExecutionContext doesn't have concept like namespace
, and also no need to use labels
, it's not k8s resources, and we should not treat like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK,I will delete it.
pkg/server/apis/v1alpha1/types.go
Outdated
type ExecutionContextStatus struct { | ||
// Phase of the execution context, could be 'Ready', 'NotReady' or 'Unknown' | ||
Phase ExecutionContextPhase `json:"phase"` | ||
ReservedResources map[core_v1.ResourceName]string `json:"reservedResources"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can comment what is ReservedResources with examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
@cd1989 PTAL |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cd1989 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 |
/cherrypick release-1.0 |
@zhujian7: new pull request created: #1267 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What this PR does / why we need it:
Add list execution contexts API to list ExecutionContexts of a tenant.
An execution context describes the context of workflow execution, including information(cluster, namespace, PVC, etc.)that workflows will use in running.
Which issue(s) this PR is related to (optional, link to 3rd issue(s)):
Fixes #
Reference to #
Special notes for your reviewer:
/cc @supereagle @cd1989
Release note: