kwok
kwok copied to clipboard
Support volume provisioner
What would you like to be added?
TODO
Why is this needed?
https://kubernetes.slack.com/archives/C04RG2YSK16/p1708619886836559
This would be very useful. I don't know what the plan is for this feature since I don't have access to the Slack conversation, but I implemented a trivial volume provisioner (based on the external provisioner example) that allows StatefulSets scheduling to be simulated: https://github.com/adriansuarez/noop-provisioner/blob/main/main.go
# Create K8s cluster and add worker nodes
export KWOK_WORKDIR=/tmp
export KUBECONFIG=/tmp/kubeconfig.yaml
kwokctl create cluster --wait 1m
kwokctl scale node --replicas 4
# Start noop volume provisioner that immediately binds PVCs
docker run -d --name noop-provisioner \
-v /tmp/clusters/kwok/kubeconfig:/kubeconfig \
-v /tmp/clusters/kwok/pki:/etc/kubernetes/pki \
--network kwok-kwok \
ghcr.io/adriansuarez/noop-provisioner:latest -kubeconfig /kubeconfig
# Create storage class for noop provisioner
kubectl apply -f - <<EOF
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
annotations:
storageclass.kubernetes.io/is-default-class: "true"
name: noop
provisioner: nuodb.github.io/noop-provisioner
EOF
# Create stateful workloads (NuoDB domain and database)
helm install nuodb-admin --repo https://nuodb.github.io/nuodb-helm-charts admin
helm install nuodb-database --repo https://nuodb.github.io/nuodb-helm-charts database
Awesome work, I was planning on using the Stage to simulate the behavior, but your solution is great and reduces the amount of code to maintain.
In fact, there's another project wzshiming/custom-metrics-apiserver-simulator that does something similar to what you're doing, which is just importing an existing package to simulate custom-metrics. the code is very small.
I had a discussion with the owner of sigs.k8s.io/custom-metrics-apiserver about whether it was possible to add directly to it, but he didn't think it was appropriate. so I wasn't sure what to do with it before, but seeing this gave me a good idea, so why don't we just put it into a separate organization?
kwok-ci I created to get around the limitations of k8s org, to build some binary and image for kwok, what do you think about putting both projects in kwok-ci org as well?
@wzshiming: Sounds good. I'm totally okay with copying this over to a different organization if that is a better place to maintain it.
Sorry, I missed the notice,
On second thought, it doesn't really matter if these are in an organization or not, Maybe we just need to explain how to make these two work together so I don't have to be concerned about maintaining these.
I'll be working on this in the near future.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale
- Close this issue with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale