Skip to content

Commit 193b080

Browse files
authored
Merge pull request #3 from shafinhasnat/main
Helm chart v0.0.2, chart updated
2 parents 54ea124 + a02d28c commit 193b080

7 files changed

Lines changed: 63 additions & 86 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ dist/
55

66
docker-compose.local.yml
77

8-
values.yaml
98
dev-test/

README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,36 @@ Before you begin, ensure you have the following tools installed:
2323
go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
2424
```
2525

26-
## Usage
26+
## Development
27+
28+
Run `go mod tidy` before starting the gRPC server:
29+
30+
```bash
31+
go run main.go start \
32+
--endpoint="unix://tmp/csi-hyperstack.sock" \
33+
--hyperstack-api-address="<API_BASE_URL>" \
34+
--hyperstack-api-key="<API_KEY>" \
35+
--service-controller-enabled \
36+
--service-node-enabled
37+
```
38+
39+
To list the available gRPC calls:
2740

28-
You can install the Hyperstack CSI Driver using the provided Helm chart. Before that clone the repository.
41+
```bash
42+
grpcurl --plaintext unix:///tmp/csi-hyperstack.sock list
43+
```
44+
45+
You can invoke a specific RPC method for a given operation using `grpcurl`.
2946

47+
To build the project:
3048

3149
```bash
32-
helm upgrade --install csi-hyperstack --values ./deploy/helm/values.yaml -n csi-driver-test --create-namespace ./deploy/helm
50+
task build
3351
```
34-
After installation, verify that all pods in the `csi-driver` namespace are running successfully. For example usage, please refer to [example/manifest](./example/manifest.yaml)
52+
53+
## Usage
54+
55+
Refer to the [charts/csi-hyperstack](./charts/csi-hyperstack/README.md) documentation for details on installation and usage with Helm.
3556

3657

3758
## Documentation

charts/csi-hyperstack/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ name: csi-hyperstack
33
description: |
44
HELM chart for Hyperstack CSI drvier deployment
55
type: application
6-
version: 0.0.1
6+
version: 0.0.2
77
appVersion: 0.0.1

charts/csi-hyperstack/README.md

Lines changed: 22 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# **CSI Hyperstack Helm Chart**
2-
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
32
[![Helm](https://img.shields.io/badge/helm-chart-blue)](https://helm.sh/)
43
[![Kubernetes](https://img.shields.io/badge/kubernetes-1.24+-green)](https://kubernetes.io/)
54

@@ -9,19 +8,6 @@ This Helm chart simplifies installing, upgrading, and managing the CSI driver re
98

109
---
1110

12-
## **Table of Contents**
13-
- [Overview](#overview)
14-
- [Features](#features)
15-
- [Prerequisites](#prerequisites)
16-
- [Installation](#installation)
17-
- [Upgrading](#upgrading)
18-
- [Uninstalling](#uninstalling)
19-
- [Configuration](#configuration)
20-
- [Development](#development)
21-
- [License](#license)
22-
23-
---
24-
2511
## **Overview**
2612
The **CSI Hyperstack Helm Chart** enables seamless integration between your **Kubernetes cluster** and **Hyperstack**.
2713
It deploys all required CSI components, including:
@@ -36,7 +22,7 @@ It deploys all required CSI components, including:
3622
✅ Deploys the **Hyperstack CSI driver**
3723
✅ Supports **dynamic volume provisioning**
3824
✅ Works with **Helm 3+**
39-
✅ Kubernetes **1.24+** tested
25+
✅ Kubernetes **1.24+**
4026
✅ Easily configurable via `values.yaml`
4127

4228
---
@@ -53,18 +39,18 @@ Before installing, ensure you have:
5339

5440
### **1. Add the Helm Repository**
5541
```bash
56-
helm repo add nexgencloud https://nexgencloud.github.io/csi-hyperstack-helm-chart
42+
helm repo add nexgencloud https://nexgencloud.github.io/csi-hyperstack
5743
helm repo update
5844
```
5945

6046
### **2. Install the Chart**
6147
```bash
62-
helm install csi-hyperstack nexgencloud/csi-hyperstack-helm-chart --namespace kube-system --create-namespace
48+
helm install csi-hyperstack nexgencloud/csi-hyperstack --namespace kube-system --create-namespace --set hyperstack.apiKey=<YOUR_HS_API_KEY>
6349
```
6450

6551
### **3. Verify Installation**
6652
```bash
67-
kubectl get pods -n kube-system -l app.kubernetes.io/name=csi-hyperstack
53+
kubectl get pods -n kube-system
6854
```
6955

7056
You should see all CSI controller and node pods in **Running** state.
@@ -75,7 +61,7 @@ You should see all CSI controller and node pods in **Running** state.
7561
To upgrade to the latest chart version:
7662

7763
```bash
78-
helm upgrade csi-hyperstack nexgencloud/csi-hyperstack-helm-chart --namespace kube-system
64+
helm upgrade csi-hyperstack nexgencloud/csi-hyperstack --namespace kube-system
7965
```
8066

8167
---
@@ -93,47 +79,32 @@ helm uninstall csi-hyperstack -n kube-system
9379
This chart supports custom configuration via a `values.yaml` file.
9480
Here are the most commonly used options:
9581

96-
| **Parameter** | **Description** | **Default** |
97-
|------------------------------|------------------------------------|----------------------|
98-
| `controller.replicas` | Number of controller replicas | `2` |
99-
| `node.tolerations` | Tolerations for node pods | `[]` |
100-
| `storageClass.name` | Default StorageClass name | `hyperstack-csi` |
101-
| `storageClass.reclaimPolicy`| PVC reclaim policy | `Delete` |
102-
| `hyperstack.apiKey` | API key for Hyperstack | `""` |
103-
| `hyperstack.endpoint` | Hyperstack API endpoint | `""` |
82+
Mandetory value during chart installations.
10483

105-
To override defaults:
84+
| Key | Type | Description | Example |
85+
| ------------------- | ------ | -------------------------------------------------- | ---------------------------------- |
86+
| `hyperstack.apiKey` | string | API key for authenticating with the Hyperstack API | `hyperstack.apiKey=abcd1234` |
87+
88+
Other commonly used optional values
89+
90+
| Key | Type | Description | Default |
91+
| -------------------------------- | ------ | ----------------------------------------------------------- | ------------------------------------------- |
92+
| `components.csiHyperstack.tag` | string | CSI Hyperstack Image tag | `latest` |
93+
| `hyperstack.apiAddress` | string | Base URL of the Hyperstack API | `https://infrahub-api.nexgencloud.com/v1` |
94+
| `storageClass.enabled` | bool | Whether to create a default `StorageClass` | `true` |
95+
| `storageClass.name` | string | Name of the `StorageClass` | `csi-hyperstack` |
96+
| `storageClass.volumeBindingMode` | string | Volume binding mode (`Immediate` or `WaitForFirstConsumer`) | `Immediate` |
97+
| `storageClass.reclaimPolicy` | string | Reclaim policy (`Delete` or `Retain`) | `Delete` |
10698

