@@ -33,7 +33,11 @@ function generate_standalone_yaml() {
3333 mkdir -p " ${charttmpdir} "
3434
3535 FILES=(
36- " ${charttmpdir} /mongodb-kubernetes/templates/operator-roles.yaml"
36+ " ${charttmpdir} /mongodb-kubernetes/templates/operator-roles-base.yaml"
37+ " ${charttmpdir} /mongodb-kubernetes/templates/operator-roles-clustermongodbroles.yaml"
38+ " ${charttmpdir} /mongodb-kubernetes/templates/operator-roles-pvc-resize.yaml"
39+ " ${charttmpdir} /mongodb-kubernetes/templates/operator-roles-telemetry.yaml"
40+ " ${charttmpdir} /mongodb-kubernetes/templates/operator-roles-webhook.yaml"
3741 " ${charttmpdir} /mongodb-kubernetes/templates/database-roles.yaml"
3842 " ${charttmpdir} /mongodb-kubernetes/templates/operator-sa.yaml"
3943 " ${charttmpdir} /mongodb-kubernetes/templates/operator.yaml"
@@ -45,22 +49,25 @@ function generate_standalone_yaml() {
4549 cat " helm_chart/crds/" * > public/crds.yaml
4650
4751 # generate openshift public example
48- rm -rf " ${charttmpdir:? } /* "
52+ rm -rf " ${charttmpdir:? } " / *
4953 helm template --namespace mongodb -f helm_chart/values.yaml helm_chart --output-dir " ${charttmpdir} " --values helm_chart/values-openshift.yaml ${HELM_OPTS[@]}
5054 cat " ${FILES[@]} " > public/mongodb-kubernetes-openshift.yaml
5155
5256 # generate openshift files for kustomize used for generating OLM bundle
53- rm -rf " ${charttmpdir:? } /* "
57+ rm -rf " ${charttmpdir:? } " / *
5458 helm template --namespace mongodb -f helm_chart/values.yaml helm_chart --output-dir " ${charttmpdir} " --values helm_chart/values-openshift.yaml \
5559 --set operator.webhook.registerConfiguration=false --set operator.webhook.installClusterRole=false ${HELM_OPTS[@]}
5660
5761 # update kustomize files for OLM bundle with files generated for openshift
5862 cp " ${charttmpdir} /mongodb-kubernetes/templates/operator.yaml" config/manager/manager.yaml
5963 cp " ${charttmpdir} /mongodb-kubernetes/templates/database-roles.yaml" config/rbac/database-roles.yaml
60- cp " ${charttmpdir} /mongodb-kubernetes/templates/operator-roles.yaml" config/rbac/operator-roles.yaml
64+ cp " ${charttmpdir} /mongodb-kubernetes/templates/operator-roles-base.yaml" config/rbac/operator-roles-base.yaml
65+ cp " ${charttmpdir} /mongodb-kubernetes/templates/operator-roles-clustermongodbroles.yaml" config/rbac/operator-roles-clustermongodbroles.yaml
66+ cp " ${charttmpdir} /mongodb-kubernetes/templates/operator-roles-pvc-resize.yaml" config/rbac/operator-roles-pvc-resize.yaml
67+ cp " ${charttmpdir} /mongodb-kubernetes/templates/operator-roles-telemetry.yaml" config/rbac/operator-roles-telemetry.yaml
6168
6269 # generate multi-cluster public example
63- rm -rf " ${charttmpdir:? } /* "
70+ rm -rf " ${charttmpdir:? } " / *
6471 helm template --namespace mongodb -f helm_chart/values.yaml helm_chart --output-dir " ${charttmpdir} " --values helm_chart/values-multi-cluster.yaml ${HELM_OPTS[@]}
6572 cat " ${FILES[@]} " > public/mongodb-kubernetes-multi-cluster.yaml
6673
0 commit comments