---
description: >-
  This step is Optional in terms of creating a certified operator but it is a
  technical requirement for the Red Hat Marketplace.
---

# Using a Single Image Variable (Red Hat Marketplace)

{% hint style="info" %}
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.&#x20;
{% endhint %}

Instead of breaking up the image into \<registry>/\<image>:\<tag> or some variation, use a single image variable for all three parts.

{% code title="roles/main.yaml" %}
```bash
#Instead of 
#image: "{{ image.repository }}/{{ image.image_name }}:{{ image.tag }}"

#use
image: "{{ image }}"'
```
{% endcode %}

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.

{% code title="defaults/main.yaml" %}
```bash
#instead of
#image
#  repository: <repo>
#  image_name: <image>
#  tag: <tag>

#use
image: <repository>/<image>:<tag>
```
{% endcode %}
