File tree 1 file changed +18
-15
lines changed
1 file changed +18
-15
lines changed Original file line number Diff line number Diff line change 11
11
set -e
12
12
set -o pipefail
13
13
14
- if ! yq --version | grep -q ' yq version 3' ; then
15
- echo " Please install https://github.com/mikefarah/yq v3"
16
- exit 1
17
- fi
18
-
19
- for p in $( kubectl eg rabbitmqclusters.rabbitmq.com | yq d - spec.resources | yq d - spec.tolerations | yq d - spec.override | yq d - spec.affinity | yq r - spec | grep -v ' - ' | awk -F: ' { print $1 }' ) ; do
20
- grep -q " $p " templates/rabbitmq.yaml
21
- if [[ $? != 0 ]]; then
22
- echo " FAIL: Property $p not exposed in the helm chart"
23
- exit 1
24
- fi
25
- done
26
- echo " Seems like all CRD properties are exposed in the helm chart"
27
-
28
- chart=$( helm package . | helm package . | awk ' {print $NF}' )
14
+ chart=$( helm package . | awk ' {print $NF}' )
29
15
30
16
helm template $chart -f example-configurations.yaml > template-output
31
17
32
18
# it should be updated if we add any new configurations and when we modify plans/example-configurations.yaml
33
19
diff -u template-output expected-template-output && echo " Successfully rendered the template"
20
+
21
+
22
+ if [[ " $1 " == " properties" ]]; then
23
+ if ! yq --version | grep -q ' yq version 3' ; then
24
+ echo " Please install https://github.com/mikefarah/yq v3"
25
+ exit 1
26
+ fi
27
+
28
+ for p in $( kubectl eg rabbitmqclusters.rabbitmq.com | yq d - spec.resources | yq d - spec.tolerations | yq d - spec.override | yq d - spec.affinity | yq r - spec | grep -v ' - ' | awk -F: ' { print $1 }' ) ; do
29
+ grep -q " $p " templates/rabbitmq.yaml
30
+ if [[ $? != 0 ]]; then
31
+ echo " FAIL: Property $p not exposed in the helm chart"
32
+ exit 1
33
+ fi
34
+ done
35
+ echo " Seems like all CRD properties are exposed in the helm chart"
36
+ fi
You can’t perform that action at this time.
0 commit comments