Skip to content

Commit

Permalink
fix: helm create namespace
Browse files Browse the repository at this point in the history
Add an options that adds namespace in helm template result.

Signed-off-by: Serge Logvinov <[email protected]>
  • Loading branch information
sergelogvinov committed Oct 17, 2023
1 parent 74e42b2 commit 9370237
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 17 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ docs:
charts/proxmox-csi-plugin > docs/deploy/proxmox-csi-plugin.yml
helm template -n csi-proxmox proxmox-csi-plugin \
--set-string image.tag=$(TAG) \
--set createNamespace=true \
charts/proxmox-csi-plugin > docs/deploy/proxmox-csi-plugin-release.yml
helm template -n csi-proxmox proxmox-csi-plugin \
-f charts/proxmox-csi-plugin/values.talos.yaml \
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ storageClass:
```
```shell
kubectl create ns csi-proxmox
helm upgrade -i -n csi-proxmox -f proxmox-csi.yaml proxmox-csi-plugin oci://ghcr.io/sergelogvinov/charts/proxmox-csi-plugin
```

Expand Down
2 changes: 1 addition & 1 deletion charts/proxmox-csi-plugin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ maintainers:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.9
version: 0.1.10

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
3 changes: 2 additions & 1 deletion charts/proxmox-csi-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# proxmox-csi-plugin

![Version: 0.1.9](https://img.shields.io/badge/Version-0.1.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.3.0](https://img.shields.io/badge/AppVersion-v0.3.0-informational?style=flat-square)
![Version: 0.1.10](https://img.shields.io/badge/Version-0.1.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.3.0](https://img.shields.io/badge/AppVersion-v0.3.0-informational?style=flat-square)

A CSI plugin for Proxmox

Expand Down Expand Up @@ -73,6 +73,7 @@ helm upgrade -i --namespace=csi-proxmox -f proxmox-csi.yaml \
| imagePullSecrets | list | `[]` | |
| nameOverride | string | `""` | |
| fullnameOverride | string | `""` | |
| createNamespace | bool | `false` | Create namespace. Very useful when using helm template. |
| priorityClassName | string | `"system-cluster-critical"` | Controller pods priorityClassName. |
| serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Pods Service Account. ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ |
| provisionerName | string | `"csi.proxmox.sinextra.dev"` | CSI Driver provisioner name. Currently, cannot be customized. |
Expand Down
2 changes: 1 addition & 1 deletion charts/proxmox-csi-plugin/templates/namespace.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if ne .Release.Namespace "kube-system" }}
{{- if and .Values.createNamespace (ne .Release.Namespace "kube-system") }}
apiVersion: v1
kind: Namespace
metadata:
Expand Down
2 changes: 2 additions & 0 deletions charts/proxmox-csi-plugin/values.edge.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

createNamespace: true

controller:
plugin:
image:
Expand Down
2 changes: 2 additions & 0 deletions charts/proxmox-csi-plugin/values.talos.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

createNamespace: true

node:
nodeSelector:
node.cloudprovider.kubernetes.io/platform: nocloud
Expand Down
4 changes: 4 additions & 0 deletions charts/proxmox-csi-plugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

# -- Create namespace.
# Very useful when using helm template.
createNamespace: false

# -- Controller pods priorityClassName.
priorityClassName: system-cluster-critical

Expand Down
14 changes: 7 additions & 7 deletions docs/deploy/proxmox-csi-plugin-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.1.9
helm.sh/chart: proxmox-csi-plugin-0.1.10
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.3.0"
Expand All @@ -29,7 +29,7 @@ metadata:
name: proxmox-csi-plugin-node
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.1.9
helm.sh/chart: proxmox-csi-plugin-0.1.10
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.3.0"
Expand All @@ -42,7 +42,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.1.9
helm.sh/chart: proxmox-csi-plugin-0.1.10
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.3.0"
Expand Down Expand Up @@ -85,7 +85,7 @@ metadata:
name: proxmox-csi-plugin-node
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.1.9
helm.sh/chart: proxmox-csi-plugin-0.1.10
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.3.0"
Expand Down Expand Up @@ -133,7 +133,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.1.9
helm.sh/chart: proxmox-csi-plugin-0.1.10
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.3.0"
Expand Down Expand Up @@ -175,7 +175,7 @@ metadata:
name: proxmox-csi-plugin-node
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.1.9
helm.sh/chart: proxmox-csi-plugin-0.1.10
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.3.0"
Expand Down Expand Up @@ -318,7 +318,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.1.9
helm.sh/chart: proxmox-csi-plugin-0.1.10
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.3.0"
Expand Down
14 changes: 7 additions & 7 deletions docs/deploy/proxmox-csi-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.1.9
helm.sh/chart: proxmox-csi-plugin-0.1.10
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.3.0"
Expand All @@ -29,7 +29,7 @@ metadata:
name: proxmox-csi-plugin-node
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.1.9
helm.sh/chart: proxmox-csi-plugin-0.1.10
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.3.0"
Expand Down Expand Up @@ -69,7 +69,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.1.9
helm.sh/chart: proxmox-csi-plugin-0.1.10
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.3.0"
Expand Down Expand Up @@ -112,7 +112,7 @@ metadata:
name: proxmox-csi-plugin-node
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.1.9
helm.sh/chart: proxmox-csi-plugin-0.1.10
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.3.0"
Expand Down Expand Up @@ -160,7 +160,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.1.9
helm.sh/chart: proxmox-csi-plugin-0.1.10
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.3.0"
Expand Down Expand Up @@ -202,7 +202,7 @@ metadata:
name: proxmox-csi-plugin-node
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.1.9
helm.sh/chart: proxmox-csi-plugin-0.1.10
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.3.0"
Expand Down Expand Up @@ -345,7 +345,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.1.9
helm.sh/chart: proxmox-csi-plugin-0.1.10
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.3.0"
Expand Down

0 comments on commit 9370237

Please sign in to comment.