Skip to content

Standardize global image* under global.image.x

Proposal

Move to standardize the various global.imageXyXz under global.image.x

  • global.imagePullPolicy from gitlab.imagePullPolicy template
  • imagePullSecrets / image.pullSecrets currently per chart (pullsecrets template). 🤷
  • global.image.tagExtension proposed in this comment thread
  • global.image.? future expansion, such as ability to change the repository URLs (not image names) for all GitLab sourced images at once.

Details

Many community charts follow the pre-existing pattern from helm create output, which currently provides:

image:
  repository: nginx   # e.g. registry.gitlab.com/gitlab-org/build/CNG/image
  tag: stable
  pullPolicy: IfNotPresent

imagePullSecrets: []

I am not sure why imagePullSecrets was never a part of the image block in the first place, but it may be sourced from the layout in the K8S yaml spec, and that fact that is global :

kind: Deployment
metadata:
  name: example-deployment
spec:
  replicas: 1
  template:
    spec:
      imagePullSecrets: []
---
kind: Pod
metadata:
  name: example-pod
spec:
  containers: []
  imagePullSecrets: []

Work

  1. Move global.imagePullPolicy to global.image.pullPolicy
    • deprecation to move existing setting if provided
    • update gitlab.imagePullPolicy to be gitlab.image.pullPolicy, and rewrite logic to use tiered property.
  2. Implement gitlab.image.pullSecrets template
    • Most GitLab (maintained) charts are using image.pullSecrets properties and pullsecrets template.
    • Rename pullsecrets to gitlab.image.pullSecrets
  3. Implement gitlab.image.tagExtension to complete support for UBI behaviors (moved to #2860 (closed))
    • This will needs some extensive work to the GitLab maintained charts, to inject a suffix to image.tag when populated.

cc @pursultani @twk3

Separated items

  1. Allow configuration of image.registry and image.repository separately
  2. Allow specification of image.tagExtension to support easy configuration of UBI container usage
Edited by Jason Plum