Skip to content

Commit

Permalink
Add helm.sh/hook: test annotation to chart testing resources
Browse files Browse the repository at this point in the history
Bugfix: Prevent deployment of testing resources during normal installation by adding `helm.sh/hook: test` annotation.

Signed-off-by: Eddie Torres <[email protected]>
  • Loading branch information
torredil committed Jan 12, 2023
1 parent ce8a68b commit 9297603
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions charts/aws-ebs-csi-driver/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Helm chart

## v2.15.1
* Bugfix: Prevent deployment of testing resources during normal installation by adding `helm.sh/hook: test` annotation.

## v2.15.0
* Set sensible default resource requests/limits
* Add sensible default update strategy
Expand Down
2 changes: 1 addition & 1 deletion charts/aws-ebs-csi-driver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 1.14.1
name: aws-ebs-csi-driver
description: A Helm chart for AWS EBS CSI Driver
version: 2.15.0
version: 2.15.1
kubeVersion: ">=1.17.0-0"
home: https://github.com/kubernetes-sigs/aws-ebs-csi-driver
sources:
Expand Down
8 changes: 8 additions & 0 deletions charts/aws-ebs-csi-driver/templates/tests/helm-tester.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: helm-sa
annotations:
"helm.sh/hook": test
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: test-role
annotations:
"helm.sh/hook": test
rules:
- apiGroups: [ "" ]
resources:
Expand Down Expand Up @@ -119,6 +123,8 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: test-role-binding
annotations:
"helm.sh/hook": test
subjects:
- kind: ServiceAccount
name: helm-sa
Expand Down Expand Up @@ -169,6 +175,8 @@ data:
volumeBindingMode: WaitForFirstConsumer
metadata:
name: manifest-config
annotations:
"helm.sh/hook": test
---
apiVersion: v1
kind: Pod
Expand Down

0 comments on commit 9297603

Please sign in to comment.