From 7676c9b81cc7f0529ce711e4f5f3e0317acae50e Mon Sep 17 00:00:00 2001
From: Hemanth Nakkina <hemanth.nakkina@canonical.com>
Date: Thu, 11 Aug 2022 20:08:52 +0530
Subject: [PATCH] specify image digest for OCI images

Update upstream-source in metadata.yaml to OCI image
digest instead of image with tag. This will help in
pinning the image to a specific revision instead of a
moving pointer based on tag.

Change-Id: Ic4324dc8c908fd2d3b613fdb1d631e0fa29df3c1
---
 charms/ovn-central-k8s/metadata.yaml | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/charms/ovn-central-k8s/metadata.yaml b/charms/ovn-central-k8s/metadata.yaml
index 2f029f6f..36540164 100644
--- a/charms/ovn-central-k8s/metadata.yaml
+++ b/charms/ovn-central-k8s/metadata.yaml
@@ -35,13 +35,19 @@ containers:
 resources:
   ovn-sb-db-server-image:
     type: oci-image
-    description: OCI image
+    description: OCI image for OVN Southbound Database Server
+    # docker.io/kolla/ubuntu-binary-ovn-sb-db-server:xena
+    upstream-source: docker.io/kolla/ubuntu-binary-ovn-sb-db-server@sha256:97105560d1360ed0a707ddf2cadc8aac1cb076cc08580a39f51ddb62e89027ca
   ovn-nb-db-server-image:
     type: oci-image
-    description: OCI image
+    description: OCI image for OVN Northbound Database Server
+    # docker.io/kolla/ubuntu-binary-ovn-nb-db-server:xena
+    upstream-source: docker.io/kolla/ubuntu-binary-ovn-nb-db-server@sha256:d3cbecbfbc2c8bdee5f6dc17d182fe004208d7b9d9da8549dba42261dbe8668f
   ovn-northd-image:
     type: oci-image
-    description: OCI image
+    description: OCI image for OVN Northd
+    # docker.io/kolla/ubuntu-binary-ovn-northd:xena
+    upstream-source: docker.io/kolla/ubuntu-binary-ovn-northd@sha256:b78cc657c2966727dca55396daac7d1797113212e97de0961fb612c6bc0ba969
 
 requires:
   certificates: