feat: introduce /.well-known endpoint for service discovery information #3632
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.
General Checklist
Database Migrations
Just a simple way to expose some discovery data via a
/.well-known/appspecific/sh.lagoon.discovery.json
endpoint.This could expose other information too, and for tools like
lagoon-cli
andlagoon-sync
, users only need to know the API hostname (and maybe port if not standard http/s) when configuring their tools, rather than needing to know all the other endpoint information.This contains some basic information like so, as long as the variables are provided to populate it correctly. Some are already provided by the chart, others will need to be created in the chart
This requires updates to the charts to inject
SSH_TOKEN_ENDPOINT
andSSH_TOKEN_ENDPOINT_PORT
variables that require a user to define, theport
may be able to be consumed via the chart though, so only the hostname would need to be provided.Conditions for the endpoint DNS record would be if this is a fresh install of the token or ssh service, the cluster loadbalancer/service IP or name for the token endpoint may not be known immediately, so could be set to the DNS record that will eventually be populated once the loadbalancer/service IP is know after deployment.