diff --git a/Makefile b/Makefile index e13db81..5d40df1 100644 --- a/Makefile +++ b/Makefile @@ -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 \ diff --git a/README.md b/README.md index 5df0da8..7ccbadf 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,10 @@ storageClass: ``` ```shell +kubectl create ns csi-proxmox +# We have to label the namespace to allow the plugin to run as privileged +kubectl label ns/csi-proxmox pod-security.kubernetes.io/enforce=privileged + helm upgrade -i -n csi-proxmox -f proxmox-csi.yaml proxmox-csi-plugin oci://ghcr.io/sergelogvinov/charts/proxmox-csi-plugin ``` diff --git a/charts/proxmox-csi-plugin/Chart.yaml b/charts/proxmox-csi-plugin/Chart.yaml index cb174e5..800cabb 100644 --- a/charts/proxmox-csi-plugin/Chart.yaml +++ b/charts/proxmox-csi-plugin/Chart.yaml @@ -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 diff --git a/charts/proxmox-csi-plugin/README.md b/charts/proxmox-csi-plugin/README.md index d34e707..6890a1a 100644 --- a/charts/proxmox-csi-plugin/README.md +++ b/charts/proxmox-csi-plugin/README.md @@ -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 @@ -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. | diff --git a/charts/proxmox-csi-plugin/templates/namespace.yaml b/charts/proxmox-csi-plugin/templates/namespace.yaml index 6425e18..8c4ba9c 100644 --- a/charts/proxmox-csi-plugin/templates/namespace.yaml +++ b/charts/proxmox-csi-plugin/templates/namespace.yaml @@ -1,4 +1,4 @@ -{{- if ne .Release.Namespace "kube-system" }} +{{- if and .Values.createNamespace (ne .Release.Namespace "kube-system") }} apiVersion: v1 kind: Namespace metadata: diff --git a/charts/proxmox-csi-plugin/values.edge.yaml b/charts/proxmox-csi-plugin/values.edge.yaml index 5e7ff42..974c87e 100644 --- a/charts/proxmox-csi-plugin/values.edge.yaml +++ b/charts/proxmox-csi-plugin/values.edge.yaml @@ -1,4 +1,6 @@ +createNamespace: true + controller: plugin: image: diff --git a/charts/proxmox-csi-plugin/values.talos.yaml b/charts/proxmox-csi-plugin/values.talos.yaml index 7622419..d507b31 100644 --- a/charts/proxmox-csi-plugin/values.talos.yaml +++ b/charts/proxmox-csi-plugin/values.talos.yaml @@ -1,4 +1,6 @@ +createNamespace: true + node: nodeSelector: node.cloudprovider.kubernetes.io/platform: nocloud diff --git a/charts/proxmox-csi-plugin/values.yaml b/charts/proxmox-csi-plugin/values.yaml index 3dd9c97..f1251ab 100644 --- a/charts/proxmox-csi-plugin/values.yaml +++ b/charts/proxmox-csi-plugin/values.yaml @@ -8,6 +8,10 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" +# -- Create namespace. +# Very useful when using helm template. +createNamespace: false + # -- Controller pods priorityClassName. priorityClassName: system-cluster-critical diff --git a/docs/deploy/proxmox-csi-plugin-release.yml b/docs/deploy/proxmox-csi-plugin-release.yml index ee19840..a68c60d 100644 --- a/docs/deploy/proxmox-csi-plugin-release.yml +++ b/docs/deploy/proxmox-csi-plugin-release.yml @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" diff --git a/docs/deploy/proxmox-csi-plugin.yml b/docs/deploy/proxmox-csi-plugin.yml index 173f077..7f28526 100644 --- a/docs/deploy/proxmox-csi-plugin.yml +++ b/docs/deploy/proxmox-csi-plugin.yml @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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"