Skip to content
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

[BUG] CloneSet requires dataSource #301

Closed
billonahill opened this issue Jun 29, 2020 · 5 comments · Fixed by #310
Closed

[BUG] CloneSet requires dataSource #301

billonahill opened this issue Jun 29, 2020 · 5 comments · Fixed by #310
Assignees
Labels
kind/bug Something isn't working

Comments

@billonahill
Copy link

What happened:
Applied a CloneSet without a dataSource and got this error:

The CloneSet "testcloneset" is invalid: spec.volumeClaimTemplates.spec.dataSource: Invalid value: "null": spec.volumeClaimTemplates.spec.dataSource in body must be of type object: "null"
Error: exit status 1

What you expected to happen:
The config is applied.

How to reproduce it (as minimally and precisely as possible):
Apply a CloneSet config that does not include spec.volumeClaimTemplates.spec.dataSource.

Anything else we need to know?:
Link to slack discussion:
https://kruise-workspace.slack.com/archives/CK5G41AF3/p1593025696007200

Environment:

  • Kruise version: observed in 0.4.1, 0.5.0
  • Kubernetes version (use kubectl version): 1.18
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@billonahill billonahill added the kind/bug Something isn't working label Jun 29, 2020
@reverson
Copy link
Contributor

We install the CRD from here, which has the dataSource requirement I believe: https://github.com/openkruise/kruise/blob/master/config/crds/apps.kruise.io_clonesets.yaml

Versus the one from here that does not have the CRD: https://github.com/openkruise/kruise/blob/master/charts/kruise/v0.5.0/templates/apps_v1alpha1_cloneset.yaml

@Fei-Guo
Copy link
Member

Fei-Guo commented Jul 3, 2020

This seems to be a controller-tools problem. We have filed this issue to track

kubernetes-sigs/controller-tools#457

By the mean time, we may add a temporal script to manually workaround this problem. @FillZpp.

@FillZpp
Copy link
Member

FillZpp commented Jul 6, 2020

I have submitted a PR kubernetes-sigs/controller-tools#460 for controller-tools.

If it can not be released in the short term, I will use a kruise-fork controller-tools to fix it for a while.

@shiyan2016
Copy link
Member

@FillZpp It happened when I applied cloneset with pvcs. And when I apply the new crd yaml. The problem still exists. Since I delete and recreate the crd, it repaired. But this will cause the cloneset object deleted.

@FillZpp
Copy link
Member

FillZpp commented Aug 10, 2020

@shiyan2016 You may replace the crd yaml using kubectl replace instead of applying it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants