Skip to content

Commit

Permalink
feat(nodejs_chart): empty HELM_RENDER_ARGS
Browse files Browse the repository at this point in the history
BREAKING CHANGE: **feat(nodejs_chart)**: empty HELM_RENDER_ARGS
  - No args are given by default (expect the `--values`)
    We recommend that in your project, you at least set :

    ```yaml
    .deploy_job:
      extends: .base_deploy_nodejs_chart_stage
      # [...]
      before_script:
        - *resolve_env_domain
        - HOST=${FRONTEND_HOST}
        - HELM_RENDER_ARGS="
            --set image.tag=${CI_COMMIT_SHA}
            --set ingress.hosts[0].host=${HOST}
            --set ingress.tls[0].hosts[0]=${HOST}"
        - |
          if [[ "${BRANCH_NAME}" = "master" ]]; then
            HELM_RENDER_ARGS="
              ${HELM_RENDER_ARGS}
              --set ingress.annotations."certmanager\.k8s\.io/cluster-issuer"=letsencrypt-prod
              --set ingress.annotations."kubernetes\.io/tls-acme"=true
              --set ingress.tls[0].secretName=${PROJECT}-certificate"
          fi
    ```
  • Loading branch information
douglasduteil committed Nov 24, 2019
1 parent a2508f2 commit e335c1c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,20 @@ include:
before_script:
- K8S_NAMESPACE=my-namespace
- HOST=myapp.dev.factory.social.gouv.fr
#
- HELM_RENDER_ARGS="
--set ingress.hosts[0].host=${HOST}
--set ingress.tls[0].hosts[0]=${HOST}
${HELM_RENDER_ARGS}"
# In production
# - HELM_RENDER_ARGS="
# --set ingress.annotations."certmanager\.k8s\.io/cluster-issuer"=letsencrypt-prod
# --set ingress.annotations."kubernetes\.io/tls-acme"=true
# --set ingress.tls[0].secretName=${PROJECT}-certificate
# ${HELM_RENDER_ARGS}"
--set image.tag=${IMAGE_TAG}
--set ingress.hosts[0].host=${HOST}
--set ingress.tls[0].hosts[0]=${HOST}"
# In production (if the master branch is your production)
- |
if [[ "${BRANCH_NAME}" = "master" ]]; then
HELM_RENDER_ARGS="
${HELM_RENDER_ARGS}
--set ingress.annotations."certmanager\.k8s\.io/cluster-issuer"=letsencrypt-prod
--set ingress.annotations."kubernetes\.io/tls-acme"=true
--set ingress.tls[0].secretName=${PROJECT}-certificate"
fi
#
Expand Down
3 changes: 1 addition & 2 deletions base_deploy_nodejs_chart_stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
.base_deploy_nodejs_chart_stage:
extends: .base_docker_helm_image_stage
variables:
HELM_RENDER_ARGS: >-
--set image.tag=${IMAGE_TAG}
HELM_RENDER_ARGS: ""
script:
- helm init --client-only
- kubectl config set-context --current --namespace=${K8S_NAMESPACE}
Expand Down

0 comments on commit e335c1c

Please sign in to comment.