Add dynamic ingress hostname and NodePort env vars #259
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.
Hello.
So this PR might be over-complicated/over engineered. I have not messed with k8 and spent several days it feels figuring this out, and had a lot of AI help.
The key things it adds are
Now the hostnames are much easier to deal with overall. However the ports put me through rabbit hole hell.
setService
helper. Found also it has to be called direct and not on the workload reference, using go's pass through on struct embedding.waitForProcessedVersion
was created along with k8 retry helper imported because I was concerned about cached data being returned as it seems some stuff is processed async, and i got a conflict error at-least 1 time.This PR is currently a draft to get feedback on how this should be best implemented vs what I have done. I also generally don't do unit tests in most cases so if they are needed, will need to be advised where at.
This is what has currently worked for me and I will be deploying this to prod for my projects workloads.
The use case for me is I have mysql master & slave servers that has to self identify themselves (host and port) and register with etcd. I have a docker image im building that acts as one side of the cluster at https://github.com/LumeWeb/akash-mysql with https://github.com/LumeWeb/akash-proxysql being the other.
Kudos.