Skip to content

Commit

Permalink
Add missing API fields
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com>
  • Loading branch information
alexander-demicev committed Sep 4, 2024
1 parent d668f44 commit 5bd7391
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
10 changes: 10 additions & 0 deletions exp/etcdrestore/api/k3s/v1/etcdsnapshotfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ type ETCDSnapshotSpec struct {
NodeName string `json:"nodeName" column:"name=Node"`
Location string `json:"location" column:""`
Metadata map[string]string `json:"metadata,omitempty"`
S3 *ETCDSnapshotS3 `json:"s3,omitempty"`
}

type ETCDSnapshotS3 struct {
Endpoint string `json:"endpoint,omitempty"`
EndpointCA string `json:"endpointCA,omitempty"`
SkipSSLVerify bool `json:"skipSSLVerify,omitempty"`
Bucket string `json:"bucket,omitempty"`
Region string `json:"region,omitempty"`
Insecure bool `json:"insecure,omitempty"`
}

// ETCDSnapshotStatus is the status of the k3s ETCDSnapshotFile.
Expand Down
7 changes: 4 additions & 3 deletions exp/etcdrestore/api/v1alpha1/etcdmachinesnapshot_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ const (

// EtcdMachineSnapshotSpec defines the desired state of EtcdMachineSnapshot
type EtcdMachineSnapshotSpec struct {
ClusterName string `json:"clusterName"`
MachineName string `json:"machineName"`
ConfigRef corev1.ObjectReference `json:"configRef"`
ClusterName string `json:"clusterName"`
MachineName string `json:"machineName"`
ConfigRef corev1.LocalObjectReference `json:"configRef"`
Manual bool `json:"manual"`
}

// EtcdSnapshotRestoreStatus defines observed state of EtcdSnapshotRestore
Expand Down
21 changes: 11 additions & 10 deletions exp/etcdrestore/api/v1alpha1/etcdmachinesnapshotconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,24 @@ import (

// RKE2EtcdMachineSnapshotConfigSpec defines the desired state of RKE2EtcdMachineSnapshotConfig
type RKE2EtcdMachineSnapshotConfigSpec struct {
Manual bool `json:"manual"`
S3 S3Config `json:"s3"`
Local LocalConfig `json:"local"`
S3 S3Config `json:"s3"`
Local LocalConfig `json:"local"`
}

type LocalConfig struct {
DataDir string `json:"dataDir"`
}

type S3Config struct {
Endpoint string `json:"endpoint"`
EndpointCASecret *corev1.ObjectReference `json:"endpointCAsecret,omitempty"`
EnforceSSLVerify bool `json:"enforceSslVerify,omitempty"`
S3CredentialSecret corev1.ObjectReference `json:"s3CredentialSecret"`
Bucket string `json:"bucket,omitempty"`
Region string `json:"region,omitempty"`
Folder string `json:"folder,omitempty"`
Endpoint string `json:"endpoint,omitempty"`
EndpointCASecret *corev1.LocalObjectReference `json:"endpointCAsecret,omitempty"`
SkipSSLVerify bool `json:"skipSSLVerify,omitempty"`
S3CredentialSecret *corev1.LocalObjectReference `json:"s3CredentialSecret,omitempty"`
Bucket string `json:"bucket,omitempty"`
Region string `json:"region,omitempty"`
Folder string `json:"folder,omitempty"`
Insecure bool `json:"insecure,omitempty"`
Location string `json:"location,omitempty"`
}

// RKE2EtcdMachineSnapshotConfig is the schema for the snapshot config.
Expand Down

0 comments on commit 5bd7391

Please sign in to comment.