With the HelmRepository avilable is now time to deploy our first Helm application for our database.
This database needs a bit of cusmotization in order to be discoverable and able to accept annonymous connections, here the settings needed:
cd flux-infra
mkdir -p values/staging
cat > values/staging/values.db.yaml << EOF
settings:
authMethod: trust
service:
name: db
EOF
Now we can generate the HelmRelease object via:
flux create helmrelease db \
--source=HelmRepository/helm-charts \
--chart=postgres \
--values=./values/staging/values.db.yaml \
--target-namespace=instavote \
--export > ./clusters/staging/db-helmrelease.yaml
Time to commit and publish the changes so the Reconciliation can happen:
git add clusters/staging
git commit -am "feat: Add HelmRelease control"
git push origin HEAD:refs/heads/main
You can trigger a reconciliation and verify the release status
flux reconcile source git flux-system
# Verify the HelmRelease
flux get helmreleases db
Now that the HelmRelease has been applied we should be able to see the conenction
kubectl logs --selector app=worker
Waiting for db
Connected to db
Watching vote queue