ietf-tools / www

A customized CMS for the IETF website
BSD 3-Clause "New" or "Revised" License
22 stars 45 forks source link

Force same image and tag for the wagtail service and the cron jobs #444

Closed microamp closed 1 month ago

microamp commented 1 month ago

In values.yaml currently, we have multiple places where we specify image.

wagtail:
  name: wagtail
  image:
    repository: "ghcr.io/ietf-tools/www"
    pullPolicy: IfNotPresent
    # Overrides the image tag whose default is the chart appVersion.
    # tag: "v2.1.10"
cronjob:
  crons:
    - name: mgmt-hourly
      schedule: "0 * * * *" # "At minute 0."
      timeZone: "Etc/UTC"
      image:
        repository: "ghcr.io/ietf-tools/www"
        pullPolicy: IfNotPresent
        # tag: "v2.1.10"
      command: ["python", "/app/manage.py", "publish_scheduled"]
    - name: mgmt-weekly
      schedule: "30 0 * * 0" # "At 00:30 on Sunday."
      timeZone: "Etc/UTC"
      image:
        repository: "ghcr.io/ietf-tools/www"
        pullPolicy: IfNotPresent
        # tag: "v2.1.10"
      command: ["python", "/app/manage.py", "update_index"]

However, there's no good reason for the cron jobs to use a different image repository and tag. Consider removing image from each of the crons defined above and making them use the same image specified under wagtail. This will prevent them from becoming out of sync. Also, there will be two fewer variables to consider in the deployment code.