Skip to content

Commit

Permalink
annotate backups with airgap status (#4607)
Browse files Browse the repository at this point in the history
* annotate backups with airgap status

* use kotsadm.IsAirgap function
  • Loading branch information
laverya committed May 9, 2024
1 parent 09e35e6 commit 8556e79
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/kotsadmsnapshot/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 8556e79

Please sign in to comment.