outposts: fix docker controller always replacing beta images

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-06-05 16:08:20 +02:00
parent 24da24b5d5
commit cefe3fa6dd
1 changed files with 4 additions and 5 deletions

View File

@ -90,12 +90,11 @@ class DockerController(BaseController):
# Check if the container is out of date, delete it and retry
if len(container.image.tags) > 0:
tag: str = container.image.tags[0]
_, _, version = tag.partition(":")
if version != __version__:
if tag != self.get_container_image():
self.logger.info(
"Container has mismatched version, re-creating...",
has=version,
should=__version__,
"Container has mismatched image, re-creating...",
has=tag,
should=self.get_container_image(),
)
self.down()
return self.up()