-
Notifications
You must be signed in to change notification settings - Fork 75
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
✨ support add-on agent resource requirements settings #354
✨ support add-on agent resource requirements settings #354
Conversation
/hold |
// +optional | ||
// +listType=map | ||
// +listMapKey=containerID | ||
AgentResources []ContainerResourceRequirements `json:"agentResources,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.
maybe just ResourceRequirements
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.
ResourceRequirements
is fine with me.
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.
Updated
|
||
// ContainerResourceRequirements defines resources required by one or a group of containers. | ||
type ContainerResourceRequirements struct { | ||
// ContainerID is a unique identifier for an agent container. It consists of three parts: resource kind, |
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.
is this kind or resource type? e.g. should user use Deployment or deployments?
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.
It's resource kind, such as Deployment. Of course, it could be resource type as well. Which one is better?
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.
it is better if it is group resource or group kind. Group might be needed since kind or resource names could be the same. Or alternatively, we only support certain type of resources.
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.
Updated the validation pattern to limit the supported resource types.
// multiple containers. For example, '*:*:*' matches all containers of the agent. | ||
// +required | ||
// +kubebuilder:validation:Required | ||
// "+kubebuilder:validation:Pattern=`^.+:.+:.+$` |
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.
does this work with the begining of "
?
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.
The validation here is not strict. A value, like ":abc:def
is allowed.
Signed-off-by: Yang Le <[email protected]>
0548fc4
to
3e993dc
Compare
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: elgnay, qiujian16 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 |
/unhold |
1a5e25a
into
open-cluster-management-io:main
Summary
Related issue(s)
Fixes #