Using Object Storage

Store application assets in 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.

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.

items:
  images:
    enabled: true

[!WARNING] By default, it uses images available at the following URLs:

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-ui-sos

result-ui-sos

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

First, go to the Storage section.

buckets-sos

Next, create a bucket.

create-buckets-sos

[!WARNING] Since bucket names are global, do not use generic names, as somebody may already use them.

display-buckets-sos

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

upload-object

Select two images from your local machine.

[!INFO] Please use square PNG images

votingapp-bucket-tom

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

content-type-sos

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

public-read-sos

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

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-sos

result-sos

[!INFO] Want to know more about Exoscale Object Storage offering? Visit the documentation to get the entire feature set.