mirror of
https://github.com/rancher/rke.git
synced 2025-08-31 22:46:25 +00:00
Add BackupConfig Enabled flag
This commit is contained in:
committed by
Alena Prokharchyk
parent
efab83d804
commit
1e34a7c5fa
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/rancher/rke/log"
|
||||
"github.com/rancher/rke/services"
|
||||
"github.com/rancher/rke/util"
|
||||
"github.com/rancher/types/apis/management.cattle.io/v3"
|
||||
v3 "github.com/rancher/types/apis/management.cattle.io/v3"
|
||||
"k8s.io/apimachinery/pkg/util/validation"
|
||||
)
|
||||
|
||||
@@ -139,7 +139,8 @@ func validateServicesOptions(c *Cluster) error {
|
||||
}
|
||||
|
||||
func validateEtcdBackupOptions(c *Cluster) error {
|
||||
if c.Services.Etcd.BackupConfig != nil {
|
||||
if c.Services.Etcd.BackupConfig != nil &&
|
||||
c.Services.Etcd.BackupConfig.Enabled != nil && *c.Services.Etcd.BackupConfig.Enabled {
|
||||
if c.Services.Etcd.BackupConfig.S3BackupConfig != nil {
|
||||
if len(c.Services.Etcd.BackupConfig.S3BackupConfig.Endpoint) == 0 {
|
||||
return fmt.Errorf("etcd s3 backup backend endpoint can't be empty")
|
||||
|
Reference in New Issue
Block a user