Using a Single Image Variable (Red Hat Marketplace)
This step is Optional in terms of creating a certified operator but it is a technical requirement for the Red Hat Marketplace.
We recommend using the following format when referencing your images within your values.yaml file. It will make it easier to refactor your operator if it needs to be provided within an air-gapped environment. This is also a technical requirement for the Red Hat Marketplace.
Instead of breaking up the image into <registry>/<image>:<tag> or some variation, use a single image variable for all three parts.
roles/main.yaml
1
#Instead of
2
#image: "{{ image.repository }}/{{ image.image_name }}:{{ image.tag }}"
3
4
#use
5
image: "{{ image }}"'
Copied!
If you change the role for this, make sure you also update the defaults/main.yaml and vars/main.yaml to reflect the new variable.
defaults/main.yaml
1
#instead of
2
#image
3
# repository: <repo>
4
# image_name: <image>
5
# tag: <tag>
6
7
#use
8
image: <repository>/<image>:<tag>
Copied!
Last modified 9mo ago
Copy link