From 20f41f0a32347f977d1ec3f49aae4e1d6cbbcc7d Mon Sep 17 00:00:00 2001
From: "Benjamin A. Petersen" <ben@benjaminapetersen.me>
Date: Tue, 29 Aug 2023 12:44:11 -0400
Subject: [PATCH] metadata.yml files support namespace templating

---
 deploy_carvel/concierge/metadata.yml                | 4 ++++
 deploy_carvel/package-repository/.imgpkg/images.yml | 2 +-
 deploy_carvel/supervisor/metadata.yml               | 4 ++++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/deploy_carvel/concierge/metadata.yml b/deploy_carvel/concierge/metadata.yml
index f310bb31..d1a57b1f 100644
--- a/deploy_carvel/concierge/metadata.yml
+++ b/deploy_carvel/concierge/metadata.yml
@@ -1,7 +1,11 @@
+#@ load("@ytt:data", "data")  # for reading data values (generated via ytt's data-values-schema-inspect mode).
+#@ load("@ytt:yaml", "yaml")  # for dynamically decoding the output of ytt's data-values-schema-inspect
+---
 apiVersion: data.packaging.carvel.dev/v1alpha1
 kind: PackageMetadata
 metadata:
   name: concierge.pinniped.dev
+  namespace: #@ data.values.namespace
 spec:
   displayName: "Pinniped Concierge"
   longDescription: "Pinniped concierge enables consistent login across Kubernetes clusters on public cloud providers such as AKS, EKS and GKE"
diff --git a/deploy_carvel/package-repository/.imgpkg/images.yml b/deploy_carvel/package-repository/.imgpkg/images.yml
index 1a9a5122..2a6b7ebc 100644
--- a/deploy_carvel/package-repository/.imgpkg/images.yml
+++ b/deploy_carvel/package-repository/.imgpkg/images.yml
@@ -14,5 +14,5 @@ images:
       - resolved:
           tag: 0.25.0
           url: benjaminapetersen/pinniped-package-repo-package-supervisor:0.25.0
-  image: index.docker.io/benjaminapetersen/pinniped-package-repo-package-supervisor@sha256:95ce6e00bc9eb9becea021c5d8fe0fdeb241fd974c7fc8076220cb24d65650e1
+  image: index.docker.io/benjaminapetersen/pinniped-package-repo-package-supervisor@sha256:3da81c3b0554e4e59ee1c8e63d582a753c9b9c7deb170d35209d3f1ee7df2245
 kind: ImagesLock
diff --git a/deploy_carvel/supervisor/metadata.yml b/deploy_carvel/supervisor/metadata.yml
index 8a9e0e81..fb0e6e95 100644
--- a/deploy_carvel/supervisor/metadata.yml
+++ b/deploy_carvel/supervisor/metadata.yml
@@ -1,7 +1,11 @@
+#@ load("@ytt:data", "data")  # for reading data values (generated via ytt's data-values-schema-inspect mode).
+#@ load("@ytt:yaml", "yaml")  # for dynamically decoding the output of ytt's data-values-schema-inspect
+---
 apiVersion: data.packaging.carvel.dev/v1alpha1
 kind: PackageMetadata
 metadata:
   name: supervisor.pinniped.dev
+  namespace: #@ data.values.namespace
 spec:
   displayName: "Pinniped Supervisor"
   longDescription: "Pinniped supervisor allows seamless login across one or many Kubernetes clusters including AKS, EKS and GKE"