From baaa9d80598f8d14f97b7cbc49502264483728b6 Mon Sep 17 00:00:00 2001 From: Xieql Date: Wed, 6 Sep 2023 10:11:37 +0800 Subject: [PATCH] update Signed-off-by: Xieql --- .../en/references/fleet_v1alpha1_types.html | 17 ++++++++++++++--- .../crds/fleet.kurator.dev_fleet.yaml | 18 ++++++++++++------ pkg/apis/fleet/v1alpha1/types.go | 8 +++++--- .../fleet/v1alpha1/zz_generated.deepcopy.go | 11 +++++++++-- 4 files changed, 40 insertions(+), 14 deletions(-) diff --git a/docs/content/en/references/fleet_v1alpha1_types.html b/docs/content/en/references/fleet_v1alpha1_types.html index 67b981647..a2c7cd844 100644 --- a/docs/content/en/references/fleet_v1alpha1_types.html +++ b/docs/content/en/references/fleet_v1alpha1_types.html @@ -268,18 +268,18 @@

BackupStorageLocation -

Provider specifies the storage provider type (e.g., aws).

+

Provider specifies the storage provider type (e.g., aws, gcp, azure).

-s3Url
+endpoint
string -

S3Url provides the endpoint URL for S3-compatible storage.

+

Endpoint provides the endpoint URL for the storage.

@@ -293,6 +293,17 @@

BackupStorageLocation

Region specifies the region of the storage.

+ + +config
+ +map[string]string + + + +

Config is a map for additional provider-specific configurations.

+ + diff --git a/manifests/charts/fleet-manager/crds/fleet.kurator.dev_fleet.yaml b/manifests/charts/fleet-manager/crds/fleet.kurator.dev_fleet.yaml index 3237250e5..0cb1c7dcf 100644 --- a/manifests/charts/fleet-manager/crds/fleet.kurator.dev_fleet.yaml +++ b/manifests/charts/fleet-manager/crds/fleet.kurator.dev_fleet.yaml @@ -151,22 +151,28 @@ spec: bucket: description: Bucket specifies the storage bucket name. type: string + config: + additionalProperties: + type: string + description: Config is a map for additional provider-specific + configurations. + type: object + endpoint: + description: Endpoint provides the endpoint URL for + the storage. + type: string provider: description: Provider specifies the storage provider - type (e.g., aws). + type (e.g., aws, gcp, azure). type: string region: description: Region specifies the region of the storage. type: string - s3Url: - description: S3Url provides the endpoint URL for S3-compatible - storage. - type: string required: - bucket + - endpoint - provider - region - - s3Url type: object secretName: description: "SecretName represents the name of the secret diff --git a/pkg/apis/fleet/v1alpha1/types.go b/pkg/apis/fleet/v1alpha1/types.go index 9167623be..e00325616 100644 --- a/pkg/apis/fleet/v1alpha1/types.go +++ b/pkg/apis/fleet/v1alpha1/types.go @@ -296,12 +296,14 @@ type BackupStorage struct { type BackupStorageLocation struct { // Bucket specifies the storage bucket name. Bucket string `json:"bucket"` - // Provider specifies the storage provider type (e.g., aws). + // Provider specifies the storage provider type (e.g., aws, gcp, azure). Provider string `json:"provider"` - // S3Url provides the endpoint URL for S3-compatible storage. - S3Url string `json:"s3Url"` + // Endpoint provides the endpoint URL for the storage. + Endpoint string `json:"endpoint"` // Region specifies the region of the storage. Region string `json:"region"` + // Config is a map for additional provider-specific configurations. + Config map[string]string `json:"config,omitempty"` } // FleetStatus defines the observed state of the fleet diff --git a/pkg/apis/fleet/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/fleet/v1alpha1/zz_generated.deepcopy.go index 21249d69f..d960873ed 100644 --- a/pkg/apis/fleet/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/fleet/v1alpha1/zz_generated.deepcopy.go @@ -34,7 +34,7 @@ func (in *BackupConfig) DeepCopyInto(out *BackupConfig) { *out = new(ChartConfig) **out = **in } - out.Storage = in.Storage + in.Storage.DeepCopyInto(&out.Storage) in.ExtraArgs.DeepCopyInto(&out.ExtraArgs) return } @@ -52,7 +52,7 @@ func (in *BackupConfig) DeepCopy() *BackupConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BackupStorage) DeepCopyInto(out *BackupStorage) { *out = *in - out.Location = in.Location + in.Location.DeepCopyInto(&out.Location) return } @@ -69,6 +69,13 @@ func (in *BackupStorage) DeepCopy() *BackupStorage { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BackupStorageLocation) DeepCopyInto(out *BackupStorageLocation) { *out = *in + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } return }