Compare commits
1 Commits
d82de0595c
...
1b70a9bac6
| Author | SHA1 | Date | |
|---|---|---|---|
|
1b70a9bac6
|
@@ -153,10 +153,8 @@ jobs:
|
|||||||
echo ">> Chart path $chart_path"
|
echo ">> Chart path $chart_path"
|
||||||
|
|
||||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
if [ -f "$chart_path/Chart.yaml" ]; then
|
||||||
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
|
||||||
TEMPLATE=""
|
|
||||||
|
|
||||||
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
||||||
|
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
||||||
|
|
||||||
cd $chart_path
|
cd $chart_path
|
||||||
|
|
||||||
@@ -170,28 +168,40 @@ jobs:
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Rendering templates ..."
|
echo ">> Rendering templates ..."
|
||||||
|
|
||||||
case "$chart_name" in
|
case "$chart_name" in
|
||||||
"stack")
|
"stack")
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Special Rendering for stack into argocd namespace ..."
|
echo ">> Special Rendering for stack ..."
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace argocd --include-crds --dry-run)
|
helm template stack ./ --namespace argocd --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
;;
|
;;
|
||||||
"cilium" | "coredns" | "metrics-server" |"prometheus-operator-crds")
|
"cilium")
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Special Rendering for $chart_name into kube-system namespace ..."
|
echo ">> Special Rendering for cilium ..."
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace kube-system --include-crds --dry-run)
|
helm template cilium ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
|
;;
|
||||||
|
"coredns")
|
||||||
|
echo ""
|
||||||
|
echo ">> Special Rendering for coredns ..."
|
||||||
|
helm template coredns ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
|
;;
|
||||||
|
"metrics-server")
|
||||||
|
echo ""
|
||||||
|
echo ">> Special Rendering for metrics-server ..."
|
||||||
|
helm template metrics-server ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
|
;;
|
||||||
|
"prometheus-operator-crds")
|
||||||
|
echo ""
|
||||||
|
echo ">> Special Rendering for prometheus-operator-crds ..."
|
||||||
|
helm template prometheus-operator-crds ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Standard Rendering for $chart_name ..."
|
echo ">> Standard Rendering for $chart_name ..."
|
||||||
TEMPLATE=$(helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run)
|
helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Formating rendered template ..."
|
|
||||||
echo "$TEMPLATE" | yq 'select(. != null)' | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
||||||
ls $OUTPUT_FOLDER
|
ls $OUTPUT_FOLDER
|
||||||
|
|||||||
@@ -139,10 +139,8 @@ jobs:
|
|||||||
echo ">> Chart path $chart_path"
|
echo ">> Chart path $chart_path"
|
||||||
|
|
||||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
if [ -f "$chart_path/Chart.yaml" ]; then
|
||||||
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
|
||||||
TEMPLATE=""
|
|
||||||
|
|
||||||
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
||||||
|
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
||||||
|
|
||||||
cd $chart_path
|
cd $chart_path
|
||||||
|
|
||||||
@@ -156,28 +154,40 @@ jobs:
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Rendering templates ..."
|
echo ">> Rendering templates ..."
|
||||||
|
|
||||||
case "$chart_name" in
|
case "$chart_name" in
|
||||||
"stack")
|
"stack")
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Special Rendering for stack into argocd namespace ..."
|
echo ">> Special Rendering for stack ..."
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace argocd --include-crds --dry-run)
|
helm template stack ./ --namespace argocd --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
;;
|
;;
|
||||||
"cilium" | "coredns" | "metrics-server" |"prometheus-operator-crds")
|
"cilium")
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Special Rendering for $chart_name into kube-system namespace ..."
|
echo ">> Special Rendering for cilium ..."
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace kube-system --include-crds --dry-run)
|
helm template cilium ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
|
;;
|
||||||
|
"coredns")
|
||||||
|
echo ""
|
||||||
|
echo ">> Special Rendering for coredns ..."
|
||||||
|
helm template coredns ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
|
;;
|
||||||
|
"metrics-server")
|
||||||
|
echo ""
|
||||||
|
echo ">> Special Rendering for metrics-server ..."
|
||||||
|
helm template metrics-server ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
|
;;
|
||||||
|
"prometheus-operator-crds")
|
||||||
|
echo ""
|
||||||
|
echo ">> Special Rendering for prometheus-operator-crds ..."
|
||||||
|
helm template prometheus-operator-crds ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Standard Rendering for $chart_name ..."
|
echo ">> Standard Rendering for $chart_name ..."
|
||||||
TEMPLATE=$(helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run)
|
helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Formating rendered template ..."
|
|
||||||
echo "$TEMPLATE" | yq 'select(. != null)' | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
||||||
ls $OUTPUT_FOLDER
|
ls $OUTPUT_FOLDER
|
||||||
|
|||||||
@@ -158,10 +158,8 @@ jobs:
|
|||||||
echo ">> Chart path $chart_path"
|
echo ">> Chart path $chart_path"
|
||||||
|
|
||||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
if [ -f "$chart_path/Chart.yaml" ]; then
|
||||||
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
|
||||||
TEMPLATE=""
|
|
||||||
|
|
||||||
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
||||||
|
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
||||||
|
|
||||||
cd $chart_path
|
cd $chart_path
|
||||||
|
|
||||||
@@ -175,28 +173,40 @@ jobs:
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Rendering templates ..."
|
echo ">> Rendering templates ..."
|
||||||
|
|
||||||
case "$chart_name" in
|
case "$chart_name" in
|
||||||
"stack")
|
"stack")
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Special Rendering for stack into argocd namespace ..."
|
echo ">> Special Rendering for stack ..."
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace argocd --include-crds --dry-run)
|
helm template stack ./ --namespace argocd --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
;;
|
;;
|
||||||
"cilium" | "coredns" | "metrics-server" |"prometheus-operator-crds")
|
"cilium")
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Special Rendering for $chart_name into kube-system namespace ..."
|
echo ">> Special Rendering for cilium ..."
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace kube-system --include-crds --dry-run)
|
helm template cilium ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
|
;;
|
||||||
|
"coredns")
|
||||||
|
echo ""
|
||||||
|
echo ">> Special Rendering for coredns ..."
|
||||||
|
helm template coredns ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
|
;;
|
||||||
|
"metrics-server")
|
||||||
|
echo ""
|
||||||
|
echo ">> Special Rendering for metrics-server ..."
|
||||||
|
helm template metrics-server ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
|
;;
|
||||||
|
"prometheus-operator-crds")
|
||||||
|
echo ""
|
||||||
|
echo ">> Special Rendering for prometheus-operator-crds ..."
|
||||||
|
helm template prometheus-operator-crds ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Standard Rendering for $chart_name ..."
|
echo ">> Standard Rendering for $chart_name ..."
|
||||||
TEMPLATE=$(helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run)
|
helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Formating rendered template ..."
|
|
||||||
echo "$TEMPLATE" | yq 'select(. != null)' | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
||||||
ls $OUTPUT_FOLDER
|
ls $OUTPUT_FOLDER
|
||||||
|
|||||||
@@ -156,10 +156,8 @@ jobs:
|
|||||||
echo ">> Chart path $chart_path"
|
echo ">> Chart path $chart_path"
|
||||||
|
|
||||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
if [ -f "$chart_path/Chart.yaml" ]; then
|
||||||
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
|
||||||
TEMPLATE=""
|
|
||||||
|
|
||||||
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
mkdir -p ${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name
|
||||||
|
OUTPUT_FOLDER="${MANIFEST_DIR}/clusters/${CLUSTER}/manifests/$chart_name/"
|
||||||
|
|
||||||
cd $chart_path
|
cd $chart_path
|
||||||
|
|
||||||
@@ -173,28 +171,40 @@ jobs:
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Rendering templates ..."
|
echo ">> Rendering templates ..."
|
||||||
|
|
||||||
case "$chart_name" in
|
case "$chart_name" in
|
||||||
"stack")
|
"stack")
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Special Rendering for stack into argocd namespace ..."
|
echo ">> Special Rendering for stack ..."
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace argocd --include-crds --dry-run)
|
helm template stack ./ --namespace argocd --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
;;
|
;;
|
||||||
"cilium" | "coredns" | "metrics-server" |"prometheus-operator-crds")
|
"cilium")
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Special Rendering for $chart_name into kube-system namespace ..."
|
echo ">> Special Rendering for cilium ..."
|
||||||
TEMPLATE=$(helm template $chart_name ./ --namespace kube-system --include-crds --dry-run)
|
helm template cilium ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
|
;;
|
||||||
|
"coredns")
|
||||||
|
echo ""
|
||||||
|
echo ">> Special Rendering for coredns ..."
|
||||||
|
helm template coredns ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
|
;;
|
||||||
|
"metrics-server")
|
||||||
|
echo ""
|
||||||
|
echo ">> Special Rendering for metrics-server ..."
|
||||||
|
helm template metrics-server ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
|
;;
|
||||||
|
"prometheus-operator-crds")
|
||||||
|
echo ""
|
||||||
|
echo ">> Special Rendering for prometheus-operator-crds ..."
|
||||||
|
helm template prometheus-operator-crds ./ --namespace kube-system --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Standard Rendering for $chart_name ..."
|
echo ">> Standard Rendering for $chart_name ..."
|
||||||
TEMPLATE=$(helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run)
|
helm template "$chart_name" ./ --namespace "$chart_name" --include-crds --dry-run | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo ">> Formating rendered template ..."
|
|
||||||
echo "$TEMPLATE" | yq 'select(. != null)' | yq -s '"'"$OUTPUT_FOLDER"'" + .kind + "-" + .metadata.name + ".yaml"'
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
echo ">> Manifests for $chart_name rendered to $OUTPUT_FOLDER"
|
||||||
ls $OUTPUT_FOLDER
|
ls $OUTPUT_FOLDER
|
||||||
|
|||||||
Reference in New Issue
Block a user