diff --git a/bootstrap/pkg/apis/apps/kfdef/v1alpha1/application_types.go b/bootstrap/pkg/apis/apps/kfdef/v1alpha1/application_types.go index 2841f9957be..a105298e4ab 100644 --- a/bootstrap/pkg/apis/apps/kfdef/v1alpha1/application_types.go +++ b/bootstrap/pkg/apis/apps/kfdef/v1alpha1/application_types.go @@ -35,7 +35,7 @@ type KfDefSpec struct { SkipInitProject bool `json:"skipInitProject,omitempty"` UseIstio bool `json:"useIstio"` ServerVersion string `json:"serverVersion,omitempty"` - DeleteStorage bool `json:"deleteStorage"` + DeleteStorage bool `json:"deleteStorage,omitempty"` } var DefaultRegistry = &RegistryConfig{ diff --git a/bootstrap/pkg/kfapp/coordinator/coordinator.go b/bootstrap/pkg/kfapp/coordinator/coordinator.go index 1f262fb2c6f..94cd0588d4b 100644 --- a/bootstrap/pkg/kfapp/coordinator/coordinator.go +++ b/bootstrap/pkg/kfapp/coordinator/coordinator.go @@ -364,7 +364,7 @@ func LoadKfApp(options map[string]interface{}) (kftypes.KfApp, error) { if options[string(kftypes.MOUNT_LOCAL)] != nil { kfdef.Spec.MountLocal = options[string(kftypes.MOUNT_LOCAL)].(bool) } - if options[string(kftypes.DELETE_STORAGE)] != nil { + if options[string(kftypes.DELETE_STORAGE)] != nil && kfdef.Spec.Platform == kftypes.GCP { kfdef.Spec.DeleteStorage = options[string(kftypes.DELETE_STORAGE)].(bool) } pApp := GetKfApp(kfdef)