Skip to content

Commit

Permalink
Merge pull request #1477 from torredil/master
Browse files Browse the repository at this point in the history
Add `helm.sh/hook: test` annotation to chart testing resources
  • Loading branch information
k8s-ci-robot committed Jan 12, 2023
2 parents ce8a68b + 16ab52f commit 69015f5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
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
33 changes: 23 additions & 10 deletions charts/aws-ebs-csi-driver/templates/tests/helm-tester.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: helm-sa
name: ebs-csi-driver-test
annotations:
"helm.sh/hook": test
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: test-role
name: ebs-csi-driver-test
annotations:
"helm.sh/hook": test
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
rules:
- apiGroups: [ "" ]
resources:
Expand Down Expand Up @@ -118,14 +124,17 @@ rules:
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: test-role-binding
name: ebs-csi-driver-test
annotations:
"helm.sh/hook": test
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
subjects:
- kind: ServiceAccount
name: helm-sa
name: ebs-csi-driver-test
namespace: kube-system
roleRef:
kind: ClusterRole
name: test-role
name: ebs-csi-driver-test
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
Expand Down Expand Up @@ -168,17 +177,21 @@ data:
provisioner: ebs.csi.aws.com
volumeBindingMode: WaitForFirstConsumer
metadata:
name: manifest-config
name: ebs-csi-driver-test
annotations:
"helm.sh/hook": test
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
---
apiVersion: v1
kind: Pod
metadata:
name: helm-test
name: ebs-csi-driver-test
annotations:
"helm.sh/hook": test
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
spec:
containers:
- name: helm-test
- name: kubetest2
image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20220624-1a63fdd9f2-master
command: [ "/bin/sh", "-c" ]
args:
Expand All @@ -194,9 +207,9 @@ spec:
volumeMounts:
- name: config-vol
mountPath: /etc/config
serviceAccountName: helm-sa
serviceAccountName: ebs-csi-driver-test
volumes:
- name: config-vol
configMap:
name: manifest-config
name: ebs-csi-driver-test
restartPolicy: Never

0 comments on commit 69015f5

Please sign in to comment.