Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-1607

Document how to unset quay.expires-after label

XMLWordPrintable

    • False
    • False
    • Quay Enterprise
    • Undefined
    • 0

      As a user of upstream images that set the quay.expires-after, I'd like my derived images to not have an expiration, so that I can keep pulling my image.

      Background

      There's a team within my company that publishes hardened images to Quay for other teams to use. These hardened images are updated constantly, and old images have a 4-week expiration time set via the "quay.expires-after=4w" label so that no one can pull the older images which aren't as secure.

      So I need to unset that label to publish a derived image, but you can't natively unset docker labels: https://stackoverflow.com/questions/50978051/how-do-i-unset-a-docker-image-label

      The docs also do not explicitly mention how to unset the label, or how to set the image to never expire if the label is already set: https://access.redhat.com/documentation/en-us/red_hat_quay/3/html/use_red_hat_quay/working_with_tags#setting_tag_expiration_from_a_dockerfile

       

      If you google around, you can find users who try setting the label to "quay.expires-after=''" or "quay.expires-after=never", but this strategy relies on the non-public implementation details of Quay since it forces the code to throw an exception: https://github.com/quay/quay/blob/bd7252c536bcf8c49cca167d7c4b433489d36044/util/timedeltastring.py#L4

      https://github.com/quay/quay/blob/42c3712075402e1a367043e28eb2df8e44687d42/data/registry_model/label_handlers.py#L13

      I think it would be nice to officially/publicly support empty strings or "never" for that label.

      Acceptance Criteria

      • Update /data/registry_model/label_handlers.py so that an empty string or "never" will explicitly disable expiration without throwing an exception
      • Update the documentation so say that empty strings or "never" are valid values for the "quay.expires-after" label.

       

            rhn-support-stevsmit Steven Smith
            mac-chaffee Mac Chaffee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: