Add snapshot beta CRD deployment for 1.17#98
Conversation
579ea03 to
ee5fd27
Compare
| : ${CSI_ATTACHER_RBAC:=https://raw.githubusercontent.com/kubernetes-csi/external-attacher/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-attacher.yaml" csi-attacher "${UPDATE_RBAC_RULES}")/deploy/kubernetes/rbac.yaml} | ||
| # TODO: Change back to dynamic path after image is released officially | ||
| CSI_SNAPSHOTTER_RBAC_YAML="https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/master/deploy/kubernetes/rbac.yaml" | ||
| : ${CSI_SNAPSHOTTER_RBAC:=https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/master/deploy/kubernetes/rbac.yaml} |
There was a problem hiding this comment.
So before the snapshot beta PR is merged, the rbac.yaml here won't work. You can create a rbac.yaml temporarily so you can test it manually.
Add the following to the existing rbac.yaml:
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents/status"]
verbs: ["update"]
There was a problem hiding this comment.
We also need to link kubernetes-latest to the 1.17 directory:
https://github.com/kubernetes-csi/csi-driver-host-path/blob/master/deploy/kubernetes-latest
Updated this symlink
| kind: VolumeSnapshotClass | ||
| metadata: | ||
| name: csi-hostpath-snapclass | ||
| snapshotter: hostpath.csi.k8s.io |
There was a problem hiding this comment.
apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshotClass
metadata:
name: csi-hostpath-snapclass
driver: hostpath.csi.k8s.io
deletionPolicy: Delete
There was a problem hiding this comment.
I wonder if we still need to pre-create snapshotclass with the new apis.
|
storageclass.yaml: snapshot.yaml |
ee5fd27 to
7296f9c
Compare
|
We also need to link kubernetes-latest to the 1.17 directory: |
dd5bf59 to
350eb18
Compare
| #: ${CSI_ATTACHER_RBAC:=https://raw.githubusercontent.com/kubernetes-csi/external-attacher/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-attacher.yaml" csi-attacher "${UPDATE_RBAC_RULES}")/deploy/kubernetes/rbac.yaml} | ||
| # TODO: Change back to dynamic path after image is released officially | ||
| #CSI_SNAPSHOTTER_RBAC_YAML="https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/master/deploy/kubernetes/rbac.yaml" | ||
| #: ${CSI_SNAPSHOTTER_RBAC:=https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/master/deploy/kubernetes/rbac.yaml} |
There was a problem hiding this comment.
This one should work now. The snapshot beta API PR is merged and its rbac.yaml is updated.
| containers: | ||
| - name: csi-snapshotter | ||
| # TODO: change to official image when released | ||
| image: quay.io/k8scsi/csi-snapshotter:testsnapshotbeta |
There was a problem hiding this comment.
You can use the following image which is build from the master code:
image: quay.io/k8scsi/csi-snapshotter:canary
| serviceAccountName: csi-provisioner | ||
| containers: | ||
| - name: csi-provisioner | ||
| image: quay.io/k8scsi/csi-provisioner:testsnapshotbeta #v1.4.0-rc1 |
There was a problem hiding this comment.
Please use the following image which uses the merged snapshot beta APIs:
quay.io/k8scsi/csi-provisioner:testsplitcontroller
| @@ -0,0 +1,74 @@ | |||
| --- | |||
There was a problem hiding this comment.
Please update these 3 CRDs using the lates ones here. They are merged into master branch of external-snapshotter now:
https://github.com/kubernetes-csi/external-snapshotter/tree/master/config/crd
There was a problem hiding this comment.
Updated with the latest CRDs
| The sidecars depend on 1.15 API changes for migration and resizing, | ||
| and 1.14 API changes for CSIDriver and CSINode. | ||
| However the hostpath driver doesn't use those features, so this | ||
| deployment can work on older Kubernetes versions. |
There was a problem hiding this comment.
This Readme does not apply any more. Replace this readme with following:
The deployment for Kubernetes 1.17 installs VolumeSnapshot Beta CRDs and thus is imcompatible
with Kubernetes < 1.17 when the VolumeSnapshot CRDs were Alpha.
| #CSI_PROVISIONER_RBAC_YAML="https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-provisioner.yaml" csi-provisioner false)/deploy/kubernetes/rbac.yaml" | ||
| #: ${CSI_PROVISIONER_RBAC:=https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-provisioner.yaml" csi-provisioner "${UPDATE_RBAC_RULES}")/deploy/kubernetes/rbac.yaml} | ||
| #CSI_ATTACHER_RBAC_YAML="https://raw.githubusercontent.com/kubernetes-csi/external-attacher/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-attacher.yaml" csi-attacher false)/deploy/kubernetes/rbac.yaml" | ||
| #: ${CSI_ATTACHER_RBAC:=https://raw.githubusercontent.com/kubernetes-csi/external-attacher/$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-attacher.yaml" csi-attacher "${UPDATE_RBAC_RULES}")/deploy/kubernetes/rbac.yaml} |
There was a problem hiding this comment.
We didn't change these RBAC's. These should just work?
| CSI_PROVISIONER_RBAC_YAML="https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/master/deploy/kubernetes/rbac.yaml" | ||
| : ${CSI_PROVISIONER_RBAC:=https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/master/deploy/kubernetes/rbac.yaml} | ||
| CSI_ATTACHER_RBAC_YAML="https://raw.githubusercontent.com/kubernetes-csi/external-attacher/master/deploy/kubernetes/rbac.yaml" | ||
| : ${CSI_ATTACHER_RBAC:=https://raw.githubusercontent.com/kubernetes-csi/external-attacher/master/deploy/kubernetes/rbac.yaml} |
There was a problem hiding this comment.
I don't think we need these temporary rbac files any more.
| args: | ||
| - -v=5 | ||
| - --csi-address=/csi/csi.sock | ||
| - --connection-timeout=15s |
There was a problem hiding this comment.
This flag is deprecated.
Use kind v0.6.0
…ure can be tested. Test cases that test accessing volumes from multiple nodes need to be skipped
|
Addressed most recent round of feedback @xing-yang @msau42 /test pull-kubernetes-csi-csi-driver-host-path-1-17-on-kubernetes-master |
|
|
||
| kubectl apply -f "https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION}/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml" | ||
| cnt=0 | ||
| expected_running_pods=3 |
There was a problem hiding this comment.
Can we pull the "replicas" value from the deployment file? (It's currently one)
There was a problem hiding this comment.
Updated this.
/test pull-kubernetes-csi-csi-driver-host-path-1-17-on-kubernetes-master
|
Was missing the snapshotclass file in the k8s 1.17 directory. Just re-added it. |
|
lgtm! thanks for all your work on this! |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: msau42, xing-yang The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thanks! I'll update my PR to the release tools repo with the latest prow.sh changes. Once that's merged, I'll update the PR with the final commits. |
Signed-off-by: Grant Griffiths <grant@portworx.com>
|
Here is the PR for these prow.sh changes. Updated it with my latest changes to release-tools/prow.sh |
Enable topology testing with hostpath driver
…ersion_gt Improve snapshot-controller running check and version_gt to support multiple formats
Signed-off-by: Grant Griffiths <grant@portworx.com>
|
Tests seem to failing after I did |
|
My bad, I think it's missing a "\" at the end |
|
Updated with the fix to build.make |
|
/test pull-kubernetes-csi-csi-driver-host-path-1-17-on-kubernetes-master |
|
Seems like a change is incompatible with I just re-ran the following on a local k8s 1.16 cluster @msau42 do you know of any other prow.sh or test-infra changes that may cause this test to fail? |
Looks like the volume got provisioned on node csi-prow-worker2, but the Pod got scheduled on csi-prow-worker: |
| image: quay.io/k8scsi/csi-provisioner:v1.5.0-rc1 | ||
| args: | ||
| - -v=5 | ||
| - --csi-address=/csi/csi.sock |
There was a problem hiding this comment.
Ah you're missing the "--feature-gates=Topology=true" flag
There was a problem hiding this comment.
Nice catch 👍 Will add now.
Signed-off-by: Grant Griffiths <grant@portworx.com>
|
/test pull-kubernetes-csi-csi-driver-host-path-1-17-on-kubernetes-master |
|
Looks like that did the job! Thanks @msau42 ! All tests are passing now. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds snapshot beta CRD deployment for 1.17.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Note: This PR is not ready for review.
Does this PR introduce a user-facing change?: