Do not add traefik.enable=false as it breaks routing to the master

This commit is contained in:
Daniel Berteaud 2024-03-08 00:01:30 +01:00
parent 575f538842
commit cc45b50f69
1 changed files with 1 additions and 2 deletions

View File

@ -13,10 +13,9 @@ def create_svc_txn:
| .ServiceTags -= ["replica"]
| .ServiceTags -= ["uninitialized"]
| .ServiceTags -= ["[[ .traefik.instance ]].enable=true"]
| .ServiceTags -= ["[[ .traefik.instance ]].enable=false"]
| .ServiceTags += [$role]
[[- if .traefik.enabled ]]
| if $role == "master" then .ServiceTags += ["[[ .traefik.instance ]].enable=true"] else .ServiceTags += ["[[ .traefik.instance ]].enable=false"] end
| if $role == "master" then .ServiceTags += ["[[ .traefik.instance ]].enable=true"] else .ServiceTags -= ["[[ .traefik.instance ]].enable=true"] end
[[- end ]]
# Rename 'ServiceName' to 'ServiceService'