Skip to content

Commit

Permalink
feat: add base repo in chart
Browse files Browse the repository at this point in the history
fix script

fix Makefile

fix chart

fix chart

fix chart

fix chart

fix chart

fix chart
  • Loading branch information
andyzhangx committed Aug 25, 2021
1 parent 851717e commit 9275f68
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 21 deletions.
21 changes: 11 additions & 10 deletions charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,23 @@ The following table lists the configurable parameters of the latest Azure Disk C
| `driver.userAgentSuffix` | userAgent suffix | `OSS-helm` |
| `driver.volumeAttachLimit` | maximum number of attachable volumes per node maximum number is defined according to node instance type by default(`-1`) | `-1` |
| `feature.enableFSGroupPolicy` | enable `fsGroupPolicy` on a k8s 1.20+ cluster | `false` |
| `image.azuredisk.repository` | azuredisk-csi-driver docker image | `mcr.microsoft.com/k8s/csi/azuredisk-csi` |
| `image.baseRepo` | base repository of driver images | `mcr.microsoft.com` |
| `image.azuredisk.repository` | azuredisk-csi-driver docker image | `/k8s/csi/azuredisk-csi` |
| `image.azuredisk.tag` | azuredisk-csi-driver docker image tag | `latest` |
| `image.azuredisk.pullPolicy` | azuredisk-csi-driver image pull policy | `IfNotPresent` |
| `image.csiProvisioner.repository` | csi-provisioner docker image | `mcr.microsoft.com/oss/kubernetes-csi/csi-provisioner` |
| `image.csiProvisioner.repository` | csi-provisioner docker image | `/oss/kubernetes-csi/csi-provisioner` |
| `image.csiProvisioner.tag` | csi-provisioner docker image tag | `v1.5.0` |
| `image.csiProvisioner.pullPolicy` | csi-provisioner image pull policy | `IfNotPresent` |
| `image.csiAttacher.repository` | csi-attacher docker image | `mcr.microsoft.com/oss/kubernetes-csi/csi-attacher` |
| `image.csiAttacher.repository` | csi-attacher docker image | `/oss/kubernetes-csi/csi-attacher` |
| `image.csiAttacher.tag` | csi-attacher docker image tag | `v2.2.0` |
| `image.csiAttacher.pullPolicy` | csi-attacher image pull policy | `IfNotPresent` |
| `image.csiResizer.repository` | csi-resizer docker image | `mcr.microsoft.com/oss/kubernetes-csi/csi-resizer` |
| `image.csiResizer.repository` | csi-resizer docker image | `/oss/kubernetes-csi/csi-resizer` |
| `image.csiResizer.tag` | csi-resizer docker image tag | `v0.5.0` |
| `image.csiResizer.pullPolicy` | csi-resizer image pull policy | `IfNotPresent` |
| `image.livenessProbe.repository` | liveness-probe docker image | `mcr.microsoft.com/oss/kubernetes-csi/livenessprobe` |
| `image.livenessProbe.repository` | liveness-probe docker image | `/oss/kubernetes-csi/livenessprobe` |
| `image.livenessProbe.tag` | liveness-probe docker image tag | `v2.3.0` |
| `image.livenessProbe.pullPolicy` | liveness-probe image pull policy | `IfNotPresent` |
| `image.nodeDriverRegistrar.repository` | csi-node-driver-registrar docker image | `mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar` |
| `image.nodeDriverRegistrar.repository` | csi-node-driver-registrar docker image | `/oss/kubernetes-csi/csi-node-driver-registrar` |
| `image.nodeDriverRegistrar.tag` | csi-node-driver-registrar docker image tag | `v2.2.0` |
| `image.nodeDriverRegistrar.pullPolicy` | csi-node-driver-registrar image pull policy | `IfNotPresent` |
| `imagePullSecrets` | Specify docker-registry secret names as an array | [] (does not add image pull secrets to deployed pods) | |
Expand Down Expand Up @@ -107,10 +108,10 @@ The following table lists the configurable parameters of the latest Azure Disk C
| `node.logLevel` | node driver log level |`5` |
| `snapshot.apiVersion` | when using Snapshot, specify `ga` for K8s >= 1.20 | `beta` |
| `snapshot.enabled` | whether enable snapshot feature | `false` |
| `snapshot.image.csiSnapshotter.repository` | csi-snapshotter docker image | `mcr.microsoft.com/oss/kubernetes-csi/csi-snapshotter` |
| `snapshot.image.csiSnapshotter.repository` | csi-snapshotter docker image | `/oss/kubernetes-csi/csi-snapshotter` |
| `snapshot.image.csiSnapshotter.tag` | csi-snapshotter docker image tag | `v3.0.3` |
| `snapshot.image.csiSnapshotter.pullPolicy` | csi-snapshotter image pull policy | `IfNotPresent` |
| `snapshot.image.csiSnapshotController.repository` | snapshot-controller docker image | `mcr.microsoft.com/oss/kubernetes-csi/snapshot-controller` |
| `snapshot.image.csiSnapshotController.repository` | snapshot-controller docker image | `/oss/kubernetes-csi/snapshot-controller` |
| `snapshot.image.csiSnapshotController.tag` | snapshot-controller docker image tag | `v3.0.3` |
| `snapshot.image.csiSnapshotController.pullPolicy` | snapshot-controller image pull policy | `IfNotPresent` |
| `snapshot.snapshotController.name` | snapshot controller name | `csi-snapshot-controller` |
Expand All @@ -124,10 +125,10 @@ The following table lists the configurable parameters of the latest Azure Disk C
| `windows.enabled` | whether enable windows feature | `true` |
| `windows.dsName` | name of driver daemonset on windows |`csi-azuredisk-node-win` |
| `windows.kubelet` | configure kubelet directory path on Windows agent node | `'C:\var\lib\kubelet'` |
| `windows.image.livenessProbe.repository` | windows liveness-probe docker image | `mcr.microsoft.com/oss/kubernetes-csi/livenessprobe` |
| `windows.image.livenessProbe.repository` | windows liveness-probe docker image | `/oss/kubernetes-csi/livenessprobe` |
| `windows.image.livenessProbe.tag` | windows liveness-probe docker image tag | `v2.3.0` |
| `windows.image.livenessProbe.pullPolicy` | windows liveness-probe image pull policy | `IfNotPresent` |
| `windows.image.nodeDriverRegistrar.repository` | windows csi-node-driver-registrar docker image | `mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar` |
| `windows.image.nodeDriverRegistrar.repository` | windows csi-node-driver-registrar docker image | `/oss/kubernetes-csi/csi-node-driver-registrar` |
| `windows.image.nodeDriverRegistrar.tag` | windows csi-node-driver-registrar docker image tag | `v2.3.0` |
| `windows.image.nodeDriverRegistrar.pullPolicy` | windows csi-node-driver-registrar image pull policy | `IfNotPresent` |
| `windows.tolerations` | windows node driver tolerations | |
Expand Down
Binary file modified charts/latest/azuredisk-csi-driver-v1.7.0.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ spec:
{{- include "azuredisk.pullSecrets" . | indent 6 }}
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:
- "--feature-gates=Topology=true"
- "--csi-address=$(ADDRESS)"
Expand All @@ -60,7 +64,11 @@ spec:
cpu: 10m
memory: 20Mi
- name: csi-attacher
{{- if hasPrefix "/" .Values.image.csiAttacher.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.csiAttacher.repository }}:{{ .Values.image.csiAttacher.tag }}"
{{- else }}
image: "{{ .Values.image.csiAttacher.repository }}:{{ .Values.image.csiAttacher.tag }}"
{{- end }}
args:
- "-v=2"
- "-csi-address=$(ADDRESS)"
Expand All @@ -82,9 +90,17 @@ spec:
memory: 20Mi
- name: csi-snapshotter
{{- if eq .Values.snapshot.apiVersion "beta" }}
{{- if hasPrefix "/" .Values.snapshot.image.csiSnapshotter.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.snapshot.image.csiSnapshotter.repository }}:{{ .Values.snapshot.image.csiSnapshotter.tag }}"
{{- else }}
image: "{{ .Values.snapshot.image.csiSnapshotter.repository }}:{{ .Values.snapshot.image.csiSnapshotter.tag }}"
{{- end }}
{{- else }}
{{- if hasPrefix "/" .Values.snapshot.image.csiSnapshotter.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.snapshot.image.csiSnapshotter.repository }}:{{ .Values.snapshot.image.csiSnapshotter.gaTag }}"
{{- else }}
image: "{{ .Values.snapshot.image.csiSnapshotter.repository }}:{{ .Values.snapshot.image.csiSnapshotter.gaTag }}"
{{- end }}
{{- end }}
args:
- "-csi-address=$(ADDRESS)"
Expand All @@ -104,7 +120,11 @@ spec:
cpu: 10m
memory: 20Mi
- 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"
Expand All @@ -124,7 +144,11 @@ spec:
cpu: 10m
memory: 20Mi
- 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
Expand All @@ -141,7 +165,11 @@ spec:
cpu: 10m
memory: 20Mi
- name: azuredisk
{{- if hasPrefix "/" .Values.image.azuredisk.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.azuredisk.repository }}:{{ .Values.image.azuredisk.tag }}"
{{- else }}
image: "{{ .Values.image.azuredisk.repository }}:{{ .Values.image.azuredisk.tag }}"
{{- end }}
args:
- "--v={{ .Values.controller.logLevel }}"
- "--endpoint=$(CSI_ENDPOINT)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ spec:
volumeMounts:
- mountPath: C:\csi
name: plugin-dir
{{- if hasPrefix "/" .Values.image.livenessProbe.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.windows.image.livenessProbe.repository }}:{{ .Values.windows.image.livenessProbe.tag }}"
{{- else }}
image: "{{ .Values.windows.image.livenessProbe.repository }}:{{ .Values.windows.image.livenessProbe.tag }}"
{{- end }}
args:
- "--csi-address=$(CSI_ENDPOINT)"
- "--probe-timeout=3s"
Expand All @@ -62,7 +66,11 @@ spec:
cpu: 10m
memory: 20Mi
- name: node-driver-registrar
{{- if hasPrefix "/" .Values.image.nodeDriverRegistrar.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.windows.image.nodeDriverRegistrar.repository }}:{{ .Values.windows.image.nodeDriverRegistrar.tag }}"
{{- else }}
image: "{{ .Values.windows.image.nodeDriverRegistrar.repository }}:{{ .Values.windows.image.nodeDriverRegistrar.tag }}"
{{- end }}
args:
- "--v=2"
- "--csi-address=$(CSI_ENDPOINT)"
Expand Down Expand Up @@ -103,7 +111,11 @@ spec:
cpu: 10m
memory: 20Mi
- name: azuredisk
{{- if hasPrefix "/" .Values.image.azuredisk.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.azuredisk.repository }}:{{ .Values.image.azuredisk.tag }}"
{{- else }}
image: "{{ .Values.image.azuredisk.repository }}:{{ .Values.image.azuredisk.tag }}"
{{- end }}
args:
- "--v={{ .Values.node.logLevel }}"
- "--endpoint=$(CSI_ENDPOINT)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ spec:
volumeMounts:
- mountPath: /csi
name: socket-dir
{{- 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
Expand All @@ -64,7 +68,11 @@ spec:
cpu: 10m
memory: 20Mi
- name: node-driver-registrar
{{- if hasPrefix "/" .Values.image.nodeDriverRegistrar.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
{{- else }}
image: "{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}"
{{- end }}
args:
- --csi-address=$(ADDRESS)
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
Expand All @@ -91,7 +99,11 @@ spec:
cpu: 10m
memory: 20Mi
- name: azuredisk
{{- if hasPrefix "/" .Values.image.azuredisk.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.image.azuredisk.repository }}:{{ .Values.image.azuredisk.tag }}"
{{- else }}
image: "{{ .Values.image.azuredisk.repository }}:{{ .Values.image.azuredisk.tag }}"
{{- end }}
args:
- "--v={{ .Values.node.logLevel }}"
- "--endpoint=$(CSI_ENDPOINT)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,17 @@ spec:
containers:
- name: {{ .Values.snapshot.snapshotController.name }}
{{- if eq .Values.snapshot.apiVersion "beta" }}
{{- if hasPrefix "/" .Values.snapshot.image.csiSnapshotController.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.snapshot.image.csiSnapshotController.repository }}:{{ .Values.snapshot.image.csiSnapshotController.tag }}"
{{- else }}
image: "{{ .Values.snapshot.image.csiSnapshotController.repository }}:{{ .Values.snapshot.image.csiSnapshotController.tag }}"
{{- end }}
{{- else }}
{{- if hasPrefix "/" .Values.snapshot.image.csiSnapshotController.repository }}
image: "{{ .Values.image.baseRepo }}{{ .Values.snapshot.image.csiSnapshotController.repository }}:{{ .Values.snapshot.image.csiSnapshotController.gaTag }}"
{{- else }}
image: "{{ .Values.snapshot.image.csiSnapshotController.repository }}:{{ .Values.snapshot.image.csiSnapshotController.gaTag }}"
{{- end }}
{{- end }}
args:
- "--v=2"
Expand Down
21 changes: 11 additions & 10 deletions charts/latest/azuredisk-csi-driver/values.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
image:
baseRepo: mcr.microsoft.com
azuredisk:
repository: mcr.microsoft.com/k8s/csi/azuredisk-csi
repository: /k8s/csi/azuredisk-csi
tag: latest
pullPolicy: IfNotPresent
csiProvisioner:
repository: mcr.microsoft.com/oss/kubernetes-csi/csi-provisioner
repository: /oss/kubernetes-csi/csi-provisioner
tag: v2.1.1
pullPolicy: IfNotPresent
csiAttacher:
repository: mcr.microsoft.com/oss/kubernetes-csi/csi-attacher
repository: /oss/kubernetes-csi/csi-attacher
tag: v3.1.0
pullPolicy: IfNotPresent
csiResizer:
repository: mcr.microsoft.com/oss/kubernetes-csi/csi-resizer
repository: /oss/kubernetes-csi/csi-resizer
tag: v1.1.0
pullPolicy: IfNotPresent
livenessProbe:
repository: mcr.microsoft.com/oss/kubernetes-csi/livenessprobe
repository: /oss/kubernetes-csi/livenessprobe
tag: v2.3.0
pullPolicy: IfNotPresent
nodeDriverRegistrar:
repository: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar
repository: /oss/kubernetes-csi/csi-node-driver-registrar
tag: v2.3.0
pullPolicy: IfNotPresent

Expand Down Expand Up @@ -72,12 +73,12 @@ snapshot:
apiVersion: beta # available values: beta, ga
image:
csiSnapshotter:
repository: mcr.microsoft.com/oss/kubernetes-csi/csi-snapshotter
repository: /oss/kubernetes-csi/csi-snapshotter
tag: v3.0.3
gaTag: v4.2.0
pullPolicy: IfNotPresent
csiSnapshotController:
repository: mcr.microsoft.com/oss/kubernetes-csi/snapshot-controller
repository: /oss/kubernetes-csi/snapshot-controller
tag: v3.0.3
gaTag: v4.2.0
pullPolicy: IfNotPresent
Expand Down Expand Up @@ -114,11 +115,11 @@ windows:
kubelet: 'C:\var\lib\kubelet'
image:
livenessProbe:
repository: mcr.microsoft.com/oss/kubernetes-csi/livenessprobe
repository: /oss/kubernetes-csi/livenessprobe
tag: v2.3.0
pullPolicy: IfNotPresent
nodeDriverRegistrar:
repository: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar
repository: /oss/kubernetes-csi/csi-node-driver-registrar
tag: v2.2.0
pullPolicy: IfNotPresent
tolerations:
Expand Down
2 changes: 1 addition & 1 deletion hack/verify-helm-chart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function validate_image() {
local -r expected_image="${1}"
local -r image="${2}"

if [[ "${expected_image}" != "${image}" ]]; then
if [[ ! "${expected_image}" == *"${image}" ]]; then
echo "Expected ${expected_image}, but got ${image} in helm chart"
exit 1
fi
Expand Down

0 comments on commit 9275f68

Please sign in to comment.