-
Notifications
You must be signed in to change notification settings - Fork 202
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
Add operator to manage any resource created and deleted #1126
Comments
@wzshiming What do you think about the below API ? apiVersion: kwok.sigs.k8s.io/v1beta1
kind: NodePool
metadata:
name: nodepool-sample
spec:
nodeCount: 3
nodeTemplate:
apiVersion: v1
metadata:
annotations:
node.alpha.kubernetes.io/ttl: "0"
labels:
kubernetes.io/role: agent
nvidia.com/gpu.deploy.device-plugin: "true"
nvidia.com/gpu.deploy.dcgm-exporter: "true"
type: kwok
spec: {}
status:
allocatable:
cpu: 32
memory: 256Gi
pods: 110
capacity:
cpu: 32
memory: 256Gi
pods: 110
nodeInfo:
architecture: amd64
bootID: ""
containerRuntimeVersion: ""
kernelVersion: ""
kubeProxyVersion: fake
kubeletVersion: fake
machineID: ""
operatingSystem: linux
osImage: ""
systemUUID: ""
phase: Running The Simple struct by using the kubernetes corev1 Node object // NodePoolSpec defines the desired state of NodePool
type NodePoolSpec struct {
NodeCount int32 `json:"nodeCount"`
NodeTemplate corev1.Node `json:"nodeTemplate"`
} |
This is fine as a first version of the API, but if we have a requirement for a DeploymentPool, or any custom resource pool, do we still need to implement it? |
Can you explain what is a DeploymentPool ? i thought kowk purpose is "fake" nodes |
https://kwok.sigs.k8s.io/#what-is-kwok
The other Kubernetes API resources is also in the goal Now it's support the simulation of other resources, such as Kubevirt's VMI. so there may be a need for VMI pools in the future |
I see, i think that creating a dedicated API for each resource will benefit if different logic for different resources is needed ( e.g nodepool/ kubevirtPool , etc) |
I'm with you on that one. In fact, current node and pod simulations are already using templates, then we'll do chaos simulation use it. As a result, a validation tool was recently added to this batch of simulation stage templates in CI to ensure that the templates are properly |
How can you prevent from a user to apply a malformed template for node ? |
There is no way, we try not to let the user touch the template, if the user modifies the template, they will be responsible for it. You see my definition above, in fact the user only needs to modify the Resource, the ResourceTemplate is the default for the user, that is enough! |
Got it, thanks for the info. template: |-
kind: ANY TYPE OF RESOURCE How does that sound? |
All resources are now supported on kwok, but we should only need to support node and pod for this.
I don't quite understand this. you mean create a generic Template CR? |
If it's needed, we can create an API for the operator to get any kind of resource as a string, and apply it to kubernetes. Same way you did with the template |
Got it |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
What would you like to be added?
Why is this needed?
https://kubernetes.slack.com/archives/C04RG2YSK16/p1716989513415299?thread_ts=1716796734.402529&cid=C04RG2YSK16
The text was updated successfully, but these errors were encountered: