Improve Readability of Names #245
Merged
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.
Now that the ServiceMonitor works, it becomes apparent that only using UUIDs might not be so optimal for actually operating a postgres instance. It is not very convenient (and quite error prone) to select the correct uuid from an endless list of uuids in the monitoring dashboard. Also, finding logs is not so pleasant. It it gets even worse once we enable prometheus-federation and the customers access that data.
By now, we only need the namespace to be unique, so it's creation can stay as is (actually it can even simplified a litte, as it does not need to be a valid dns name aka start with a letter anymore).
So this opens up the possibility to be more playful with the actual
teamID
andname
within the realm of the postgres operator. This proof of concept uses the tenant name as teamid and theteamid
+description
as the name.The result looks like this:
would become
Still not perfect, but hopefully way easier to find in the monitoring dashboard.
As the
description
is not unique, we should add a part of the ID at the end. Everything is namespaced, so this is technically not neccessary.We could also consider using project description to make the teamid longer, but we currently do not have access to that description.
Update: Using the description as the database name would also mean that the description can not be edited after postgres creation: