Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: helm create namespace #96

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

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") }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't undestand the meaning of the createNamespace boolean. In my #95 issue, I've demonstrated that the creation of the namespace doesn't work.
Is the boolean aim to disable the namespace creation only ?
Also, if we don't enter in th if condition, you don't indicate int the README to add the security labels to the namespace. Are they mandatory ?

Copy link

@LeoShivas LeoShivas Oct 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was too focused on the review. You said in my issue that you just want to disable the namespace creation.

My bad. :-)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct; we need to clarify the required label if someone wants to create namespace manually.

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