senzing-garage / charts

:no_entry: [DEPRECATED]
Apache License 2.0
0 stars 4 forks source link

Create senzing/senzing-init-postgresql chart #218

Closed docktermj closed 2 years ago

docktermj commented 2 years ago

Auto-generation:

export GIT_ACCOUNT=senzing
export GIT_REPOSITORY=charts
export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git
export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"

export SENZING_HELM_IMAGE_NAME="init-postgresql"
export SENZING_HELM_CHART_NAME=senzing-${SENZING_HELM_IMAGE_NAME}

export SENZING_HELM_COMPONENT_NAME=${SENZING_HELM_CHART_NAME}-component
export SENZING_HELM_CONTAINER_NAME=${SENZING_HELM_CHART_NAME}
export SENZING_HELM_DESCRIPTION="FIXME:"
export SENZING_HELM_MAIN_CONTAINER_NAME=${SENZING_HELM_CHART_NAME}
export SENZING_HELM_MAIN_OBJECT_BLOCK=main
export SENZING_HELM_TEMPLATE_NAME=${SENZING_HELM_CHART_NAME}
export SENZING_HELM_UPSTREAM_PROJECT_URL=https://github.com/Senzing/charts/tree/master/charts/${SENZING_HELM_CHART_NAME}
export SENZING_HELM_UPSTREAM_PROJECT_VERSION=""

export SENZING_HELM_CHART_SOURCE_DIR=${GIT_REPOSITORY_DIR}/template/CHART_NAME
export SENZING_HELM_CHART_TARGET_DIR=${GIT_REPOSITORY_DIR}/charts/${SENZING_HELM_CHART_NAME}

mkdir -p ${SENZING_HELM_CHART_TARGET_DIR}
cp -r ${SENZING_HELM_CHART_SOURCE_DIR}/* ${SENZING_HELM_CHART_TARGET_DIR}
cp ${SENZING_HELM_CHART_SOURCE_DIR}/.helmignore ${SENZING_HELM_CHART_TARGET_DIR}

for FILE in $(find ${SENZING_HELM_CHART_SOURCE_DIR} -type f); \
do \
  FILE_PATH=$(awk -F"${SENZING_HELM_CHART_SOURCE_DIR}/" '{print $2}' <<< "${FILE}")
  envsubst '\
    ${SENZING_HELM_CHART_NAME} \
    ${SENZING_HELM_COMPONENT_NAME} \
    ${SENZING_HELM_CONTAINER_NAME} \
    ${SENZING_HELM_DESCRIPTION} \
    ${SENZING_HELM_IMAGE_NAME} \
    ${SENZING_HELM_MAIN_CONTAINER_NAME} \
    ${SENZING_HELM_MAIN_OBJECT_BLOCK} \
    ${SENZING_HELM_OTHER_OBJECT_BLOCK} \
    ${SENZING_HELM_SECONDARY_OBJECT_BLOCK} \
    ${SENZING_HELM_TEMPLATE_NAME} \
    ${SENZING_HELM_UPSTREAM_PROJECT_URL} \
    ${SENZING_HELM_UPSTREAM_PROJECT_VERSION} \
  ' \
  < "${FILE}" \
  > "${SENZING_HELM_CHART_TARGET_DIR}/${FILE_PATH}";
done
docktermj commented 2 years ago

Pull requests: