ccremer / kubernetes-zfs-provisioner

Dynamic ZFS persistent volume provisioner for Kubernetes
Apache License 2.0
80 stars 7 forks source link

Add support for annotations in StorageClasses #87

Closed morganchristiansson closed 2 years ago

morganchristiansson commented 2 years ago

Summary

Add storageClass.classes.defaultClass

Fixes #86

morganchristiansson commented 2 years ago

I'm unable to add labels to the issue. It should have: kind:enhancement area:provisioner area:chart chart:kubernetes-zfs-provisioner

morganchristiansson commented 2 years ago

I accepted all your changes and rebased them into 1 commit. Changes work as expected on deploying to my local cluster. kubectl get storageclass shows correct entry as default.

NAME                PROVISIONER            RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
hostpath            hostpath               Delete          Immediate           false                  4h2m
traktor (default)   pv.kubernetes.io/zfs   Delete          Immediate           false                  254d
puma                pv.kubernetes.io/zfs   Delete          Immediate           false                  254d
storageClass:
  create: true
  classes:
    - name: traktor
      hostName: morgan-server.lan
      parentDataset: traktor/kubernetes
      annotations:
        storageclass.kubernetes.io/is-default-class: "true"
      policy: "Delete"
      shareProperties: rw,no_root_squash
      type: "nfs"
      node: morgan-server
    - name: puma
      hostName: morgan-server.lan
      parentDataset: puma/kubernetes
      policy: "Delete"
      shareProperties: rw,no_root_squash
      type: "nfs"
      node: morgan-server
ccremer commented 2 years ago

Nice! Thanks, releasing soon