danielmzak / helm-ytt-templates

temp project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

  • Example of using HELM charts with YTT templates and in CICD pipelines

Basic idea:

  • DRY access - i.e. don't repeat the same values - HELM has it's own template system, but in value files there are usually the same properties in several locations.
  • If there are multiple microservices based on the same dev stack, create a parent HELM chart and reuse it.
  • Create a resuable basic config file and specify individual settings for each microservice.
  • Abstract and generate common parts (HELM, CICD scripts ...)
  • Make pipelines consistent
  • Avoid search and replace access
  • Make the whole process less buggy

Workflow:


  • in CICD pipelines then we can use:
    - step: &redeploy-to-dev
        name: Build & Deploy to dev
        deployment: dev
        <<: *step_configuration
        script:
          - git clone --depth=1 git@bitbucket.org:company-01/helm-ytt-templates.git
          - source helm-ytt-templates/be-apps/be-apps/sube-dummy-service/scripts/dev-env-vars.sh
          - source helm-ytt-templates/cicd/scripts/build_and_deploy.sh true
  • see: generated env settings dev-env-vars.sh
  • see: cicd scrips
  • this process could be simplified (redeploy-to-{env-variable}), but bitbucket have same limits (doable in github/gitlab))

Notes:

  • example springbooot "parent" chart
  • here is in deployment.yaml is the part which allow to smaller microservices start quickly, but bigger/slower one starts too, becouse of failureThreshold is setted to 60
          startupProbe:
            httpGet:
              path: /actuator/health
              port: http
            failureThreshold: 60
            periodSeconds: 10

About

temp project


Languages

Language:Shell 68.6%Language:Python 21.3%Language:Smarty 5.8%Language:Dockerfile 4.4%