Skip to content

Commit

Permalink
Merge pull request #2 from kubernetes-csi/master
Browse files Browse the repository at this point in the history
Sync to original
  • Loading branch information
lizhuqi authored Feb 5, 2021
2 parents e1c1cbe + 2d3ef8a commit ee874ec
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 44 deletions.
1 change: 1 addition & 0 deletions charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ The following table lists the configurable parameters of the latest SMB CSI Driv
| `windows.image.nodeDriverRegistrar.pullPolicy` | windows csi-node-driver-registrar image pull policy | IfNotPresent |
| `kubelet.linuxPath` | configure the kubelet path for Linux node | `/var/lib/kubelet` |
| `kubelet.windowsPath` | configure the kubelet path for Windows node | `'C:\var\lib\kubelet'` |
| `controller.runOnMaster` | run controller on master node | false |

## troubleshooting
- Add `--wait -v=5 --debug` in `helm install` command to get detailed error
Expand Down
34 changes: 17 additions & 17 deletions charts/index.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
apiVersion: v1
entries:
csi-driver-smb:
- apiVersion: v1
appVersion: latest
created: 2021-02-05T13:24:53.89945995Z
description: SMB CSI Driver for Kubernetes
digest: 1d7ceeb9a626991bd34e3b9287957ca639735a0c48ea3a97ec531e08905b408c
name: csi-driver-smb
urls:
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/latest/csi-driver-smb-v0.7.0.tgz
version: v0.7.0
- apiVersion: v1
appVersion: v0.6.0
created: "2020-12-29T03:21:48.06948147Z"
created: 2021-02-05T13:24:53.900854158Z
description: SMB CSI Driver for Kubernetes
digest: a554e4bd3f8a0acf0b5b177245c55cdb041f91393a9c66a3a3dec715004cf66e
digest: 5ad0b7b9f84fa313387a9bbfb0ed59cff70b10633cedf81e7b77af936ff2806e
name: csi-driver-smb
urls:
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/v0.6.0/csi-driver-smb-v0.6.0.tgz
version: v0.6.0
- apiVersion: v1
appVersion: v0.5.0
created: "2020-12-29T03:21:48.067390454Z"
created: 2021-02-05T13:24:53.900589656Z
description: SMB CSI Driver for Kubernetes
digest: b400ef563745dcaf4a819a05b1e8a11d9442ae1ddf46da70542d5c87cd4cd9a1
name: csi-driver-smb
Expand All @@ -21,7 +30,7 @@ entries:
version: v0.5.0
- apiVersion: v1
appVersion: v0.4.0
created: "2020-12-29T03:21:48.06688575Z"
created: 2021-02-05T13:24:53.900265955Z
description: SMB CSI Driver for Kubernetes
digest: fb6d581ba5d4d1d78ca468f6daa4a24c47bb147b74d005d3c394521b4e534a3e
name: csi-driver-smb
Expand All @@ -30,7 +39,7 @@ entries:
version: v0.4.0
- apiVersion: v1
appVersion: v0.3.0
created: "2020-12-29T03:21:48.066359746Z"
created: 2021-02-05T13:24:53.899998653Z
description: SMB CSI Driver for Kubernetes
digest: ee9e58db6d4a95491e2012c6607126bbff827b9c439e90e9a9798d2a73b0cb22
name: csi-driver-smb
Expand All @@ -39,20 +48,11 @@ entries:
version: v0.3.0
- apiVersion: v1
appVersion: v0.2.0
created: "2020-12-29T03:21:48.065895342Z"
created: 2021-02-05T13:24:53.899690551Z
description: SMB CSI Driver for Kubernetes
digest: bc0aca4acd74b6c521d85d6d75e1dab22c06dcc9a2e0430abc203a2d5006403d
digest: 8d8667106306d78dea9f63e5a3e8ee7ad2b60f86bd625f5968e37ca6a0cad317
name: csi-driver-smb
urls:
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/v0.2.0/csi-driver-smb-v0.2.0.tgz
version: v0.2.0
- apiVersion: v1
appVersion: latest
created: "2020-12-29T03:21:48.065409338Z"
description: SMB CSI Driver for Kubernetes
digest: 37e0c76fc46f83c066abc7a97992fe2141efde01219aec4c6e16c4dfecb6557e
name: csi-driver-smb
urls:
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts/latest/csi-driver-smb-v0.7.0.tgz
version: v0.7.0
generated: "2020-12-29T03:21:48.064727433Z"
generated: 2021-02-05T13:24:53.899081848Z
Binary file modified charts/latest/csi-driver-smb-v0.7.0.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
serviceAccountName: csi-smb-controller-sa
nodeSelector:
kubernetes.io/os: linux
{{- if .Values.controller.runOnMaster}}
kubernetes.io/role: master
{{- end}}
priorityClassName: system-cluster-critical
tolerations:
- key: "node-role.kubernetes.io/master"
Expand Down
1 change: 1 addition & 0 deletions charts/latest/csi-driver-smb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rbac:
controller:
replicas: 2
metricsPort: 29644
runOnMaster: false

node:
metricsPort: 29645
Expand Down
1 change: 1 addition & 0 deletions hack/verify-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ ${PKG_ROOT}/hack/verify-golint.sh
${PKG_ROOT}/hack/verify-yamllint.sh
${PKG_ROOT}/hack/verify-boilerplate.sh
${PKG_ROOT}/hack/verify-spelling.sh
${PKG_ROOT}/hack/verify-helm-chart-files.sh
${PKG_ROOT}/hack/verify-helm-chart.sh
${PKG_ROOT}/hack/verify-gomod.sh
48 changes: 48 additions & 0 deletions hack/verify-helm-chart-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash

# Copyright 2021 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail

echo "begin to verify chart tgz files ..."

# verify whether chart config has changed
diff=`git diff`
if [[ -n "${diff}" ]]; then
echo "${diff}"
exit 1
fi

for dir in charts/*
do
if [ -d $dir ]; then
if [ -f $dir/*.tgz ]; then
echo "verify $dir ..."
tar -xvf $dir/*.tgz -C $dir/
fi
fi
done

diff=`git diff`
if [[ -n "${diff}" ]]; then
echo
echo
echo "${diff}"
echo
echo "latest chart config has changed, pls run \"helm package charts/latest/csi-driver-smb -d charts/latest/\" to update tgz file"
exit 1
fi

echo "chart tgz files verified."
27 changes: 0 additions & 27 deletions hack/verify-helm-chart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,30 +67,3 @@ validate_image "${expected_node_driver_registrar}" "${node_driver_registrar}"
validate_image "${expected_smb_image}" "${smb_image}"

echo "Images in deploy/ matches those in the latest helm chart."

# verify whether chart config has changed
diff=`git diff`
if [[ -n "${diff}" ]]; then
echo "${diff}"
exit 1
fi

for dir in charts/*
do
if [ -d $dir ]; then
if [ -f $dir/*.tgz ]; then
echo "verify $dir ..."
tar -xvf $dir/*.tgz -C $dir/
fi
fi
done

diff=`git diff`
if [[ -n "${diff}" ]]; then
echo "${diff}"
echo
echo "latest chart config has changed, pls run \"helm package charts/latest/csi-driver-smb -d charts/latest/\" to update tgz file"
exit 1
fi

echo "chart tgz files verified."

0 comments on commit ee874ec

Please sign in to comment.