107-
```bash
108-
helm install csi-hyperstack nexgencloud/csi-hyperstack-helm-chart --namespace kube-system --set hyperstack.apiKey=YOUR_API_KEY --set hyperstack.endpoint=https://infrahub-api.nexgencloud.com
109-
```
11099

111100
---
112101

113102
## **Development**
114103
If you want to make changes to the chart:
115104

116105
```bash
117-
# Clone the repository
118-
git clone https://github.com/NexGenCloud/csi-hyperstack-helm-chart.git
119-
cd csi-hyperstack-helm-chart
120-
121106
# Lint the chart
122107
helm lint .
123-
124108
# Test install locally
125-
helm install csi-hyperstack ./ --dry-run --debug
126-
```
127-
128-
---
129-
130-
## **License**
131-
This project is licensed under the **Apache 2.0 License**.
132-
See [LICENSE](LICENSE) for details.
133-
134-
---
135-
136-
## **Next Steps**
137-
- [Helm Documentation](https://helm.sh/docs/)
138-
- [Kubernetes CSI Docs](https://kubernetes-csi.github.io/docs/)
139-
- [NexGen Cloud Hyperstack](https://nexgencloud.com)
109+
helm install csi-hyperstack --set hyperstack.apiKey=<YOUR_HS_API_key> . --dry-run --debug
110+
```

charts/csi-hyperstack/templates/daemonset-node.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ spec:
1414
labels:
1515
{{- include "csi-hyperstack.selectorLabels" . | nindent 8 }}
1616
spec:
17-
{{- if .Values.hyperstack.imagePullSecret }}
17+
{{- if .Values.imagePullSecrets }}
1818
imagePullSecrets:
19-
- name: {{ .Values.hyperstack.imagePullSecret }}
19+
- name: {{ .Values.imagePullSecrets }}
2020
{{- end }}
2121
serviceAccountName: csi-hyperstack-node-sa
2222
hostNetwork: true
2323
containers:
2424
- name: csi-hyperstack-node
25-
image: reg.digitalocean.ngbackend.cloud/hyperstack-csi-driver/csi:v0.0.1
26-
imagePullPolicy: {{ .Values.components.csiHyperstack.imagePullPolicy }}
25+
image: {{ .Values.components.csiHyperstack.image }}:{{ .Values.components.csiHyperstack.tag }}
26+
imagePullPolicy: {{ .Values.components.csiHyperstack.imagePullPolicy}}
2727
securityContext:
2828
privileged: true
2929
runAsUser: 0
@@ -32,8 +32,8 @@ spec:
3232
args:
3333
- "start"
3434
- "--endpoint=unix:///csi/csi.sock"
35-
- "--hyperstack-api-address={{ .Values.components.csiHyperstack.hyperstackApiAddress }}"
36-
- "--hyperstack-api-key={{ .Values.components.csiHyperstack.hyperstackApiKey }}"
35+
- "--hyperstack-api-address={{ .Values.hyperstack.apiKey }}"
36+
- "--hyperstack-api-key={{ .Values.hyperstack.apiAddress }}"
3737
- "--service-node-enabled"
3838
env:
3939
- name: KUBE_NODE_NAME

charts/csi-hyperstack/templates/deployment-controller.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ spec:
1515
labels:
1616
{{- include "csi-hyperstack.selectorLabels" . | nindent 8 }}
1717
spec:
18-
{{- if .Values.hyperstack.imagePullSecret }}
18+
{{- if .Values.imagePullSecrets }}
1919
imagePullSecrets:
20-
- name: {{ .Values.hyperstack.imagePullSecret }}
20+
- name: {{ .Values.imagePullSecrets }}
2121
{{- end }}
2222
serviceAccountName: csi-hyperstack-controller-sa
2323
containers:
2424
- name: csi-hyperstack
25-
image: reg.digitalocean.ngbackend.cloud/hyperstack-csi-driver/csi:v0.0.1
26-
imagePullPolicy: {{ .Values.components.csiHyperstack.imagePullPolicy }}
25+
image: {{ .Values.components.csiHyperstack.image }}:{{ .Values.components.csiHyperstack.tag }}
26+
imagePullPolicy: {{ .Values.components.csiHyperstack.imagePullPolicy }}
2727
command: ["csi-hyperstack"]
2828
args:
2929
- "start"
@@ -65,7 +65,6 @@ spec:
6565
- mountPath: /var/lib/kubelet/plugins
6666
mountPropagation: Bidirectional
6767
name: plugins-dir
68-
{{- if .Values.components.csiAttacher.enabled }}
6968
- name: csi-attacher
7069
image: {{ .Values.components.csiAttacher.image }}
7170
args:
@@ -76,8 +75,6 @@ spec:
7675
volumeMounts:
7776
- mountPath: /csi
7877
name: socket-dir
79-
{{- end }}
80-
{{- if .Values.components.csiProvisioner.enabled }}
8178
- name: csi-provisioner
8279
image: {{ .Values.components.csiProvisioner.image }}
8380
args:
@@ -89,8 +86,6 @@ spec:
8986
volumeMounts:
9087
- mountPath: /csi
9188
name: socket-dir
92-
{{- end }}
93-
{{- if .Values.components.csiResizer.enabled }}
9489
- name: csi-resizer
9590
image: {{ .Values.components.csiResizer.image }}
9691
args:
@@ -101,8 +96,6 @@ spec:
10196
volumeMounts:
10297
- mountPath: /csi
10398
name: socket-dir
104-
{{- end }}
105-
{{- if .Values.components.csiSnapshotter.enabled }}
10699
- name: csi-snapshotter
107100
image: {{ .Values.components.csiSnapshotter.image }}
108101
args:
@@ -113,7 +106,6 @@ spec:
113106
volumeMounts:
114107
- mountPath: /csi
115108
name: socket-dir
116-
{{- end }}
117109
volumes:
118110
- name: socket-dir
119111
hostPath:
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
11
components:
22
csiHyperstack:
33
imagePullPolicy: Always
4-
image: reg.digitalocean.ngbackend.cloud/hyperstack-csi-driver/csi:v0.0.1
4+
image: ghcr.io/nexgencloud/csi-hyperstack/csi
5+
tag: latest
56
nodeDriverRegistrar:
6-
enabled: true
77
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.1
88
csiAttacher:
9-
enabled: true
109
image: registry.k8s.io/sig-storage/csi-attacher:v4.6.1
1110
csiProvisioner:
12-
enabled: true
1311
image: registry.k8s.io/sig-storage/csi-provisioner:v5.0.1
1412
csiResizer:
15-
enabled: true
1613
image: registry.k8s.io/sig-storage/csi-resizer:v1.11.1
1714
csiSnapshotter:
18-
enabled: true
1915
image: registry.k8s.io/sig-storage/csi-snapshotter:v8.0.1
2016

2117
hyperstack:
22-
apiKey: ""
23-
apiAddress: ""
24-
imagePullSecret: ""
18+
apiAddress: "https://infrahub-api.nexgencloud.com/v1"
2519

2620
storageClass:
2721
enabled: true
28-
name: "
22+
name: "csi-hyperstack"
2923
volumeBindingMode: "Immediate"
30-
reclaimPolicy: "Delete"
24+
reclaimPolicy: "Delete"

0 commit comments

Comments
 (0)