Using Object Storage

In this section, you’ll use Simple Object Storage (SOS), an Exoscale AWS S3-compatible storage service, to store images used by the VotingApp.

Using images instead of labels

The VotingApp allows dynamic configuration of labels and images. The default configuration is below; it uses string labels for cats and dogs.

# Dynamic configuration
items:
  labels:
    a: "cats"
    b: "dogs"
  images:
    enabled: false
    a: https://sos-ch-gva-2.exo.io/votingapp/items/a.png
    b: https://sos-ch-gva-2.exo.io/votingapp/items/b.png

Modify your current values.yaml file, so it allows using images instead of labels.

values.yaml
items:
  images:
    enabled: true

Next, upgrade the application.

helm upgrade --install vote oci://registry-1.docker.io/voting/app --version v1.0.36 --namespace vote --create-namespace -f values.yaml

The vote-ui and result-ui web interfaces should now display images as follows:

vote

result

In the next part, you’ll use your images.

Create a bucket

First, go to the Storage section.

bucket list

Next, create a bucket.

bucket creation

⚠️
Since bucket names are global, do not use generic names, as somebody may already use them.

bucket created

Next, explore the bucket’s detailed page and select the “Upload Object” action.

Upload objects

Select two images from your local machine.

ℹ️
Please use square PNG images

Objects uploaded

Change the “content-type” header into “image/png” for each image.

Object change headers

Next, add the PUBLIC_READ ACL to make the images public.

Object add ACL

From the image’s detail page, get the public URL and use it in the values.yaml file as follows:

values.yaml
items:
  images:
    enabled: true
    a: https://sos-ch-gva-2.exo.io/votingapp-bucket-tom/argocd.png  # Use the URL of your image
    b: https://sos-ch-gva-2.exo.io/votingapp-bucket-tom/flux.png    # Use the URL of your image
helm upgrade --install vote oci://registry-1.docker.io/voting/app --version v1.0.36 --namespace vote --create-namespace -f values.yaml

Vote GitOps

Result GitOps

ℹ️
Want to know more about Exoscale Object Storage offering? Visit the documentation to get the entire feature set.