|
|
@ -1,12 +1,18 @@ |
|
|
|
#!/bin/bash |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set -e |
|
|
|
|
|
|
|
|
|
|
|
cd $(dirname $0)/.. |
|
|
|
cd $(dirname $0)/.. |
|
|
|
|
|
|
|
|
|
|
|
. ./scripts/version.sh |
|
|
|
. ./scripts/version.sh |
|
|
|
|
|
|
|
|
|
|
|
RUNC_VERSION=v1.0.1 |
|
|
|
RUNC_VERSION=v1.0.1 |
|
|
|
ROOT_VERSION=v0.9.1 |
|
|
|
ROOT_VERSION=v0.9.1 |
|
|
|
TRAEFIK_VERSION=$(awk -F/ '/traefik-([[:digit:]]+\.)/ {sub(/traefik-/, "", $6) ; sub(/\.tgz/, "", $6); print $6}' manifests/traefik.yaml) |
|
|
|
TRAEFIK_CHART_VERSION=$(yq e '.spec.chart' manifests/traefik.yaml | awk 'match($0, /([0-9.]+)([0-9]{2})/, m) { print m[1]; exit; }') |
|
|
|
|
|
|
|
TRAEFIK_PACKAGE_VERSION=$(yq e '.spec.chart' manifests/traefik.yaml | awk 'match($0, /([0-9.]+)([0-9]{2})/, m) { print m[2]; exit; }') |
|
|
|
|
|
|
|
TRAEFIK_FILE=traefik-${TRAEFIK_CHART_VERSION}${TRAEFIK_PACKAGE_VERSION}.tgz |
|
|
|
|
|
|
|
TRAEFIK_CRD_FILE=traefik-crd-${TRAEFIK_CHART_VERSION}${TRAEFIK_PACKAGE_VERSION}.tgz |
|
|
|
|
|
|
|
TRAEFIK_URL=https://helm.traefik.io/traefik/traefik-${TRAEFIK_CHART_VERSION}.tgz |
|
|
|
CHARTS_DIR=build/static/charts |
|
|
|
CHARTS_DIR=build/static/charts |
|
|
|
RUNC_DIR=build/src/github.com/opencontainers/runc |
|
|
|
RUNC_DIR=build/src/github.com/opencontainers/runc |
|
|
|
DATA_DIR=build/data |
|
|
|
DATA_DIR=build/data |
|
|
@ -58,7 +64,8 @@ download_and_package_traefik () { |
|
|
|
# Collect information on chart |
|
|
|
# Collect information on chart |
|
|
|
name=$(yq e '.name' ${TRAEFIK_TMP_CHART}/Chart.yaml) |
|
|
|
name=$(yq e '.name' ${TRAEFIK_TMP_CHART}/Chart.yaml) |
|
|
|
api_version=$(yq e '.apiVersion' ${TRAEFIK_TMP_CHART}/Chart.yaml) |
|
|
|
api_version=$(yq e '.apiVersion' ${TRAEFIK_TMP_CHART}/Chart.yaml) |
|
|
|
chart_version=$(yq e '.version' ${TRAEFIK_TMP_CHART}/Chart.yaml) |
|
|
|
chart_version=${TRAEFIK_CHART_VERSION} |
|
|
|
|
|
|
|
package_version=${TRAEFIK_PACKAGE_VERSION} |
|
|
|
|
|
|
|
|
|
|
|
# Collect information on CRDs |
|
|
|
# Collect information on CRDs |
|
|
|
crd_apis=() |
|
|
|
crd_apis=() |
|
|
@ -97,6 +104,12 @@ download_and_package_traefik () { |
|
|
|
echo -e 'global:\n systemDefaultRegistry: ""' >> ${TRAEFIK_TMP_CHART}/values.yaml |
|
|
|
echo -e 'global:\n systemDefaultRegistry: ""' >> ${TRAEFIK_TMP_CHART}/values.yaml |
|
|
|
find ${TRAEFIK_TMP_CHART} -type f | xargs sed -i 's/{{ .Values.image.name }}/{{ template "system_default_registry" .}}&/g' |
|
|
|
find ${TRAEFIK_TMP_CHART} -type f | xargs sed -i 's/{{ .Values.image.name }}/{{ template "system_default_registry" .}}&/g' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Modify chart version to append package version |
|
|
|
|
|
|
|
# If we alter our repackaging of the helm chart without also bumping the version of the |
|
|
|
|
|
|
|
# chart, the package version portion (final two digits) of the version string in the |
|
|
|
|
|
|
|
# traefik HelmChart manifest should be bumped accordingly. |
|
|
|
|
|
|
|
sed -i "s/version: .*/&${TRAEFIK_PACKAGE_VERSION}/" ${TRAEFIK_TMP_CHART}/Chart.yaml |
|
|
|
|
|
|
|
|
|
|
|
# Add dashboard annotations to main chart |
|
|
|
# Add dashboard annotations to main chart |
|
|
|
cat <<EOF >>${TRAEFIK_TMP_CHART}/Chart.yaml |
|
|
|
cat <<EOF >>${TRAEFIK_TMP_CHART}/Chart.yaml |
|
|
|
annotations: |
|
|
|
annotations: |
|
|
@ -119,10 +132,6 @@ EOF |
|
|
|
done |
|
|
|
done |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TRAEFIK_FILE=traefik-${TRAEFIK_VERSION}.tgz |
|
|
|
|
|
|
|
TRAEFIK_CRD_FILE=traefik-crd-${TRAEFIK_VERSION}.tgz |
|
|
|
|
|
|
|
TRAEFIK_URL=https://helm.traefik.io/traefik/${TRAEFIK_FILE} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setup_tmp |
|
|
|
setup_tmp |
|
|
|
download_and_package_traefik |
|
|
|
download_and_package_traefik |
|
|
|
|
|
|
|
|
|
|
|