-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
- Loading branch information
1 parent
35d9e06
commit c38703e
Showing
8 changed files
with
932 additions
and
20 deletions.
There are no files selected for viewing
245 changes: 239 additions & 6 deletions
245
charts/rancher-turtles/templates/rancher-turtles-exp-etcdrestore-components.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
exp/etcdrestore/api/v1alpha1/etcdmachinesnapshotconfig_types.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
Copyright © 2023 - 2024 SUSE LLC | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
corev1 "k8s.io/api/core/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// RKE2EtcdMachineSnapshotConfigSpec defines the desired state of RKE2EtcdMachineSnapshotConfig | ||
type RKE2EtcdMachineSnapshotConfigSpec struct { | ||
Manual bool `json:"manual"` | ||
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"` | ||
} | ||
|
||
// RKE2EtcdMachineSnapshotConfig is the schema for the snapshot config. | ||
// | ||
// +kubebuilder:object:root=true | ||
// +kubebuilder:subresource:status | ||
|
||
// RKE2EtcdMachineSnapshotConfig is the config for the RKE2EtcdMachineSnapshotConfig API | ||
type RKE2EtcdMachineSnapshotConfig struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec RKE2EtcdMachineSnapshotConfigSpec `json:"spec,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// RKE2EtcdMachineSnapshotConfigList contains a list of RKE2EtcdMachineSnapshotConfigs. | ||
type RKE2EtcdMachineSnapshotConfigList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []EtcdSnapshotRestore `json:"items"` | ||
} | ||
|
||
func init() { | ||
objectTypes = append(objectTypes, &RKE2EtcdMachineSnapshotConfig{}, &RKE2EtcdMachineSnapshotConfigList{}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.