From 8556e7933250804501487b65659ed2096b990adb Mon Sep 17 00:00:00 2001 From: Andrew Lavery Date: Thu, 9 May 2024 23:13:12 +0800 Subject: [PATCH] annotate backups with airgap status (#4607) * annotate backups with airgap status * use kotsadm.IsAirgap function --- pkg/kotsadmsnapshot/backup.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/kotsadmsnapshot/backup.go b/pkg/kotsadmsnapshot/backup.go index b0c25b6d60..53e8e7b020 100644 --- a/pkg/kotsadmsnapshot/backup.go +++ b/pkg/kotsadmsnapshot/backup.go @@ -16,6 +16,7 @@ import ( apptypes "github.com/replicatedhq/kots/pkg/app/types" "github.com/replicatedhq/kots/pkg/embeddedcluster" "github.com/replicatedhq/kots/pkg/k8sutil" + "github.com/replicatedhq/kots/pkg/kotsadm" kotsadmtypes "github.com/replicatedhq/kots/pkg/kotsadm/types" "github.com/replicatedhq/kots/pkg/kotsadmsnapshot/types" "github.com/replicatedhq/kots/pkg/kotsutil" @@ -370,6 +371,7 @@ func CreateInstanceBackup(ctx context.Context, cluster *downstreamtypes.Downstre backupAnnotations["kots.io/kotsadm-deploy-namespace"] = kotsadmNamespace backupAnnotations["kots.io/apps-sequences"] = marshalledAppsSequences backupAnnotations["kots.io/apps-versions"] = marshalledAppVersions + backupAnnotations["kots.io/is-airgap"] = strconv.FormatBool(kotsadm.IsAirgap()) if util.IsEmbeddedCluster() { backupAnnotations["kots.io/embedded-cluster"] = "true" backupAnnotations["kots.io/embedded-cluster-id"] = util.EmbeddedClusterID()