Cinder

apiVersion: v1
kind: Secret
metadata:
  name: sharesecret
data:
  share_secret: "bW91bnQuaG9zdDovcGF0aA==" # this is "mount.host:/path"
---
apiVersion: yaook.cloud/v1
kind: CinderDeployment
metadata:
  name: cinder
spec:
  keystoneRef:
    name: keystone
  database:
    replicas: 1
    proxy:
      replicas: 1
    backup:
      schedule: "0 * * * *"
  messageQueue:
    replicas: 1
  api:
    replicas: 1
    ingress:
      fqdn: "cinder.yaook.cloud"
      port: 32443
  scheduler:
    replicas: 1
  volume:
    replicas: 1
  cinderConfig:
    DEFAULT:
      debug: True
  policy:
    "context_is_admin": "role:admin"
  backends:
    - name: ceph
      rbd:
        keyringReference: cinder-client-key
        keyringUsername: cinder
        backendConfig:
          backend_host: hostname
          rbd_pool: cinder-pool
          rbd_secret_uuid: "b3ab713d-912b-49ed-adaf-bd74368e567a"
#        cephConfig:
#          "mon host": "rook-ceph-mon-a.rook-ceph:6789,rook-ceph-mon-b.rook-ceph:6789,rook-ceph-mon-c.rook-ceph:6789"
  backup:
    mycinderbackup:
      cinderConfig:
        DEFAULT:
          backup_driver: cinder.backup.drivers.nfs.NFSBackupDriver
          backup_file_size: 134217728
          backup_mount_options: noatime,vers=4.1,proto=tcp,hard,intr,nolock
          default_availability_zone: az-1
      cinderSecrets:
        - items:
          - key: share_secret
            path: /DEFAULT/backup_share
          secretName: sharesecret
    myothercinderbackup:
      cinderConfig:
        DEFAULT:
          backup_driver: cinder.backup.drivers.nfs.NFSBackupDriver
          backup_file_size: 134217728
          backup_mount_options: noatime,vers=4.1,proto=tcp,hard,intr,nolock
          default_availability_zone: az-2
      cinderSecrets:
        - items:
          - key: share_secret
            path: /DEFAULT/backup_share
          secretName: sharesecret
  region:
    name: MyRegion
  issuerRef:
    name: ca-issuer
  databaseCleanup:
    schedule: "0 0 * * *"
    deletionTimeRange: 60
  targetRelease: queens

Cinder using Netapp

apiVersion: v1
kind: Secret
metadata:
  name: cinder-netapp-password
data:
  password: SGVsbG9Xb3JsZCE=
---
apiVersion: yaook.cloud/v1
kind: CinderDeployment
metadata:
  name: cinder-netapp
spec:
  keystoneRef:
    name: keystone
  database:
    replicas: 1
    proxy:
      replicas: 1
    backup:
      schedule: "0 * * * *"
  messageQueue:
    replicas: 1
  api:
    replicas: 1
    ingress:
      fqdn: "cinder.yaook.cloud"
      port: 32443
  scheduler:
    replicas: 1
  volume:
    replicas: 1
  cinderConfig:
    DEFAULT:
      debug: True
      enabled_backends:
        - netapp_svm01
        - netapp_svm02
  policy:
    "context_is_admin": "role:admin"
  backends:
    - name: netapp_svm01
      netapp:
        login: openstack
        passwordReference: cinder-netapp-password
        server: netapp-api-endpoint
        vserver: svm01
        # binary must use the key na_copyoffload_64 in the configmap
        copyoffloadConfigMap: netapp-copyoffload
        shares:
          - svm01.yaook.cloud:/openstack01
          - svm01.yaook.cloud:/openstack02
    - name: netapp_svm02
      netapp:
        login: openstack
        passwordReference: cinder-netapp-password
        server: netapp-api-endpoint
        vserver: svm02
        shares:
          - svm02.yaook.cloud:/openstack01
          - svm02.yaook.cloud:/openstack02
  backup: {}
  region:
    name: MyRegion
  issuerRef:
    name: ca-issuer
  targetRelease: queens

The configmap that contains the netapp copyoffload tool can be created using this command: kubectl create configmap netapp-copyoffload --from-file na_copyoffload_64