Skip to content

Commit

Permalink
zed-csi -> metal-csi
Browse files Browse the repository at this point in the history
  • Loading branch information
philproctor committed Sep 14, 2021
1 parent 5c3d054 commit e556aef
Show file tree
Hide file tree
Showing 18 changed files with 96 additions and 96 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 zed-csi
Copyright (c) 2021 metal-csi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Zed CSI Helm Chart
# Metal CSI Helm Chart

TODO
File renamed without changes.
7 changes: 7 additions & 0 deletions charts/metal-csi/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v2
name: metal-csi
description: CSI Driver for bare metal cluster storage

type: application
version: '0.0.1-alpha22'
appVersion: 'v0.0.1-alpha22'
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "zed-csi.name" -}}
{{- define "metal-csi.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Expand the name of the chart.
*/}}
{{- define "zed-csi.drivername" -}}
{{- define "metal-csi.drivername" -}}
{{- .Values.csidriver.name }}
{{- end }}

Expand All @@ -17,7 +17,7 @@ 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 "zed-csi.fullname" -}}
{{- define "metal-csi.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -33,16 +33,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "zed-csi.chart" -}}
{{- define "metal-csi.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "zed-csi.labels" -}}
helm.sh/chart: {{ include "zed-csi.chart" . }}
{{ include "zed-csi.selectorLabels" . }}
{{- define "metal-csi.labels" -}}
helm.sh/chart: {{ include "metal-csi.chart" . }}
{{ include "metal-csi.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -52,17 +52,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "zed-csi.selectorLabels" -}}
app.kubernetes.io/name: {{ include "zed-csi.name" . }}
{{- define "metal-csi.selectorLabels" -}}
app.kubernetes.io/name: {{ include "metal-csi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "zed-csi.serviceAccountName" -}}
{{- define "metal-csi.serviceAccountName" -}}
{{- if .Values.rbac.create }}
{{- default (include "zed-csi.fullname" .) .Values.serviceAccount.name }}
{{- default (include "metal-csi.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand All @@ -71,9 +71,9 @@ Create the name of the service account to use
{{/*
Create the name of the service account to use
*/}}
{{- define "zed-csi.clusterRoleName" -}}
{{- define "metal-csi.clusterRoleName" -}}
{{- if .Values.rbac.create }}
{{- default (include "zed-csi.fullname" .) .Values.clusterRole.name }}
{{- default (include "metal-csi.fullname" .) .Values.clusterRole.name }}
{{- else }}
{{- default "default" .Values.clusterRole.name }}
{{- end }}
Expand All @@ -82,15 +82,15 @@ Create the name of the service account to use
{{/*
Common arguments used for CSI helpers, such as node-driver-registrar
*/}}
{{- define "zed-csi.csiHelperArgs" -}}
{{- define "metal-csi.csiHelperArgs" -}}
- '--v=5'
- '--csi-address=$(ADDRESS)'
{{- end }}

{{/*
Common arguments used for CSI helpers, such as node-driver-registrar
*/}}
{{- define "zed-csi.csiHelperLeaderArgs" -}}
{{- define "metal-csi.csiHelperLeaderArgs" -}}
- --leader-election
- --leader-election-namespace={{ .Release.Namespace }}
- --timeout=90s
Expand All @@ -99,7 +99,7 @@ Common arguments used for CSI helpers, such as node-driver-registrar
{{/*
Common env vars used for CSI helpers, such as node-driver-registrar
*/}}
{{- define "zed-csi.csiHelperEnv" -}}
{{- define "metal-csi.csiHelperEnv" -}}
- name: ADDRESS
value: /plugin/csi.sock
- name: KUBE_NODE_NAME
Expand All @@ -111,7 +111,7 @@ Common env vars used for CSI helpers, such as node-driver-registrar
{{/*
Common env vars used for CSI helpers, such as node-driver-registrar
*/}}
{{- define "zed-csi.csiControllerHelperEnv" -}}
{{- define "metal-csi.csiControllerHelperEnv" -}}
- name: ADDRESS
value: /plugin/csi-controller.sock
- name: KUBE_NODE_NAME
Expand All @@ -123,7 +123,7 @@ Common env vars used for CSI helpers, such as node-driver-registrar
{{/*
Common env vars used for CSI helpers, such as node-driver-registrar
*/}}
{{- define "zed-csi.csiHelperVolumeMounts" -}}
{{- define "metal-csi.csiHelperVolumeMounts" -}}
- name: plugin-dir
mountPath: /plugin
- name: registration-dir
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "zed-csi.fullname" . }}
name: {{ include "metal-csi.fullname" . }}
labels:
{{- include "zed-csi.labels" . | nindent 4 }}
{{- include "metal-csi.labels" . | nindent 4 }}
data:
{{- with .Values.config }}
zed-csi.yml: |
metal-csi.yml: |
{{- toYaml . | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "zed-csi.fullname" . }}-controller
name: {{ include "metal-csi.fullname" . }}-controller
labels:
{{- include "zed-csi.labels" . | nindent 4 }}
{{- include "metal-csi.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "zed-csi.selectorLabels" . | nindent 6 }}
{{- include "metal-csi.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "zed-csi.selectorLabels" . | nindent 8 }}
{{- include "metal-csi.selectorLabels" . | nindent 8 }}

spec:
hostNetwork: true
serviceAccountName: {{ include "zed-csi.serviceAccountName" . }}
serviceAccountName: {{ include "metal-csi.serviceAccountName" . }}

{{- with .Values.nodeSelector }}
nodeSelector:
Expand All @@ -40,30 +40,30 @@ spec:
- name: csi-provisioner
image: k8s.gcr.io/sig-storage/csi-provisioner:v3.0.0
args:
{{- include "zed-csi.csiHelperArgs" . | nindent 12 }}
{{- include "zed-csi.csiHelperLeaderArgs" . | nindent 12 }}
{{- include "metal-csi.csiHelperArgs" . | nindent 12 }}
{{- include "metal-csi.csiHelperLeaderArgs" . | nindent 12 }}
- --extra-create-metadata
- --volume-name-prefix
- {{ include "zed-csi.drivername" . }}
- {{ include "metal-csi.drivername" . }}
env:
{{- include "zed-csi.csiControllerHelperEnv" . | nindent 12 }}
{{- include "metal-csi.csiControllerHelperEnv" . | nindent 12 }}
volumeMounts:
{{- include "zed-csi.csiHelperVolumeMounts" . | nindent 12 }}
{{- include "metal-csi.csiHelperVolumeMounts" . | nindent 12 }}

- name: csi-attacher
image: k8s.gcr.io/sig-storage/csi-attacher:v3.3.0
args:
{{- include "zed-csi.csiHelperArgs" . | nindent 12 }}
{{- include "zed-csi.csiHelperLeaderArgs" . | nindent 12 }}
{{- include "metal-csi.csiHelperArgs" . | nindent 12 }}
{{- include "metal-csi.csiHelperLeaderArgs" . | nindent 12 }}
env:
{{- include "zed-csi.csiControllerHelperEnv" . | nindent 12 }}
{{- include "metal-csi.csiControllerHelperEnv" . | nindent 12 }}
volumeMounts:
{{- include "zed-csi.csiHelperVolumeMounts" . | nindent 12 }}
{{- include "metal-csi.csiHelperVolumeMounts" . | nindent 12 }}

- name: zed-csi-controller
- name: metal-csi-controller
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: [-l, debug, --node-id, $(KUBE_NODE_NAME), --csi-path, /plugin/csi-controller.sock, --csi-name, {{ include "zed-csi.drivername" . }}]
args: [-l, debug, --node-id, $(KUBE_NODE_NAME), --csi-path, /plugin/csi-controller.sock, --csi-name, {{ include "metal-csi.drivername" . }}]
env:
- name: KUBE_NODE_NAME
valueFrom:
Expand All @@ -83,14 +83,14 @@ spec:
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: 'Bidirectional'
- name: zed-csi-yml
mountPath: /etc/zed-csi.yml
subPath: zed-csi.yml
- name: metal-csi-yml
mountPath: /etc/metal-csi.yml
subPath: metal-csi.yml

volumes:
- name: plugin-dir
hostPath:
path: /var/lib/kubelet/plugins_registry/zed-csi
path: /var/lib/kubelet/plugins_registry/metal-csi
type: DirectoryOrCreate

- name: registration-dir
Expand All @@ -103,6 +103,6 @@ spec:
path: /var/lib/kubelet/pods
type: Directory

- name: zed-csi-yml
- name: metal-csi-yml
configMap:
name: {{ include "zed-csi.fullname" . }}
name: {{ include "metal-csi.fullname" . }}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: {{ include "zed-csi.drivername" . }}
name: {{ include "metal-csi.drivername" . }}
labels:
{{- include "zed-csi.labels" . | nindent 4 }}
{{- include "metal-csi.labels" . | nindent 4 }}
spec:
attachRequired: true
podInfoOnMount: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "zed-csi.fullname" . }}-node
name: {{ include "metal-csi.fullname" . }}-node
labels:
{{- include "zed-csi.labels" . | nindent 4 }}
{{- include "metal-csi.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "zed-csi.selectorLabels" . | nindent 6 }}
{{- include "metal-csi.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "zed-csi.selectorLabels" . | nindent 8 }}
{{- include "metal-csi.selectorLabels" . | nindent 8 }}

spec:
hostNetwork: true
serviceAccountName: {{ include "zed-csi.serviceAccountName" . }}
serviceAccountName: {{ include "metal-csi.serviceAccountName" . }}

{{- with .Values.nodeSelector }}
nodeSelector:
Expand All @@ -40,17 +40,17 @@ spec:
- name: csi-node-driver-registrar
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.3.0
args:
{{- include "zed-csi.csiHelperArgs" . | nindent 12 }}
- '--kubelet-registration-path=/var/lib/kubelet/plugins_registry/zed-csi/csi.sock'
{{- include "metal-csi.csiHelperArgs" . | nindent 12 }}
- '--kubelet-registration-path=/var/lib/kubelet/plugins_registry/metal-csi/csi.sock'
env:
{{- include "zed-csi.csiHelperEnv" . | nindent 12 }}
{{- include "metal-csi.csiHelperEnv" . | nindent 12 }}
volumeMounts:
{{- include "zed-csi.csiHelperVolumeMounts" . | nindent 12 }}
{{- include "metal-csi.csiHelperVolumeMounts" . | nindent 12 }}

- name: zed-csi-node
- name: metal-csi-node
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: [-l, debug, --node-id, $(KUBE_NODE_NAME), --csi-path, /plugin/csi.sock, --csi-name, {{ include "zed-csi.drivername" . }}]
args: [-l, debug, --node-id, $(KUBE_NODE_NAME), --csi-path, /plugin/csi.sock, --csi-name, {{ include "metal-csi.drivername" . }}]
env:
- name: KUBE_NODE_NAME
valueFrom:
Expand All @@ -73,14 +73,14 @@ spec:
- name: node-root
mountPath: /node
mountPropagation: 'Bidirectional'
- name: zed-csi-yml
mountPath: /etc/zed-csi.yml
subPath: zed-csi.yml
- name: metal-csi-yml
mountPath: /etc/metal-csi.yml
subPath: metal-csi.yml

volumes:
- name: plugin-dir
hostPath:
path: /var/lib/kubelet/plugins_registry/zed-csi
path: /var/lib/kubelet/plugins_registry/metal-csi
type: DirectoryOrCreate

- name: registration-dir
Expand All @@ -98,6 +98,6 @@ spec:
path: /
type: Directory

- name: zed-csi-yml
- name: metal-csi-yml
configMap:
name: {{ include "zed-csi.fullname" . }}
name: {{ include "metal-csi.fullname" . }}
Loading

0 comments on commit e556aef

Please sign in to comment.