Skip to content

Commit

Permalink
v2.4.0 (#46)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Mattsson <[email protected]>
  • Loading branch information
datamattsson authored Oct 10, 2023
1 parent 3ff5d9a commit 1657b8f
Show file tree
Hide file tree
Showing 19 changed files with 255 additions and 21 deletions.
25 changes: 25 additions & 0 deletions K8s/edge/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/edge/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/edge/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:edge
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
12 changes: 12 additions & 0 deletions K8s/edge/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 (username is a no-op)
password: API key or root password of TrueNAS/FreeNAS appliance
backend: Management IP address of TrueNAS/FreeNAS appliance
25 changes: 25 additions & 0 deletions K8s/v2.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/v2.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/v2.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:v2.4.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
12 changes: 12 additions & 0 deletions K8s/v2.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 (username is a no-op)
password: API key or root password of TrueNAS/FreeNAS appliance
backend: Management IP address of TrueNAS/FreeNAS appliance
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
ifndef IMAGE_TAG
IMAGE_TAG ?= edge
endif

ifndef REPO_NAME
REPO_NAME ?= quay.io/datamattsson/truenas-csp
endif

username = hpe-csi
csp = http://localhost:8080
curl = curl
Expand All @@ -6,11 +14,13 @@ curl_args = '-v'
all:
python3 -m py_compile truenascsp/*.py
rm -rf truenascsp/__pycache__
docker build -t quay.io/datamattsson/truenas-csp:edge .

docker build -t $(REPO_NAME):$(IMAGE_TAG) .
push:
docker buildx build --platform=linux/amd64,linux/arm64 --progress=plain \
--provenance=false --push -t $(REPO_NAME):$(IMAGE_TAG) .
run:
docker rm -f truenas-csp || true
docker run -d -p8080:8080 --name truenas-csp -e LOG_DEBUG=1 quay.io/datamattsson/truenas-csp:edge
docker run -d -p8080:8080 --name truenas-csp -e LOG_DEBUG=1 $(REPO_NAME):$(IMAGE_TAG)

test:
# Delete host
Expand Down
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Topology is currently not supported by the HPE CSI Driver.

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

* [TrueNAS CSP v2.4.0](https://github.com/hpe-storage/truenas-csp/releases/tag/v2.4.0) for HPE CSI Driver v2.4.0
* [TrueNAS CSP v2.3.10](https://github.com/hpe-storage/truenas-csp/releases/tag/v2.3.10) for HPE CSI Driver v2.3.0
* [TrueNAS CSP v2.3.0](https://github.com/hpe-storage/truenas-csp/releases/tag/v2.3.0) for HPE CSI Driver v2.3.0
* [TrueNAS CSP v2.2.0](https://github.com/hpe-storage/truenas-csp/releases/tag/v2.2.0) for HPE CSI Driver v2.2.0
Expand Down Expand Up @@ -80,15 +81,6 @@ make clean

**Note:** FreeNAS, TrueNAS CORE and SCALE should pass all tests when configured properly.

## Multiarch build

Since v2.3.0 a multi-arch image is made available, to build locally:

```
docker buildx build --progress=plain --platform=linux/amd64,linux/arm64 \
--provenance=false --push -t truenas-csp:v0.0.0 .
```

# Limitations

These are the known limitations.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This page intentionally left blank.

(C) Copyright 2021 Hewlett Packard Enterprise Development LP.
(C) Copyright 2023 Hewlett Packard Enterprise Development LP.
35 changes: 34 additions & 1 deletion docs/index.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
apiVersion: v1
entries:
truenas-csp:
- annotations:
artifacthub.io/license: MIT
artifacthub.io/links: |
- name: HPE CSI Driver for Kubernetes
url: https://scod.hpedev.io
- name: Install
url: https://github.com/hpe-storage/truenas-csp/blob/master/INSTALL.md
artifacthub.io/prerelease: "false"
apiVersion: v2
appVersion: 2.4.0
created: "2023-10-10T00:04:32.482481271Z"
dependencies:
- name: hpe-csi-driver
repository: https://hpe-storage.github.io/co-deployments
version: 2.4.0
description: TrueNAS Container Storage Provider Helm chart for Kubernetes
digest: 0e7e477e86c500aa3f91ac98fac2e32e985913c9f5f2692e9257feb8f8021810
home: https://github.com/hpe-storage/truenas-csp
icon: https://hpe-storage.github.io/truenas-csp/assets/icon.svg
keywords:
- HPE
- Storage
- CSI
maintainers:
- email: [email protected]
name: Michael Mattsson
name: truenas-csp
sources:
- https://github.com/hpe-storage/truenas-csp
type: application
urls:
- truenas-csp-1.1.5.tgz
version: 1.1.5
- annotations:
artifacthub.io/license: MIT
artifacthub.io/links: |
Expand Down Expand Up @@ -199,4 +232,4 @@ entries:
urls:
- truenas-csp-1.0.0.tgz
version: 1.0.0
generated: "2023-05-07T18:50:16.383697211-07:00"
generated: "2023-10-10T00:04:32.481206987Z"
Binary file added docs/truenas-csp-1.1.5.tgz
Binary file not shown.
6 changes: 3 additions & 3 deletions helm/charts/truenas-csp/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: hpe-csi-driver
repository: https://hpe-storage.github.io/co-deployments
version: 2.3.0
digest: sha256:57a763b1bec68af08c6dca0e9cdced1241eea9aae39481e95843c26784900526
generated: "2023-05-03T09:32:56.697808632-07:00"
version: 2.4.0
digest: sha256:bdd21bdd2c3c36bc45fb521b0e762b9272fa86348d914dde185d4b0438b0784a
generated: "2023-10-10T00:04:31.749716697Z"
6 changes: 3 additions & 3 deletions helm/charts/truenas-csp/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ annotations:
- name: Install
url: https://github.com/hpe-storage/truenas-csp/blob/master/INSTALL.md
artifacthub.io/prerelease: "false"
version: "1.1.4"
appVersion: "2.3.10"
version: "1.1.5"
appVersion: "2.4.0"
maintainers:
- name: Michael Mattsson
email: [email protected]
Expand All @@ -22,7 +22,7 @@ sources:
home: https://github.com/hpe-storage/truenas-csp
dependencies:
- name: hpe-csi-driver
version: 2.3.0
version: 2.4.0
repository: "https://hpe-storage.github.io/co-deployments"
keywords:
- HPE
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion helm/charts/truenas-csp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image:
repository: quay.io/datamattsson/truenas-csp
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "v2.3.10"
tag: "v2.4.0"

imagePullSecrets: []
nameOverride: ""
Expand Down
1 change: 1 addition & 0 deletions truenascsp/truenascsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ def on_post(self, req, resp):
else:
req_backend = {
'type': 'VOLUME',
# FIXME
'comments': content.get('description', api.dataset_defaults.get('description')),
'name': '{root}/{volume_name}'.format(volume_name=content.get('name'), root=root),
'volsize': '{size}'.format(size=int(content.get('size'))),
Expand Down

0 comments on commit 1657b8f

Please sign in to comment.