forge
forge copied to clipboard
Support Helm charts
Forge can output Helm charts, and not just the deployment manifests
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 applyto apply the rendered k8s manifests into the cluster
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?