- A running kubernetes cluster (if you don't have one see Setup a local cluster section)
- skaffold installed on your machine
- helm 3 installed on your machine
- kubectl installed on your machine
- You need a machine with docker up & running
- If you are using Docker Desktop enable the kubernetes cluster from the config (see docs here)
Otherwise you can decide to use kind or minukube
Start skaffold
using the command:
make dev
this will automatically:
- build your docker image every time you change some code
- update the helm release every time you change the helm chart
- expose the caddy ingress controller (port 8080 and 8443)
You can test that all work as expected with:
curl -D - -s -k https://example1.kubernetes.localhost:8443/hello1 --resolve example1.kubernetes.localhost:8443:127.0.0.1
curl -D - -s -k https://example1.kubernetes.localhost:8443/hello2 --resolve example1.kubernetes.localhost:8443:127.0.0.1
curl -D - -s -k https://example2.kubernetes.localhost:8443/hello1 --resolve example2.kubernetes.localhost:8443:127.0.0.1
curl -D - -s -k https://example2.kubernetes.localhost:8443/hello2 --resolve example2.kubernetes.localhost:8443:127.0.0.1
You can change domains defined in kuberentes/sample
folder with some domain that are risolved on your local machine or you can add them in the /etc/host
file to be automatically resolved as localhost.
- You can change local port forwarded by skaffold by changing the port values in the
skaffold.yaml
file on sectionportForward
localPort
. Remind that you can forward only port greater than 1024 if you execute it as non-root user - We use an internal CA for test to simplify the installation, but then you can decide to use external CA for tests, see the
values.yaml
in the helm chart for the info on how to configure it.
If you want to release a new version of the caddy-ingress-controller
chart, you'll need
to create a new PR with:
- The new chart's
version
inChart.yaml
- The new
image.tag
invalues.yaml
(if you want to update the default image used in the chart) - The new
appVersion
inChart.yaml
(if you did the previous line)
To release a new caddy-ingress-controller image, you need to create a new semver tag. It will build and push an image to https://hub.docker.com/r/caddy/ingress.