outposts: make k8s object naming configurable

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-05-05 15:35:56 +02:00
parent 446f104c90
commit 9a15a66d85
6 changed files with 5 additions and 17 deletions

View File

@ -42,7 +42,10 @@ class KubernetesObjectReconciler(Generic[T]):
@property
def name(self) -> str:
"""Get the name of the object this reconciler manages"""
raise NotImplementedError
return self.controller.outpost.config.object_naming_template % {
"name": self.controller.outpost.name,
"uuid": self.controller.outpost.uuid.hex,
}
def up(self):
"""Create object if it doesn't exist, update if needed or recreate if needed."""