snp-technologies / lagoon

Docker Build and Deploy System for OpenShift & Kubernetes
Apache License 2.0
0 stars 0 forks source link

Replace routes.yml with Helm chart #2

Closed snpdev closed 5 years ago

snpdev commented 5 years ago

This is a sub-issue of https://github.com/amazeeio/lagoon/issues/564#issue-350184516, bullet 5:

  1. Create OpenShift objects (Services, Routes/Ingress, ConfigMaps) based on some given data within .lagoon.yml (happens in https://github.com/amazeeio/lagoon/blob/master/images/oc-build-deploy-dind/build-deploy-docker-compose.sh#L174-L304)

This issue specifically concerns the replacement of the Routes OpenShift Template with a Helm chart.

if [ $ROUTES_AUTOGENERATE_ENABLED == "true" ]; then

    OPENSHIFT_ROUTES_TEMPLATE="/oc-build-deploy/openshift-templates/${SERVICE_TYPE}/routes.yml"
    if [ -f $OPENSHIFT_ROUTES_TEMPLATE ]; then

      # The very first generated route is set as MAIN_GENERATED_ROUTE
      if [ -z "${MAIN_GENERATED_ROUTE+x}" ]; then
        MAIN_GENERATED_ROUTE=$SERVICE_NAME
      fi
      OPENSHIFT_TEMPLATE=$OPENSHIFT_ROUTES_TEMPLATE

      TEMPLATE_PARAMETERS+=(-p ROUTES_INSECURE="${ROUTES_AUTOGENERATE_INSECURE}")
      .  /oc-build-deploy/scripts/exec-openshift-resources.sh
    fi
  fi

https://github.com/amazeeio/lagoon/blob/master/images/oc-build-deploy-dind/build-deploy-docker-compose.sh#L247-L263

snpdev commented 5 years ago

Closing. We are not creating a Helm chart for each K8s resource. Rather, we will have a Helm chart for each service, e.g. Varnish.