v1beta1

package
v0.0.0-...-e795160 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1beta1 contains API Schema definitions for the backup v1beta1 API group. +kubebuilder:object:generate=true +groupName=backup.openstack.org

Index

Constants

View Source
const (
	// OpenStackBackupConfigSecretsReadyCondition - Secrets labeling status
	OpenStackBackupConfigSecretsReadyCondition condition.Type = "SecretsReady"

	// OpenStackBackupConfigConfigMapsReadyCondition - ConfigMaps labeling status
	OpenStackBackupConfigConfigMapsReadyCondition condition.Type = "ConfigMapsReady"

	// OpenStackBackupConfigNADsReadyCondition - NetworkAttachmentDefinitions labeling status
	OpenStackBackupConfigNADsReadyCondition condition.Type = "NADsReady"

	// OpenStackBackupConfigCRsReadyCondition - CR instances labeling status
	OpenStackBackupConfigCRsReadyCondition condition.Type = "CRsReady"
)

Condition types for OpenStackBackupConfig

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "backup.openstack.org", Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type BackupLabelingPolicy

type BackupLabelingPolicy string

BackupLabelingPolicy controls whether backup labeling is active for a resource type +kubebuilder:validation:Enum=enabled;disabled

const (
	// BackupLabelingEnabled enables backup labeling for the resource type
	BackupLabelingEnabled BackupLabelingPolicy = "enabled"
	// BackupLabelingDisabled disables backup labeling for the resource type
	BackupLabelingDisabled BackupLabelingPolicy = "disabled"
)

type OpenStackBackupConfig

type OpenStackBackupConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   OpenStackBackupConfigSpec   `json:"spec,omitempty"`
	Status OpenStackBackupConfigStatus `json:"status,omitempty"`
}

OpenStackBackupConfig is the Schema for the openstackbackupconfigs API. It configures automatic backup labeling for user-provided resources (without ownerReferences).

func (*OpenStackBackupConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackBackupConfig.

func (*OpenStackBackupConfig) DeepCopyInto

func (in *OpenStackBackupConfig) DeepCopyInto(out *OpenStackBackupConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OpenStackBackupConfig) DeepCopyObject

func (in *OpenStackBackupConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type OpenStackBackupConfigList

type OpenStackBackupConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []OpenStackBackupConfig `json:"items"`
}

OpenStackBackupConfigList contains a list of OpenStackBackupConfig.

func (*OpenStackBackupConfigList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackBackupConfigList.

func (*OpenStackBackupConfigList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OpenStackBackupConfigList) DeepCopyObject

func (in *OpenStackBackupConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type OpenStackBackupConfigSpec

type OpenStackBackupConfigSpec struct {
	// DefaultRestoreOrder is the restore order assigned to user-provided resources
	// +kubebuilder:validation:Optional
	// +kubebuilder:default="10"
	DefaultRestoreOrder string `json:"defaultRestoreOrder"`

	// Secrets configuration for backup labeling
	// +kubebuilder:validation:Optional
	// +kubebuilder:default={labeling:enabled}
	Secrets ResourceBackupConfig `json:"secrets"`

	// ConfigMaps configuration for backup labeling
	// Defaults: Excludes kube-root-ca.crt and openshift-service-ca.crt
	// +kubebuilder:validation:Optional
	// +kubebuilder:default={labeling:enabled,excludeNames:{"kube-root-ca.crt","openshift-service-ca.crt"}}
	ConfigMaps ResourceBackupConfig `json:"configMaps"`

	// NetworkAttachmentDefinitions configuration for backup labeling
	// +kubebuilder:validation:Optional
	// +kubebuilder:default={labeling:enabled}
	NetworkAttachmentDefinitions ResourceBackupConfig `json:"networkAttachmentDefinitions"`
}

OpenStackBackupConfigSpec defines the desired state of OpenStackBackupConfig.

func (*OpenStackBackupConfigSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackBackupConfigSpec.

func (*OpenStackBackupConfigSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OpenStackBackupConfigStatus

type OpenStackBackupConfigStatus struct {
	// LabeledResources tracks how many resources of each type were labeled
	// +kubebuilder:validation:Optional
	LabeledResources ResourceCounts `json:"labeledResources,omitempty"`

	// Conditions represents the latest available observations of the resource's current state
	// +operator-sdk:csv:customresourcedefinitions:type=status
	Conditions condition.Conditions `json:"conditions,omitempty"`
}

OpenStackBackupConfigStatus defines the observed state of OpenStackBackupConfig.

func (*OpenStackBackupConfigStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackBackupConfigStatus.

func (*OpenStackBackupConfigStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceBackupConfig

type ResourceBackupConfig struct {
	// Labeling controls whether to label this resource type for backup
	// +kubebuilder:validation:Optional
	Labeling *BackupLabelingPolicy `json:"labeling,omitempty"`

	// RestoreOrder overrides the default restore order for this resource type.
	// If empty, the global DefaultRestoreOrder is used.
	// +kubebuilder:validation:Optional
	RestoreOrder string `json:"restoreOrder,omitempty"`

	// ExcludeLabelKeys is a list of label keys - resources with any of these labels are excluded
	// Example: ["service-cert", "osdp-service"] excludes service-cert and dataplane service secrets
	// +kubebuilder:validation:Optional
	ExcludeLabelKeys []string `json:"excludeLabelKeys,omitempty"`

	// ExcludeNames is a list of resource names to exclude from backup labeling
	// Example: ["kube-root-ca.crt", "openshift-service-ca.crt"] for system ConfigMaps
	// +kubebuilder:validation:Optional
	ExcludeNames []string `json:"excludeNames,omitempty"`

	// IncludeLabelSelector allows filtering resources by label selector
	// Only resources matching this selector will be labeled (in addition to ownerRef check)
	// +kubebuilder:validation:Optional
	IncludeLabelSelector map[string]string `json:"includeLabelSelector,omitempty"`
}

ResourceBackupConfig defines backup labeling rules for a resource type

func (*ResourceBackupConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceBackupConfig.

func (*ResourceBackupConfig) DeepCopyInto

func (in *ResourceBackupConfig) DeepCopyInto(out *ResourceBackupConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceCounts

type ResourceCounts struct {
	// Secrets is the number of secrets labeled for backup
	// +kubebuilder:validation:Optional
	Secrets int `json:"secrets"`

	// ConfigMaps is the number of configmaps labeled for backup
	// +kubebuilder:validation:Optional
	ConfigMaps int `json:"configMaps"`

	// NetworkAttachmentDefinitions is the number of NADs labeled for backup
	// +kubebuilder:validation:Optional
	NetworkAttachmentDefinitions int `json:"networkAttachmentDefinitions"`

	// CRs is the number of CR instances labeled for backup
	// +kubebuilder:validation:Optional
	CRs int `json:"crs"`
}

ResourceCounts tracks labeled resource counts by type

func (*ResourceCounts) DeepCopy

func (in *ResourceCounts) DeepCopy() *ResourceCounts

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceCounts.

func (*ResourceCounts) DeepCopyInto

func (in *ResourceCounts) DeepCopyInto(out *ResourceCounts)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL