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 # Check if the container is out of date, delete it and retry
if len(container.image.tags) > 0: if len(container.image.tags) > 0:
tag: str = container.image.tags[0] tag: str = container.image.tags[0]
_, _, version = tag.partition(":") if tag != self.get_container_image():
if version != __version__:
self.logger.info( self.logger.info(
"Container has mismatched version, re-creating...", "Container has mismatched image, re-creating...",
has=version, has=tag,
should=__version__, should=self.get_container_image(),
) )
self.down() self.down()
return self.up() return self.up()