@@ -38,10 +38,8 @@ print_line_separation() {
3838set_variables () {
3939 DIR=" $( dirname -- " $0 " ; ) "
4040 K8S_NAMESPACE=" aws-privateca-issuer"
41- HELM_CHART_NAME=" $DIR /../charts/aws-pca-issuer"
4241 AWS_REGION=" us-east-1"
4342 DEPLOYMENT_NAME=" aws-privateca-issuer"
44- VALUES_FILE=" $DIR /test-values.yaml"
4543}
4644
4745clean_up () {
@@ -52,19 +50,22 @@ clean_up() {
5250}
5351
5452main () {
53+ HELM_CHART_NAME=" $1 "
54+ VALUES_FILE=" $2 "
55+
5556 set -eo pipefail
5657
5758 check_is_installed kubectl " kubectl is not installed"
5859 check_is_installed helm " helm is not installed"
5960
60- set_variables
61-
6261 clean_up
6362
6463 set -e
6564
6665 echo " Installing the Helm Chart $HELM_CHART_NAME in namespace $K8S_NAMESPACE ... "
6766
67+ helm repo add awspca https://cert-manager.github.io/aws-privateca-issuer
68+
6869 helm install " $DEPLOYMENT_NAME " " $HELM_CHART_NAME " --create-namespace --namespace " $K8S_NAMESPACE " -f $VALUES_FILE 1> /dev/null || exit 1
6970
7071 echo " Helm chart installed."
@@ -118,11 +119,23 @@ main() {
118119 echo " uninstalling the Helm Chart $HELM_CHART_NAME in namespace $K8S_NAMESPACE ... "
119120 helm uninstall --namespace " $K8S_NAMESPACE " " $DEPLOYMENT_NAME " 1> /dev/null || exit 1
120121
122+ echo " removing awspca repo"
123+ helm repo remove awspca
124+
121125 echo " deleting $K8S_NAMESPACE namespace ... "
122126 kubectl delete namespace " $K8S_NAMESPACE " 1> /dev/null || exit 1
123127
124128 echo " Helm Test Finished Successfully"
125129
126130}
127131
128- main
132+ set_variables
133+
134+ if [ " $1 " = " -p" ]; then
135+ echo " Running against prod ecr"
136+ main awspca/aws-privateca-issuer $DIR /test-values.yaml
137+ exit
138+ fi
139+
140+ main $DIR /../charts/aws-pca-issuer $DIR /test-values.yaml
141+ main awspca/aws-privateca-issuer $DIR /test-ecr.yaml
0 commit comments