Skip to content

[question] should I manually apply CRD after upgrade to 2.0.0? #277

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

Closed
jichenjc opened this issue Mar 17, 2020 · 22 comments
Closed

[question] should I manually apply CRD after upgrade to 2.0.0? #277

jichenjc opened this issue Mar 17, 2020 · 22 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@jichenjc
Copy link

previous in cloud-provider-openstack we used 1.2.2 version seems we don't need apply CRD from snapshoter

but when I upgrade to 2.0.1, I start to see logs
kubernetes/cloud-provider-openstack#974

root@jck8s4:~/go/src/github.com/cloud-provider-openstack# kubectl logs csi-cinder-nodeplugin-6w6gp -n kube-system -c csi-snapshotter | head
I0317 09:09:22.722966       1 main.go:89] Version: v2.0.1-0-g69da5b8d
I0317 09:09:22.724607       1 connection.go:153] Connecting to unix:///var/lib/csi/sockets/pluginproxy/csi.sock
W0317 09:09:24.613018       1 metrics.go:142] metrics endpoint will not be started because `metrics-address` was not specified.
I0317 09:09:24.613037       1 common.go:111] Probing CSI driver for readiness
I0317 09:09:24.925491       1 snapshot_controller_base.go:115] Starting CSI snapshotter
E0317 09:09:24.934291       1 reflector.go:156] github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/factory.go:117: Failed to list *v1beta1.VolumeSnapshotContent: volumesnapshotcontents.snapshot.storage.k8s.io is forbidden: User "system:serviceaccount:kube-system:csi-cinder-node-sa" cannot list resource "volumesnapshotcontents" in API group "snapshot.storage.k8s.io" at the cluster scope
E0317 09:09:24.934512       1 reflector.go:156] github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/factory.go:117: Failed to list *v1beta1.VolumeSnapshotClass: volumesnapshotclasses.snapshot.storage.k8s.io is forbidden: User "system:serviceaccount:kube-system:csi-cinder-node-sa" cannot list resource "volumesnapshotclasses" in API group "snapshot.storage.k8s.io" at the cluster scope
E0317 09:09:25.935746       1 reflector.go:156] github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/factory.go:117: Failed to list *v1beta1.VolumeSnapshotContent: volumesnapshotcontents.snapshot.storage.k8s.io is forbidden: User "system:serviceaccount:kube-system:csi-cinder-node-sa" cannot list resource "volumesnapshotcontents" in API group "snapshot.storage.k8s.io" at the cluster scope
E0317 09:09:25.936787       1 reflector.go:156] github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/factory.go:117: Failed to list *v1beta1.VolumeSnapshotClass: volumesnapshotclasses.snapshot.storage.k8s.io is forbidden: User "system:serviceaccount:kube-system:csi-cinder-node-sa" cannot list resource "volumesnapshotclasses" in API group "snapshot.storage.k8s.io" at the cluster scope

I applied config/crd/*.yaml in this repo then everything is fine
should I manually apply this or I have some configuration error when upgrade to 2.0.1? thanks

@zhucan
Copy link
Member

zhucan commented Mar 17, 2020

@jichenjc You need to delete the old CRD and apply the "config/crd/*.yaml".

@jichenjc
Copy link
Author

my k8s is fresh new env through hack command ..

ALLOW_PRIVILEGED=true RUNTIME_CONFIG="storage.k8s.io/v1=true" LOG_LEVEL=5 hack/local-up-cluster.sh

previously I don't need create CRD and now I need create CRD , correct? and is there any links so that I can apply on the fly?
otherwise I need download source code and apply? which mean it might out of sync... thanks

@zhucan
Copy link
Member

zhucan commented Mar 17, 2020

Before the v2.0.0(it's alpha), we needn't to create crd,Because when the snapshotter sidecar running, it will create the crd in default. After the v2.0.0(it's beta), we should create the crd by the yaml, If you k8s cluster has old crd, you need to delete it.

@zhucan
Copy link
Member

zhucan commented Mar 17, 2020

@jichenjc Take a look at this, #147

@jichenjc
Copy link
Author

perfect, that's what I need , thanks a lot

the only question is where to apply those CRDs? usually you can apply on line ,but apply the master branch directly is not a good idea ...
https://github.com/kubernetes-csi/external-snapshotter/releases doesn't have this kind of CRD

@jichenjc
Copy link
Author

Sorry, I mean follwing is what I need

Before the v2.0.0(it's alpha), we needn't to create crd,Because when the snapshotter sidecar running, it will create the crd in default. After the v2.0.0(it's beta), we should create the crd by the yaml, If you k8s cluster has old crd, you need to delete it.

#147 seems not related because https://github.com/kubernetes-csi/external-snapshotter/releases told us v2.0.0 is Jan this year while the question #147 is July last year

@zhucan
Copy link
Member

zhucan commented Mar 17, 2020

What's version do you want to use?

@jichenjc
Copy link
Author

latest one.. v2.0.1 ,thanks a lot

@zhucan
Copy link
Member

zhucan commented Mar 17, 2020

@jichenjc
Copy link
Author

ok, got it ,thanks~

@jichenjc
Copy link
Author

could you please let me know whether we have plan to put CRD into release?
otherwise ,I will take https://github.com/kubernetes-csi/external-snapshotter/tree/v2.0.1/config/crd into our doc..

@jichenjc
Copy link
Author

@yuxiangqian
Copy link
Contributor

@jichenjc on top of what @zhucan has pointed out, in VolumeSnapshot BETA, there will be two controllers in your cluster (in Alpha it was only one). Details could be found in here. In short:

  1. snapshot controller, which is per-cluster. Its responsible for managing VolumeSnapshot and VSC binding, status update etc. CRDs COULD be installed along with this controller.
  2. sidecar controller, which is per-storage-vendor with CSI driver. It's responsible for snapshot creation/deletion via CSI calls.

looks to me you were only trying to install the sidecar controller. is the snapshot controller available (see addon)?

@jichenjc
Copy link
Author

jichenjc commented Mar 25, 2020

@xing-yang
Copy link
Collaborator

@jichenjc To use snapshot v2.0.1, you can install CRDs from the following location:
https://github.com/kubernetes-csi/external-snapshotter/tree/release-2.0/config/crd

The addon is for in-tree testing purpose.

@jichenjc
Copy link
Author

jichenjc commented Mar 25, 2020

@xing-yang thanks , as previous mentioned, I understand I can download file from given places
but it's html format now.. not convenient for end user (e.g I need document user how to apply thoes CRD)

# kubectl apply -f https://github.com/kubernetes-csi/external-snapshotter/tree/release-2.0/config/crd
error: error parsing https://github.com/kubernetes-csi/external-snapshotter/tree/release-2.0/config/crd: error converting YAML to JSON: yaml: line 114: mapping values are not allowed in this context

@xing-yang
Copy link
Collaborator

@jichenjc Please check the usage section of README: https://github.com/kubernetes-csi/external-snapshotter/blob/master/README.md#usage

Snapshot controller should not install the CRDs. It should be the k8s distro that deploys the CRDs and the snapshot controller.

@jichenjc
Copy link
Author

@xing-yang thanks, I will read this and get back here later on

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 25, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 25, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants