This is just experiments with:
- Go (v1.15.1)
- Kubernetes (OSX Docker Desktop)
- Helm (v2.9.0+, v3.+)
- environment yaml files to env variables
- environment global with local overrides
# Build the docker image
./bin/docker-build-push.sh -n NAME -v VERSION
# Update Chart.yaml appVersion to the VERSION above
# helm deploy
./bin/deploy.sh
Environment variables are exposed to the service from YAML files in environment
folder. The YAML, containing a map named
config
is mapped to environment variables as follows:
config:
max: "42"
database:
name: "server.name.com"
port: "2056"
The environment variables that result will be:
CONFIG_MAX=42
CONFIG_DATABASE_NAME=server.name.com
CONFIG_DATABASE_PORT=2056
# Remove 2.9.0
helm delete NAME --purge
# Remove 3.+
helm uninstall NAME
# Install 2.9.0
helm install CHART_PATH -name NAME
# INSTALL 3.+
helm install NAME CHART_PATH
- Helm 2.9.0 issues:
- Helm init doesn't work, see helm-init.sh for fix.
- Helm delete, even with
--purge
leaves running pod. Need t usekubectl
to kill.
- Helm 3+:
helm uninstall
seems to work properly
- I'm not using a two stage build with a
Golang
docker image.- Building a
Linux amd64
binary and copying that into anAlpine
image in anticipation of having to build from a very large source base in the future and wanting to avoid multi-stage build pattern.
- Building a
- Helm chart stripped back as much as possible.