Skip to content

Commit 6025743

Browse files
committed
Add make cluster/helm
Signed-off-by: Connor Catlett <[email protected]>
1 parent bf14739 commit 6025743

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

CONTRIBUTING.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,16 @@ eval "$(make cluster/kubeconfig)"
5151
To test a change, build the driver image and then install it:
5252
```bash
5353
make cluster/image
54-
# If testing a Helm-based change, you can use HELM_EXTRA_FLAGS
55-
# to set your new paremeters for testing, for example:
56-
# export HELM_EXTRA_FLAGS="--set=controller.newParameter=true"
5754
make cluster/install
5855
```
5956

57+
If you are testing a Helm-only change, `make cluster/helm` installs using the default (release) image:
58+
```bash
59+
# Use HELM_EXTRA_FLAGS for testing parameters, for example:
60+
# export HELM_EXTRA_FLAGS="--set=controller.newParameter=true"
61+
make cluster/helm
62+
```
63+
6064
When you are finished manually testing, uninstall the driver:
6165
```bash
6266
make cluster/uninstall

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ cluster/delete: bin/kops bin/eksctl
115115
cluster/install: bin/helm bin/aws
116116
./hack/e2e/install.sh
117117

118+
.PHONY: cluster/helm
119+
cluster/helm: bin/helm bin/aws
120+
HELM_USE_DEFAULT_IMAGE="true" \
121+
./hack/e2e/install.sh
122+
118123
.PHONY: cluster/uninstall
119124
cluster/uninstall: bin/helm bin/aws
120125
./hack/e2e/uninstall.sh

docs/makefile.md

+11
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,20 @@ Install the EBS CSI Driver to the cluster via Helm. You must have already run `m
158158
#### Example: Install the EBS CSI Driver to a cluster for testing
159159

160160
```bash
161+
make cluster/image
161162
make cluster/install
162163
```
163164

165+
### `make cluster/install`
166+
167+
Install the EBS CSI Driver to the cluster via Helm using the default (release) image. This is useful for testing Helm-only changes.
168+
169+
#### Example: Install the EBS CSI Driver to a cluster for testing a Helm-only change
170+
171+
```bash
172+
make cluster/helm
173+
```
174+
164175
### `make cluster/uninstall`
165176

166177
Uninstall an installation of the EBS CSI Driver previously installed by `make cluster/install`.

hack/e2e/util.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ function install_driver() {
2727
HELM_ARGS=(upgrade --install aws-ebs-csi-driver
2828
"${BASE_DIR}/../../charts/aws-ebs-csi-driver"
2929
--namespace kube-system
30-
--set image.repository="${IMAGE_NAME}"
31-
--set image.tag="${IMAGE_TAG}"
3230
--set node.enableWindows="${WINDOWS}"
3331
--set node.windowsHostProcess="${WINDOWS_HOSTPROCESS}"
3432
--set controller.k8sTagClusterId="${CLUSTER_NAME}"
@@ -39,6 +37,10 @@ function install_driver() {
3937
if [ -n "${HELM_VALUES_FILE:-}" ]; then
4038
HELM_ARGS+=(-f "${HELM_VALUES_FILE}")
4139
fi
40+
if [ -z "${HELM_USE_DEFAULT_IMAGE+x}" ]; then
41+
HELM_ARGS+=(--set image.repository="${IMAGE_NAME}")
42+
HELM_ARGS+=(--set image.tag="${IMAGE_TAG}")
43+
fi
4244
eval "EXPANDED_HELM_EXTRA_FLAGS=$HELM_EXTRA_FLAGS"
4345
if [[ -n "$EXPANDED_HELM_EXTRA_FLAGS" ]]; then
4446
HELM_ARGS+=("${EXPANDED_HELM_EXTRA_FLAGS}")

0 commit comments

Comments
 (0)