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

Automatically deploy CSI plugin and driver for supported providers, and add support for OpenStack Cinder CSI #1465

Merged
merged 4 commits into from
Aug 24, 2021

Conversation

xmudrii
Copy link
Member

@xmudrii xmudrii commented Aug 23, 2021

What this PR does / why we need it:

This PR introduces the following changes:

  • OpenStack CCM version now depends on the Kubernetes version
    • Clusters running Kubernetes v1.17 and older will use OpenStack CCM v1.17, while newer clusters will use the recommended CCM version (e.g. 1.22 clusters will use CCM v1.22.0)
    • This ensures our users can use the latest features, while still respecting the compatibility matrix proposed by the OpenStack CCM team
  • Deploy CSI plugin for supported clusters by default
    • Currently, this is supported only for Hetzner and OpenStack
    • The StorageClass is not created by default, so the user should do that manually
  • Add support for OpenStack Cinder CSI plugin/driver
    • The minimum cluster version for OpenStack Cinder CSI is v1.17.0

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Relevant and required for #1451

Special notes for your reviewer:

I've used the following manifest to test the Cinder CSI plugin. I've tested it on 1.17 and 1.22 clusters. Other versions will follow up.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
    storageclass.beta.kubernetes.io/is-default-class: "true"
  labels:
    kubernetes.io/cluster-service: "true"
  name: cinder-csi
provisioner: cinder.csi.openstack.org
volumeBindingMode: WaitForFirstConsumer
---
# Source: https://github.com/kubernetes/cloud-provider-openstack/blob/master/examples/cinder-csi-plugin/resize/example.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: csi-pvc-cinderplugin
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  storageClassName: cinder-csi
---
apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  containers:
  - image: nginx
    imagePullPolicy: IfNotPresent
    name: nginx
    ports:
    - containerPort: 80
      protocol: TCP
    volumeMounts:
      - mountPath: /var/lib/www/html
        name: csi-data-cinderplugin
  volumes:
  - name: csi-data-cinderplugin
    persistentVolumeClaim:
      claimName: csi-pvc-cinderplugin
      readOnly: false

Does this PR introduce a user-facing change?:

* OpenStack CCM version now depends on the Kubernetes version. Clusters running Kubernetes v1.17 and older will use OpenStack CCM v1.17, while newer clusters will use the recommended CCM version (e.g. 1.22 clusters will use CCM v1.22.0)
* Deploy CSI plugin for supported clusters by default. Currently, this is supported for Hetzner and OpenStack (the minimum cluster version for OpenStack is v1.17.0). The StorageClass is not created by default, so the user should do that manually.
* Add support for OpenStack Cinder CSI plugin/driver

/assign @kron4eg
/hold
for additional manual testing

Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
@xmudrii xmudrii requested a review from kron4eg August 23, 2021 21:16
@kubermatic-bot kubermatic-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. labels Aug 23, 2021
@kubermatic-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xmudrii

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 23, 2021
@xmudrii xmudrii marked this pull request as ready for review August 23, 2021 22:04
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 23, 2021
@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 24, 2021
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 4ca5fb5a8aee6a5759d7edf902aba4a057d487cf

@xmudrii
Copy link
Member Author

xmudrii commented Aug 24, 2021

/hold cancel

@kubermatic-bot kubermatic-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 24, 2021
@kubermatic-bot kubermatic-bot merged commit 167185f into master Aug 24, 2021
@kubermatic-bot kubermatic-bot added this to the KubeOne 1.3 milestone Aug 24, 2021
@kubermatic-bot kubermatic-bot deleted the cinder-csi-addon branch August 24, 2021 12:37
hwuethrich added a commit to hwuethrich/kubeone that referenced this pull request Aug 26, 2021
* upstream/master:
  Increase the minimum Kubernetes version to v1.19 (kubermatic#1466)
  Automatically deploy CSI plugin and driver for supported providers, and add support for OpenStack Cinder CSI (kubermatic#1465)
  Add support for versioned images (kubermatic#1463)
  Add changelog for v1.3.0-alpha.1 release (kubermatic#1460)
  Use kubeadm/v1beta3 API for Kubernetes 1.22+ clusters (kubermatic#1457)
  Enable PodSecurity admission controller for 1.22 clusters (kubermatic#1456)
  Add Kubernetes 1.22 tests and remove 1.18 tests (kubermatic#1447)
  Extend restart API server script to handle failing crictl logs (kubermatic#1448)
  Remove upx from the kubeone-e2e image (kubermatic#1443)
  terraform/vsphere: Inherit firmware settings from the template VM (kubermatic#1445)
  Update machine-controller to v1.35.1 (kubermatic#1440)
  Redirect push-e2e-image job failures to the appropriate channel (kubermatic#1442)
  Update images (kubermatic#1441)
  Azure CCM (kubermatic#1438)
  Upgrade machine-controller to v1.35.0 (kubermatic#1437)
  Check if unzip is present on the current system. (kubermatic#1435)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants