forked from kubernetes-sigs/blob-csi-driver
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c82bde5
commit cead646
Showing
19 changed files
with
1,034 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
appVersion: latest | ||
description: Azure Blob Storage CSI driver | ||
name: blob-csi-driver | ||
version: v4.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The Azure Blob Storage CSI driver is getting deployed to your cluster. | ||
|
||
To check Azure Blob Storage CSI driver pods status, please run: | ||
|
||
kubectl --namespace={{ .Release.Namespace }} get pods --selector="release={{ .Release.Name }}" --watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
|
||
{{/* Expand the name of the chart.*/}} | ||
{{- define "blob.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "blob.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Common selectors. | ||
*/}} | ||
{{- define "blob.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ template "blob.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Common labels. | ||
*/}} | ||
{{- define "blob.labels" -}} | ||
{{- include "blob.selectorLabels" . }} | ||
app.kubernetes.io/component: csi-driver | ||
app.kubernetes.io/part-of: {{ template "blob.name" . }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
helm.sh/chart: {{ template "blob.chart" . }} | ||
{{- if .Values.customLabels }} | ||
{{ toYaml .Values.customLabels }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
|
||
{{/* pull secrets for containers */}} | ||
{{- define "blob.pullSecrets" -}} | ||
{{- if .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- range .Values.imagePullSecrets }} | ||
- name: {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end -}} |
229 changes: 229 additions & 0 deletions
229
charts/v4.6.0/blob-csi-driver/templates/csi-blob-controller.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,229 @@ | ||
kind: Deployment | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: {{ .Values.controller.name }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: {{ .Values.controller.name }} | ||
{{- include "blob.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.controller.replicas }} | ||
selector: | ||
matchLabels: | ||
app: {{ .Values.controller.name }} | ||
{{- include "blob.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Values.controller.name }} | ||
{{- include "blob.labels" . | nindent 8 }} | ||
{{- if .Values.workloadIdentity.clientID }} | ||
azure.workload.identity/use: "true" | ||
{{- end }} | ||
{{- if .Values.podLabels }} | ||
{{- toYaml .Values.podLabels | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.podAnnotations }} | ||
annotations: | ||
{{ toYaml .Values.podAnnotations | indent 8 }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.controller.affinity }} | ||
affinity: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{ toYaml .Values.imagePullSecrets | indent 8 }} | ||
{{- end }} | ||
hostNetwork: {{ .Values.controller.hostNetwork }} | ||
dnsPolicy: ClusterFirstWithHostNet | ||
serviceAccountName: {{ .Values.serviceAccount.controller }} | ||
nodeSelector: | ||
kubernetes.io/os: linux | ||
{{- if .Values.controller.runOnMaster}} | ||
node-role.kubernetes.io/master: "" | ||
{{- end}} | ||
{{- if .Values.controller.runOnControlPlane}} | ||
node-role.kubernetes.io/control-plane: "" | ||
{{- end}} | ||
{{- with .Values.controller.nodeSelector }} | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
priorityClassName: {{ .Values.priorityClassName | quote }} | ||
securityContext: | ||
seccompProfile: | ||
type: RuntimeDefault | ||
{{- with .Values.controller.tolerations }} | ||
tolerations: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: csi-provisioner | ||
{{- if hasPrefix "/" .Values.image.csiProvisioner.repository }} | ||
image: "{{ .Values.image.baseRepo }}{{ .Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}" | ||
{{- else }} | ||
image: "{{ .Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}" | ||
{{- end }} | ||
args: | ||
- "-v=2" | ||
- "--csi-address=$(ADDRESS)" | ||
- "--leader-election" | ||
- "--leader-election-namespace={{ .Release.Namespace }}" | ||
- "--timeout=120s" | ||
- "--extra-create-metadata=true" | ||
- "--kube-api-qps=50" | ||
- "--kube-api-burst=100" | ||
env: | ||
- name: ADDRESS | ||
value: /csi/csi.sock | ||
imagePullPolicy: {{ .Values.image.csiProvisioner.pullPolicy }} | ||
volumeMounts: | ||
- mountPath: /csi | ||
name: socket-dir | ||
resources: {{- toYaml .Values.controller.resources.csiProvisioner | nindent 12 }} | ||
- name: liveness-probe | ||
{{- if hasPrefix "/" .Values.image.livenessProbe.repository }} | ||
image: "{{ .Values.image.baseRepo }}{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}" | ||
{{- else }} | ||
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}" | ||
{{- end }} | ||
args: | ||
- --csi-address=/csi/csi.sock | ||
- --probe-timeout=3s | ||
- --health-port={{ .Values.controller.livenessProbe.healthPort }} | ||
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }} | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
resources: {{- toYaml .Values.controller.resources.livenessProbe | nindent 12 }} | ||
- name: blob | ||
{{- if hasPrefix "/" .Values.image.blob.repository }} | ||
image: "{{ .Values.image.baseRepo }}{{ .Values.image.blob.repository }}:{{ .Values.image.blob.tag }}" | ||
{{- else }} | ||
image: "{{ .Values.image.blob.repository }}:{{ .Values.image.blob.tag }}" | ||
{{- end }} | ||
args: | ||
- "--v={{ .Values.controller.logLevel }}" | ||
- "--endpoint=$(CSI_ENDPOINT)" | ||
- "--metrics-address=0.0.0.0:{{ .Values.controller.metricsPort }}" | ||
- "--drivername={{ .Values.driver.name }}" | ||
- "--custom-user-agent={{ .Values.driver.customUserAgent }}" | ||
- "--user-agent-suffix={{ .Values.driver.userAgentSuffix }}" | ||
- "--cloud-config-secret-name={{ .Values.controller.cloudConfigSecretName }}" | ||
- "--cloud-config-secret-namespace={{ .Values.controller.cloudConfigSecretNamespace }}" | ||
- "--allow-empty-cloud-config={{ .Values.controller.allowEmptyCloudConfig }}" | ||
ports: | ||
- containerPort: {{ .Values.controller.livenessProbe.healthPort }} | ||
name: healthz | ||
protocol: TCP | ||
- containerPort: {{ .Values.controller.metricsPort }} | ||
name: metrics | ||
protocol: TCP | ||
livenessProbe: | ||
failureThreshold: 5 | ||
httpGet: | ||
path: /healthz | ||
port: healthz | ||
initialDelaySeconds: 30 | ||
timeoutSeconds: 10 | ||
periodSeconds: 30 | ||
env: | ||
- name: AZURE_CREDENTIAL_FILE | ||
valueFrom: | ||
configMapKeyRef: | ||
name: azure-cred-file | ||
key: path | ||
optional: true | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: KUBERNETES_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: CSI_ENDPOINT | ||
value: unix:///csi/csi.sock | ||
{{- if ne .Values.driver.httpsProxy "" }} | ||
- name: HTTPS_PROXY | ||
value: {{ .Values.driver.httpsProxy }} | ||
{{- end }} | ||
{{- if ne .Values.driver.httpProxy "" }} | ||
- name: HTTP_PROXY | ||
value: {{ .Values.driver.httpProxy }} | ||
{{- end }} | ||
- name: AZURE_GO_SDK_LOG_LEVEL | ||
value: {{ .Values.driver.azureGoSDKLogLevel }} | ||
{{- if eq .Values.cloud "AzureStackCloud" }} | ||
- name: AZURE_ENVIRONMENT_FILEPATH | ||
value: /etc/kubernetes/azurestackcloud.json | ||
{{- end }} | ||
- name: AZURE_CLOUD_NAME | ||
value: {{ .Values.cloud }} | ||
- name: AZURE_RESOURCE_ID | ||
value: {{ .Values.global.resourceId }} | ||
|
||
imagePullPolicy: {{ .Values.image.blob.pullPolicy }} | ||
volumeMounts: | ||
- mountPath: /csi | ||
name: socket-dir | ||
- mountPath: /etc/kubernetes/ | ||
name: azure-cred | ||
{{- if eq .Values.cloud "AzureStackCloud" }} | ||
- name: ssl | ||
mountPath: /etc/ssl/certs | ||
readOnly: true | ||
{{- end }} | ||
{{- if eq .Values.linux.distro "fedora" }} | ||
- name: ssl | ||
mountPath: /etc/ssl/certs | ||
readOnly: true | ||
- name: ssl-pki | ||
mountPath: /etc/pki/ca-trust/extracted | ||
readOnly: true | ||
{{- end }} | ||
resources: {{- toYaml .Values.controller.resources.blob | nindent 12 }} | ||
- name: csi-resizer | ||
{{- if hasPrefix "/" .Values.image.csiResizer.repository }} | ||
image: "{{ .Values.image.baseRepo }}{{ .Values.image.csiResizer.repository }}:{{ .Values.image.csiResizer.tag }}" | ||
{{- else }} | ||
image: "{{ .Values.image.csiResizer.repository }}:{{ .Values.image.csiResizer.tag }}" | ||
{{- end }} | ||
args: | ||
- "-csi-address=$(ADDRESS)" | ||
- "-v=2" | ||
- "-leader-election" | ||
- "--leader-election-namespace={{ .Release.Namespace }}" | ||
- '-handle-volume-inuse-error=false' | ||
env: | ||
- name: ADDRESS | ||
value: /csi/csi.sock | ||
imagePullPolicy: {{ .Values.image.csiResizer.pullPolicy }} | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
resources: {{- toYaml .Values.controller.resources.csiResizer | nindent 12 }} | ||
volumes: | ||
- name: socket-dir | ||
emptyDir: {} | ||
- name: azure-cred | ||
hostPath: | ||
path: /etc/kubernetes/ | ||
type: DirectoryOrCreate | ||
{{- if eq .Values.cloud "AzureStackCloud" }} | ||
- name: ssl | ||
hostPath: | ||
path: /etc/ssl/certs | ||
{{- end }} | ||
{{- if eq .Values.linux.distro "fedora" }} | ||
- name: ssl | ||
hostPath: | ||
path: /etc/ssl/certs | ||
- name: ssl-pki | ||
hostPath: | ||
path: /etc/pki/ca-trust/extracted | ||
{{- end }} | ||
{{- if .Values.securityContext }} | ||
securityContext: {{- toYaml .Values.securityContext | nindent 8 }} | ||
{{- end }} |
14 changes: 14 additions & 0 deletions
14
charts/v4.6.0/blob-csi-driver/templates/csi-blob-driver.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
apiVersion: storage.k8s.io/v1 | ||
kind: CSIDriver | ||
metadata: | ||
name: {{ .Values.driver.name }} | ||
labels: | ||
{{- include "blob.labels" . | nindent 4 }} | ||
spec: | ||
attachRequired: false | ||
podInfoOnMount: true | ||
fsGroupPolicy: {{ .Values.feature.fsGroupPolicy }} | ||
volumeLifecycleModes: | ||
- Persistent | ||
- Ephemeral |
Oops, something went wrong.