Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VZ-9240: Removed etcdsnapshots.rke.cattle.io CRD and associated code #66

Draft
wants to merge 5 commits into
base: bfs/rancher-phase-2
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 4 additions & 43 deletions pkg/apis/rke.cattle.io/v1/etcd.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
package v1

import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// Copyright (c) 2023, Oracle and/or its affiliates.

type ETCDSnapshotPhase string
// This file from the Rancher repository has been modified by Oracle as follows:
// - references to the etcdsnapshots.rke.cattle.io CRDs and APIs have been removed

const (
ETCDSnapshotPhaseStarted ETCDSnapshotPhase = "Started"
ETCDSnapshotPhaseShutdown ETCDSnapshotPhase = "Shutdown"
ETCDSnapshotPhaseRestore ETCDSnapshotPhase = "Restore"
ETCDSnapshotPhaseRestartCluster ETCDSnapshotPhase = "RestartCluster"
ETCDSnapshotPhaseFinished ETCDSnapshotPhase = "Finished"
ETCDSnapshotPhaseFailed ETCDSnapshotPhase = "Failed"
)
package v1

type ETCDSnapshotS3 struct {
Endpoint string `json:"endpoint,omitempty"`
Expand All @@ -38,37 +30,6 @@ type ETCDSnapshotRestore struct {
RestoreRKEConfig string `json:"restoreRKEConfig,omitempty"`
}

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

type ETCDSnapshot struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ETCDSnapshotSpec `json:"spec,omitempty"`
SnapshotFile ETCDSnapshotFile `json:"snapshotFile,omitempty"`
Status ETCDSnapshotStatus `json:"status"`
}

type ETCDSnapshotSpec struct {
ClusterName string `json:"clusterName,omitempty"`
}

type ETCDSnapshotFile struct {
Name string `json:"name,omitempty"`
NodeName string `json:"nodeName,omitempty"`
Location string `json:"location,omitempty"`
Metadata string `json:"metadata,omitempty"`
CreatedAt *metav1.Time `json:"createdAt,omitempty"`
Size int64 `json:"size,omitempty"`
S3 *ETCDSnapshotS3 `json:"s3,omitempty"`
Status string `json:"status,omitempty"`
Message string `json:"message,omitempty"`
}

type ETCDSnapshotStatus struct {
Missing bool `json:"missing"`
}

type ETCD struct {
DisableSnapshots bool `json:"disableSnapshots,omitempty"`
SnapshotScheduleCron string `json:"snapshotScheduleCron,omitempty"`
Expand Down
Loading