forge icon indicating copy to clipboard operation
forge copied to clipboard

Support Helm charts

Open richarddli opened this issue 8 years ago • 2 comments

Forge can output Helm charts, and not just the deployment manifests

richarddli avatar Jun 29 '17 20:06 richarddli

FWIW, I'm experimenting on an another way of integrating forge with Helm charts - something like this:

  if [ -d k8s/ ]; then
    echo removing directory k8s/...
    rm -rf k8s/
  fi
  mkdir k8s/
  echo rendering k8s/manifests-from-helm-template.yaml...
  helm-secrets template \
    --name '{{build.name}}' \
    --set 'image.repository=\{\{build.images[\"Dockerfile\"]\
.split(\":\")[0]\}\},image.tag=\{\{build.images[\"Dockerfile\
\"].split(\":\")[1]\}\}' . \
    -f values.yaml \
    -f secrets.yaml \
    > k8s/manifests-from-helm-template.yaml
  forge build manifest
  kubectl apply -f  .forge/k8s/$service_name/manifests-from-helm-template.yaml --prune ...

Basically, it works like:

  • forge computes and passes dynamic values(like image tag) to helm
  • Then, helm(-secrets) combines decrypted secrets + raw config values to produce forge-style k8s manifests under k8s/.
  • forge renders k8s manifests into .forge/k8s/$service_name/manifests-from-helm-template.yaml.
  • kubectl apply to apply the rendered k8s manifests into the cluster

mumoshu avatar Jan 25 '18 15:01 mumoshu

I am new with helm, I want to understand what situations integration of helm and forge and CI can be useful. @mumoshu does this really work well for you? Isn't this overengineering?

augustgerro avatar Feb 24 '20 09:02 augustgerro