Skip to content

Commit

Permalink
TrueNAS CORE CSP v1.4.0 (#4)
Browse files Browse the repository at this point in the history
Signed-off-by: datamattsson <[email protected]>
  • Loading branch information
datamattsson authored Jan 11, 2021
1 parent 43725cf commit 4bbadcf
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 14 deletions.
23 changes: 12 additions & 11 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ These procedures assumes a running Kubernetes cluster [supported by the HPE CSI

## Prerequisites

- HPE CSI Driver for Kubernetes version 1.3.0 or later
- HPE CSI Driver for Kubernetes version 1.4.0 or later
- TrueNAS CORE 12 BETA or later

### HPE CSI Driver for Kubernetes
Expand All @@ -14,14 +14,15 @@ The HPE CSI Driver may be installed using either a Helm Chart, Operator or direc
Install the TrueNAS CORE CSP:

```
kubectl create -f https://raw.githubusercontent.com/hpe-storage/truenas-csp/master/K8s/v1.3.0/truenas-csp.yaml
kubectl create ns hpe-storage
kubectl create -f https://raw.githubusercontent.com/hpe-storage/truenas-csp/master/K8s/v1.4.0/truenas-csp.yaml
```

Install HPE CSI Driver:

```
kubectl create -f https://raw.githubusercontent.com/hpe-storage/co-deployments/master/yaml/csi-driver/v1.3.0/hpe-linux-config.yaml
kubectl create -f https://raw.githubusercontent.com/hpe-storage/co-deployments/master/yaml/csi-driver/v1.3.0/hpe-csi-k8s-1.18.yaml
kubectl create -f https://raw.githubusercontent.com/hpe-storage/co-deployments/master/yaml/csi-driver/v1.4.0/hpe-linux-config.yaml
kubectl create -f https://raw.githubusercontent.com/hpe-storage/co-deployments/master/yaml/csi-driver/v1.4.0/hpe-csi-k8s-1.20.yaml
```

**Note:** Replace `hpe-csi-k8s-<version>.yaml` with your version of Kubernetes. Also change the version of the HPE CSI Driver manifests where applicable. Using mismatching versions of the TrueNAS CORE CSP and the HPE CSI Driver will most likely **NOT** work.
Expand All @@ -34,7 +35,7 @@ apiVersion: v1
kind: Secret
metadata:
name: truenas-secret
namespace: kube-system
namespace: hpe-storage
stringData:
serviceName: truenas-csp-svc
servicePort: "8080"
Expand Down Expand Up @@ -78,7 +79,7 @@ All the ZVols created on TrueNAS will by default be created with these parameter
- description: "Dataset created by HPE CSI Driver for Kubernetes"
- root: tank

These parameters may be overriden in the `StorageClass` or have the defaults altered by passing enviornment variables to the CSP runtime with the convention of `DEFAULT_COMPRESSION=OFF`.
These parameters may be overriden in the `StorageClass` or have the defaults altered by passing environment variables to the CSP runtime with the convention of `DEFAULT_COMPRESSION=OFF`.

Refer to the TrueNAS CORE documentation what these dataset parameters do.

Expand All @@ -95,15 +96,15 @@ metadata:
provisioner: csi.hpe.com
parameters:
csi.storage.k8s.io/controller-expand-secret-name: truenas-secret
csi.storage.k8s.io/controller-expand-secret-namespace: kube-system
csi.storage.k8s.io/controller-expand-secret-namespace: hpe-storage
csi.storage.k8s.io/controller-publish-secret-name: truenas-secret
csi.storage.k8s.io/controller-publish-secret-namespace: kube-system
csi.storage.k8s.io/controller-publish-secret-namespace: hpe-storage
csi.storage.k8s.io/node-publish-secret-name: truenas-secret
csi.storage.k8s.io/node-publish-secret-namespace: kube-system
csi.storage.k8s.io/node-publish-secret-namespace: hpe-storage
csi.storage.k8s.io/node-stage-secret-name: truenas-secret
csi.storage.k8s.io/node-stage-secret-namespace: kube-system
csi.storage.k8s.io/node-stage-secret-namespace: hpe-storage
csi.storage.k8s.io/provisioner-secret-name: truenas-secret
csi.storage.k8s.io/provisioner-secret-namespace: kube-system
csi.storage.k8s.io/provisioner-secret-namespace: hpe-storage
csi.storage.k8s.io/fstype: xfs
allowOverrides: sparse,compression,deduplication,volblocksize,sync,description
root: zwimming/csi-volumes
Expand Down
25 changes: 25 additions & 0 deletions K8s/v1.4.0/hpe-storageclass-nfs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
storageclass.kubernetes.io/is-default-class: "false"
name: hpe-standard-nfs
provisioner: csi.hpe.com
parameters:
csi.storage.k8s.io/controller-expand-secret-name: truenas-secret
csi.storage.k8s.io/controller-expand-secret-namespace: hpe-storage
csi.storage.k8s.io/controller-publish-secret-name: truenas-secret
csi.storage.k8s.io/controller-publish-secret-namespace: hpe-storage
csi.storage.k8s.io/node-publish-secret-name: truenas-secret
csi.storage.k8s.io/node-publish-secret-namespace: hpe-storage
csi.storage.k8s.io/node-stage-secret-name: truenas-secret
csi.storage.k8s.io/node-stage-secret-namespace: hpe-storage
csi.storage.k8s.io/provisioner-secret-name: truenas-secret
csi.storage.k8s.io/provisioner-secret-namespace: hpe-storage
csi.storage.k8s.io/fstype: xfs
nfsResources: "true"
allowOverrides: sparse,compression,deduplication,volblocksize,sync,description
root: zwimming/csi-volumes
reclaimPolicy: Delete
allowVolumeExpansion: true
24 changes: 24 additions & 0 deletions K8s/v1.4.0/hpe-storageclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
storageclass.kubernetes.io/is-default-class: "true"
name: hpe-standard
provisioner: csi.hpe.com
parameters:
csi.storage.k8s.io/controller-expand-secret-name: truenas-secret
csi.storage.k8s.io/controller-expand-secret-namespace: hpe-storage
csi.storage.k8s.io/controller-publish-secret-name: truenas-secret
csi.storage.k8s.io/controller-publish-secret-namespace: hpe-storage
csi.storage.k8s.io/node-publish-secret-name: truenas-secret
csi.storage.k8s.io/node-publish-secret-namespace: hpe-storage
csi.storage.k8s.io/node-stage-secret-name: truenas-secret
csi.storage.k8s.io/node-stage-secret-namespace: hpe-storage
csi.storage.k8s.io/provisioner-secret-name: truenas-secret
csi.storage.k8s.io/provisioner-secret-namespace: hpe-storage
csi.storage.k8s.io/fstype: xfs
allowOverrides: sparse,compression,deduplication,volblocksize,sync,description
root: zwimming/csi-volumes
reclaimPolicy: Delete
allowVolumeExpansion: true
38 changes: 38 additions & 0 deletions K8s/v1.4.0/truenas-csp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
kind: Service
apiVersion: v1
metadata:
name: truenas-csp-svc
namespace: hpe-storage
labels:
app: truenas-csp-svc
spec:
ports:
- port: 8080
protocol: TCP
selector:
app: truenas-csp

---
kind: Deployment
apiVersion: apps/v1
metadata:
name: truenas-csp
namespace: hpe-storage
spec:
selector:
matchLabels:
app: truenas-csp
replicas: 1
template:
metadata:
labels:
app: truenas-csp
spec:
priorityClassName: system-cluster-critical
containers:
- name: truenas-csp
image: quay.io/datamattsson/truenas-csp:v1.4.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
12 changes: 12 additions & 0 deletions K8s/v1.4.0/truenas-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: v1
kind: Secret
metadata:
name: truenas-secret
namespace: hpe-storage
stringData:
serviceName: truenas-csp-svc
servicePort: "8080"
username: hpe-csi
password: TrueNAS CORE API key
backend: TrueNAS CORE management IP address
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CSP API endpoints:

The [CSP specification](https://github.com/hpe-storage/container-storage-provider) in an open specification that supports iSCSI and Fibre Channel protocols.

As of version 1.3.0 of the HPE CSI Driver, these parts of the CSI spec are currently implemented:
As of version 1.4.0 of the HPE CSI Driver, these parts of the CSI spec are currently implemented:

- Dynamic Provisioning
- Raw Block Volume
Expand All @@ -28,6 +28,7 @@ Volume stats and topology are the two CSI features currently not supported by th

Releases will track the upstream versioning of the HPE CSI Driver for Kubernetes and potential bugfixes in the TrueNAS CORE CSP will be pushed to the same image tag matching the HPE CSI Driver version.

* [TrueNAS CORE CSP v1.4.0](https://github.com/hpe-storage/truenas-csp/releases/tag/v1.4.0) for HPE CSI Driver v1.4.0
* [TrueNAS CORE CSP v1.3.0](https://github.com/hpe-storage/truenas-csp/releases/tag/v1.3.0) for HPE CSI Driver v1.3.0

# Install
Expand Down Expand Up @@ -90,11 +91,11 @@ The TrueNAS CORE CSP is not the only enabler of TrueNAS CORE for Kubernetes.

# License

TrueNAS CORE(R) (C) 2020 iXsystems, Inc.
TrueNAS CORE(R) (C) 2021 iXsystems, Inc.

TrueNAS CORE CSP is released under the [MIT License](LICENSE).

(C) Copyright 2020 Hewlett Packard Enterprise Development LP.
(C) Copyright 2021 Hewlett Packard Enterprise Development LP.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
13 changes: 13 additions & 0 deletions test-driver-rwx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
StorageClass:
FromExistingClassName: "hpe-standard-nfs"
ClaimSize: "1Gi"
DriverInfo:
Name: csi.hpe.com
Capabilities:
block: false
controllerExpansion: false
exec: true
multipods: true
persistence: true
pvcDataSource: false
snapshotDataSource: false
1 change: 1 addition & 0 deletions test-driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ StorageClass:
FromExistingClassName: "hpe-standard"
SnapshotClass:
FromExistingClassName: "hpe-snapshot"
ClaimSize: "1Gi"
DriverInfo:
Name: csi.hpe.com
Capabilities:
Expand Down

0 comments on commit 4bbadcf

Please sign in to comment.