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: Remove fullname helm template helper #8

Merged
merged 1 commit into from
Jun 12, 2024
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
2 changes: 1 addition & 1 deletion charts/ionoscloud-blockstorage-csi-driver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type: application
keywords:
- csi
- ionos-cloud
version: 0.1.1
version: 0.2.0
appVersion: "v1.7.0-rc.0"
kubeVersion: ">=1.20.0-0"
home: https://github.com/ionos-cloud/ionoscloud-blockstorage-csi-driver
Expand Down
14 changes: 8 additions & 6 deletions charts/ionoscloud-blockstorage-csi-driver/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ionoscloud-blockstorage-csi-driver

![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.7.0-rc.0](https://img.shields.io/badge/AppVersion-v1.7.0--rc.0-informational?style=flat-square)
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.7.0-rc.0](https://img.shields.io/badge/AppVersion-v1.7.0--rc.0-informational?style=flat-square)

**Homepage:** <https://github.com/ionos-cloud/ionoscloud-blockstorage-csi-driver>

Expand Down Expand Up @@ -34,7 +34,8 @@ The file must contain the datacenter ID of the VM in the following format:
Provide the secret name during installation:

```console
helm install -n kube-system ionoscloud-csi-driver oci://ghcr.io/ionos-cloud/helm-charts/ionoscloud-blockstorage-csi-driver \
helm install -n kube-system ionoscloud-blockstorage-csi-driver \
oci://ghcr.io/ionos-cloud/helm-charts/ionoscloud-blockstorage-csi-driver \
--set tokenSecretName=csi-secret
```

Expand All @@ -48,9 +49,11 @@ Should you need to install multiple CSI drivers using tokens from the same users
you need to set the `clusterName` value on installation.

```console
helm install -n kube-system ionoscloud-csi-driver oci://ghcr.io/ionos-cloud/helm-charts/ionoscloud-blockstorage-csi-driver \
helm install -n kube-system ionoscloud-blockstorage-csi-driver \
oci://ghcr.io/ionos-cloud/helm-charts/ionoscloud-blockstorage-csi-driver \
--set tokenSecretName=csi-secret --set clusterName=production
helm install -n kube-system ionoscloud-csi-driver oci://ghcr.io/ionos-cloud/helm-charts/ionoscloud-blockstorage-csi-driver \
helm install -n kube-system ionoscloud-blockstorage-csi-driver \
oci://ghcr.io/ionos-cloud/helm-charts/ionoscloud-blockstorage-csi-driver \
--set tokenSecretName=csi-secret --set clusterName=staging
```

Expand Down Expand Up @@ -184,13 +187,12 @@ helm install -n kube-system ionoscloud-csi-driver oci://ghcr.io/ionos-cloud/helm
| className | string | `"ionos-cloud"` | Name of VolumeSnapshotClass. Also used as prefix for StorageClasses. |
| clusterName | string | `"k8s"` | Name used to identify managed storage resources. |
| driverName | string | `"cloud.ionos.com"` | Name of the driver in the storage class. |
| fullnameOverride | string | `""` | Specify a custom fullname override. This only influences Kubernetes resource names, not properties. |
| nameOverride | string | `""` | Specify a custom name override. This only influences Kubernetes resource names, not properties. |
| registry | string | Omit if empty | Specify a custom registry name that will be used as prefix for all images. Useful when pulling images from a registry mirror. |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.automount | bool | `true` | Automatically mount a ServiceAccount's API credentials? |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated from template |
| tokenSecretName | string | `""` | Name of the secret that contains the token used for cloud API authentication. Must contain the key "token". |

[cloud-api]: https://api.ionos.com/docs/cloud/v6/
Expand Down
9 changes: 6 additions & 3 deletions charts/ionoscloud-blockstorage-csi-driver/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ The file must contain the datacenter ID of the VM in the following format:
Provide the secret name during installation:

```console
helm install -n kube-system ionoscloud-csi-driver oci://ghcr.io/ionos-cloud/helm-charts/ionoscloud-blockstorage-csi-driver \
helm install -n kube-system ionoscloud-blockstorage-csi-driver \
oci://ghcr.io/ionos-cloud/helm-charts/ionoscloud-blockstorage-csi-driver \
--set tokenSecretName=csi-secret
```

Expand All @@ -48,9 +49,11 @@ Should you need to install multiple CSI drivers using tokens from the same users
you need to set the `clusterName` value on installation.

```console
helm install -n kube-system ionoscloud-csi-driver oci://ghcr.io/ionos-cloud/helm-charts/ionoscloud-blockstorage-csi-driver \
helm install -n kube-system ionoscloud-blockstorage-csi-driver \
oci://ghcr.io/ionos-cloud/helm-charts/ionoscloud-blockstorage-csi-driver \
--set tokenSecretName=csi-secret --set clusterName=production
helm install -n kube-system ionoscloud-csi-driver oci://ghcr.io/ionos-cloud/helm-charts/ionoscloud-blockstorage-csi-driver \
helm install -n kube-system ionoscloud-blockstorage-csi-driver \
oci://ghcr.io/ionos-cloud/helm-charts/ionoscloud-blockstorage-csi-driver \
--set tokenSecretName=csi-secret --set clusterName=staging
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,6 @@ Expand the name of the chart.
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "csi-driver.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
Expand Down Expand Up @@ -69,7 +51,7 @@ Create the name of the service account to use
*/}}
{{- define "csi-driver.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "csi-driver.fullname" .) .Values.serviceAccount.name }}
{{- default (include "csi-driver.name" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "csi-driver.fullname" . }}
name: {{ include "csi-driver.name" . }}
labels:
{{- include "csi-driver.labels" . | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "csi-driver.fullname" . }}-controller
name: {{ include "csi-driver.name" . }}-controller
labels:
{{- include "csi-driver.labels" . | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
{{- if .Values.monitoring.nameOverride }}
name: {{ .Values.monitoring.nameOverride }}
{{- else }}
name: {{ include "csi-driver.fullname" . }}
name: {{ include "csi-driver.name" . }}
{{- end }}
{{- if .Values.monitoring.namespace }}
namespace: {{ .Values.monitoring.namespace }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "csi-driver.fullname" . }}
name: {{ include "csi-driver.name" . }}
labels:
{{- include "csi-driver.labels" . | nindent 4 }}
rules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "csi-driver.fullname" . }}
name: {{ include "csi-driver.name" . }}
labels:
{{- include "csi-driver.labels" . | nindent 4 }}
subjects:
Expand All @@ -12,4 +12,4 @@ subjects:
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "csi-driver.fullname" . }}
name: {{ include "csi-driver.name" . }}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "csi-driver.fullname" . }}
name: {{ include "csi-driver.name" . }}
labels:
{{- include "csi-driver.labels" . | nindent 4 }}
rules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "csi-driver.fullname" . }}
name: {{ include "csi-driver.name" . }}
labels:
{{- include "csi-driver.labels" . | nindent 4 }}
subjects:
Expand All @@ -13,5 +13,5 @@ subjects:
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "csi-driver.fullname" . }}
name: {{ include "csi-driver.name" . }}
{{- end }}
4 changes: 1 addition & 3 deletions charts/ionoscloud-blockstorage-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ className: ionos-cloud

# -- Specify a custom name override. This only influences Kubernetes resource names, not properties.
nameOverride: ""
# -- Specify a custom fullname override. This only influences Kubernetes resource names, not properties.
fullnameOverride: ""

# -- (string) Specify a custom registry name that will be used as prefix for all images.
# Useful when pulling images from a registry mirror.
Expand All @@ -28,7 +26,7 @@ serviceAccount:
automount: true
# -- Annotations to add to the service account
annotations: {}
# -- The name of the service account to use. If not set and create is true, a name is generated using the fullname template
# -- The name of the service account to use. If not set and create is true, a name is generated from template
name: ""

driver:
Expand Down