Documentation ¶
Overview ¶
Copyright 2022 The SODA Authors.
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.
Index ¶
- Constants
- func CoreGroupResourcePriority(resource string) int
- func NewController(ctx context.Context, config *Config, kubeClient kubernetes.Interface, ...) (controllers.Controller, error)
- type Config
- type DependencyProvider
- type GroupResouceVersion
- type Interface
- type KubernetesResource
- type Phase
- type PrepareBackup
- type Reconciler
- type ResourceIdentifier
- type Resources
- type Updater
Constants ¶
View Source
const ( EventValidationSuccess = "ValidationSuccessful" EventPreHookFailed = "PreHookFailed" EventPostHookFailed = "PostHookFailed" EventVolumeBackupSuccess = "VolumeBackupSuccess" EventVolumeBackupFailed = "VolumeBackupFailed" EventVolumeBackupScheduled = "VolumeBackupScheduled" EventResourceBackupSuccess = "ResourceBackupSuccess" EventResourceBackupFailed = "ResourceBackupFailed" )
View Source
const ( PVCKind = "PersistentVolumeClaim" PVKind = "PersistentVolume" NodeKind = "Node" EventKind = "Event" )
View Source
const (
AnnResourceSelector = "kahu.io/backup-resources"
)
Variables ¶
This section is empty.
Functions ¶
func CoreGroupResourcePriority ¶ added in v0.1.1
func NewController ¶
func NewController( ctx context.Context, config *Config, kubeClient kubernetes.Interface, kahuClient versioned.Interface, dynamicClient dynamic.Interface, informer kahuinformer.SharedInformerFactory, eventBroadcaster record.EventBroadcaster, discoveryHelper discovery.DiscoveryHelper, hookExecutor hooks.Hooks, volumeHandler volume.Interface) (controllers.Controller, error)
Types ¶
type DependencyProvider ¶ added in v0.1.1
type DependencyProvider interface { GetDependency(kubeClient kubernetes.Interface, resource *unstructured.Unstructured) ([]ResourceIdentifier, error) }
type GroupResouceVersion ¶ added in v0.1.1
type GroupResouceVersion struct {
// contains filtered or unexported fields
}
type Interface ¶ added in v0.1.1
func NewResolver ¶ added in v0.1.1
func NewResolver(logger log.FieldLogger, kubeClient kubernetes.Interface, dynamicClient dynamic.Interface, discoveryHelper discovery.DiscoveryHelper) Interface
type KubernetesResource ¶ added in v0.1.1
type KubernetesResource struct {
// contains filtered or unexported fields
}
type PrepareBackup ¶ added in v0.1.1
type PrepareBackup struct { *kahuapi.Backup StorageLocation *kahuapi.BackupLocation BackedUpItems map[itemKey]struct{} }
type Reconciler ¶ added in v0.1.1
type Reconciler interface {
Run(stopCh <-chan struct{})
}
Reconciler runs a periodic loop to reconcile the current state of volume back and update backup annotation
type ResourceIdentifier ¶ added in v0.1.1
type Resources ¶ added in v0.1.1
type Resources interface { Sync(backup *kahuapi.Backup) (*kahuapi.Backup, error) GetNamespaces() []string GetResourcesByKind(kind string) []*unstructured.Unstructured GetClusterScopedResources() []*unstructured.Unstructured GetResources() []*unstructured.Unstructured }
func NewBackupResources ¶ added in v0.1.1
func NewBackupResources( logger log.FieldLogger, dynamicClient dynamic.Interface, kubeClient kubernetes.Interface, discoveryHelper discovery.DiscoveryHelper, updater Updater) Resources
Click to show internal directories.
Click to hide internal directories.