Generate document CRD to different files

This commit adds generating CRD into different files for each phase

Change-Id: I574b27d737f946415e64eaf5b1d5bf962d6c2cc1
Signed-off-by: Sreejith Punnapuzha <sreejith.punnapuzha@outlook.com>
This commit is contained in:
Sreejith Punnapuzha 2020-07-09 09:03:37 -05:00
parent bf3017c12f
commit 53cf713a08
1 changed files with 3 additions and 3 deletions

View File

@ -121,9 +121,9 @@ for cluster in ephemeral target; do
# step 1: actually apply all crds in the phase
# TODO: will need to loop through phases in order, eventually
# e.g., load CRDs from initinfra first, so they're present when validating later phases
${ACTL} phase render ${phase} -k CustomResourceDefinition > ${TMP}/crds.yaml
if [ -s ${TMP}/crds.yaml ]; then
${KUBECTL} --context ${CONTEXT} --kubeconfig ${KUBECONFIG} apply -f ${TMP}/crds.yaml
${ACTL} phase render ${phase} -k CustomResourceDefinition > ${TMP}/${phase}-crds.yaml
if [ -s ${TMP}/${phase}-crds.yaml ]; then
${KUBECTL} --context ${CONTEXT} --kubeconfig ${KUBECONFIG} apply -f ${TMP}/${phase}-crds.yaml
fi
# step 2: dry-run the entire phase