Преглед изворни кода

Add matrix_matrixto_container_labels_watchtower_skip_enabled

Attaches a com.centurylinklabs.watchtower.enable=false label to the
matrix-matrixto container by default, telling Watchtower (if in use)
to skip it. The image is built locally from source, so Watchtower
cannot update it and merely produces 'digest retrieval failed' errors
on every run.

A dedicated variable is used (instead of pre-filling
matrix_matrixto_container_labels_additional_labels) so that people
overriding the additional-labels variable do not lose the label.

Fixes #4820

Based on the report and initial patch in
https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/4821 by @der-domi

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
renovate/lock-file-maintenance
Slavi Pantaleev пре 8 часа
родитељ
комит
7d2a2c40c9
2 измењених фајлова са 10 додато и 0 уклоњено
  1. +6
    -0
      roles/custom/matrix-matrixto/defaults/main.yml
  2. +4
    -0
      roles/custom/matrix-matrixto/templates/labels.j2

+ 6
- 0
roles/custom/matrix-matrixto/defaults/main.yml Прегледај датотеку

@@ -97,6 +97,12 @@ matrix_matrixto_container_labels_traefik_additional_response_headers_auto: |
}} }}
matrix_matrixto_container_labels_traefik_additional_response_headers_custom: {} matrix_matrixto_container_labels_traefik_additional_response_headers_custom: {}


# Controls whether a `com.centurylinklabs.watchtower.enable=false` label will be attached to the container.
# The label tells [Watchtower](https://containrrr.dev/watchtower/) (if in use) to skip this container.
# The container image for this service is built locally (from source), so Watchtower cannot update it
# and merely produces "digest retrieval failed" errors when it tries.
matrix_matrixto_container_labels_watchtower_skip_enabled: true

# matrix_matrixto_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file. # matrix_matrixto_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
# See `../templates/labels.j2` for details. # See `../templates/labels.j2` for details.
# #


+ 4
- 0
roles/custom/matrix-matrixto/templates/labels.j2 Прегледај датотеку

@@ -56,4 +56,8 @@ traefik.http.routers.{{ matrix_matrixto_identifier }}.tls.certResolver={{ matrix
traefik.http.services.{{ matrix_matrixto_identifier }}.loadbalancer.server.port={{ matrix_matrixto_container_http_port }} traefik.http.services.{{ matrix_matrixto_identifier }}.loadbalancer.server.port={{ matrix_matrixto_container_http_port }}
{% endif %} {% endif %}


{% if matrix_matrixto_container_labels_watchtower_skip_enabled %}
com.centurylinklabs.watchtower.enable=false
{% endif %}

{{ matrix_matrixto_container_labels_additional_labels }} {{ matrix_matrixto_container_labels_additional_labels }}

Loading…
Откажи
Сачувај