Skip to content

treat every embedded cluster app as if it has a backup object #4571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pkg/handlers/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ func responseAppFromApp(a *apptypes.App) (*types.ResponseApp, error) {
return nil, errors.Wrap(err, "failed to check if snapshots is allowed")
}
allowSnapshots := s && license.Spec.IsSnapshotSupported
allowSnapshots = allowSnapshots && !util.IsEmbeddedCluster() // snapshots are not allowed in embedded cluster installations today

isGitopsSupported := license.Spec.IsGitOpsSupported && !util.IsEmbeddedCluster() // gitops is not allowed in embedded cluster installations today

Expand Down
17 changes: 16 additions & 1 deletion pkg/kotsutil/kots.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,22 @@ func (o KotsKinds) Marshal(g string, v string, k string) (string, error) {
if v == "v1" {
if k == "Backup" {
if o.Backup == nil {
return "", nil
if util.IsEmbeddedCluster() {
// return the default backup object
backup := &velerov1.Backup{
TypeMeta: metav1.TypeMeta{
APIVersion: "velero.io/v1",
Kind: "Backup",
},
ObjectMeta: metav1.ObjectMeta{
Name: "backup",
},
}
o.Backup = backup
} else {
return "", nil
}

}
var b bytes.Buffer
if err := s.Encode(o.Backup, &b); err != nil {
Expand Down