support optional env which dictates status check url format #146
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Allows the user to (optionally) specify a custom cluster domain for their kubernetes cluster.
why?
Upon deploying this to one of my clusters I noticed the operator was complaining about not being able to get a status from the service:
On inspection I realised the cluster domain in my kubernetes cluster and the one hardcoded here https://github.com/grafana/k6-operator/blob/main/controllers/k6_start.go#L20 were different.
other items of note
I've updated the yaml manifest and Makefile to support passing this variable through during
make deploy
. The approach I took here was to useenvsubstr
- this is a new dependency for this repository but at a glance it appears to be in use on other projects in this org so I hope that's ok. source: https://github.com/search?q=org%3Agrafana+envsubst&type=codetesting
I have tested this with and without
K6_CLUSTER_DOMAIN
env set and confirmed: