loft-sh / vcluster

vCluster - Create fully functional virtual Kubernetes clusters - Each vcluster runs inside a namespace of the underlying k8s cluster. It's cheaper than creating separate full-blown clusters and it offers better multi-tenancy and isolation than regular namespaces.
https://www.vcluster.com
Apache License 2.0
6.93k stars 428 forks source link

feat: coredns pod supports affinity and stain tolerance #2107

Closed mayooot closed 2 months ago

mayooot commented 2 months ago

I want to add tolerance and taint for coredns pod, I have verified it in the development environment but we are using v0.18.1 version of chart.

image image
netlify[bot] commented 2 months ago

Deploy Preview for vcluster-docs canceled.

Built without sensitive environment variables

Name Link
Latest commit 16f462fdb4e898fc8029398e7a6268f925b58e96
Latest deploy log https://app.netlify.com/sites/vcluster-docs/deploys/66e1141cc45b3400089e6117
mayooot commented 2 months ago

@mayooot thanks for creating this PR! Can you add the changes to https://github.com/loft-sh/vcluster/blob/main/config/config.go and then run the script go run hack/schema/main.go to generate the values.yaml and schema correctly? Also would be good if you can add a small helm unit test for your change, then I can merge it!

@FabianKramm OK, I've updated config.go, and written a helm test case.

This is the first time I've written a helm unit test, and since there are no test examples for affinity and tolerations in project, there may be errors, look coredns-configmap_test.yaml

Another thing that confuses me is that after I modify config.go and run go run hack/schema/main.go, values.schema.json has been changed, but values.yaml does not.

FabianKramm commented 2 months ago

@mayooot thanks a lot! LGTM now, the only remaining issue is that you need to add your values.yaml changes to config/values.yaml as that will be used to generate chart/values.yaml.

mayooot commented 2 months ago

@mayooot thanks a lot! LGTM now, the only remaining issue is that you need to add your values.yaml changes to config/values.yaml as that will be used to generate chart/values.yaml.

@FabianKramm ok, I'm done