v1beta1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package v1beta1 contains ControlPlane resources. +kubebuilder:object:generate=true +groupName=spaces.upbound.io +versionName=v1beta1

Index

Constants

View Source
const (
	// ConditionTypeSourceSynced indicates that the git source is in sync.
	ConditionTypeSourceSynced xpcommonv1.ConditionType = "SourceSynced"
	// ReasonSourceCompleted indicates that the git sync has been completed.
	ReasonSourceCompleted xpcommonv1.ConditionReason = "Completed"
	// ReasonSourceInProgress indicates that the git sync is still in progress.
	ReasonSourceInProgress xpcommonv1.ConditionReason = "InProgress"

	// ConditionTypeScheduled indicates that the control plane has been scheduled.
	ConditionTypeScheduled xpcommonv1.ConditionType = "Scheduled"
	// ReasonScheduled indicates that the control plane has been scheduled.
	ReasonScheduled xpcommonv1.ConditionReason = "Scheduled"
	// ReasonSchedulingError indicates that the control plane scheduling had an error.
	ReasonSchedulingError xpcommonv1.ConditionReason = "SchedulingError"
	// ReasonSchedulingFailed indicates that the control plane scheduling did not succeed
	// for non-error reasons, e.g. capacity.
	ReasonSchedulingFailed xpcommonv1.ConditionReason = "ScheduleFailed"
	// ReasonDeploymentFailed indicates that the control plane deployment did not succeed.
	ReasonDeploymentFailed xpcommonv1.ConditionReason = "DeploymentFailed"

	// ConditionTypeSupported indicates that the control plane is running a
	// supported version of Crossplane.
	ConditionTypeSupported xpcommonv1.ConditionType = "Supported"
	// ReasonSupported indicates that the control plane is running
	// a supported version of Crossplane.
	ReasonSupported xpcommonv1.ConditionReason = "SupportedCrossplaneVersion"
	// ReasonUnsupported indicates that the control plane is running a version
	// of Crossplane that is not supported.
	ReasonUnsupported xpcommonv1.ConditionReason = "UnsupportedCrossplaneVersion"
)
View Source
const (
	// ResourceCredentialsSecretInClusterKubeconfigKey is the key in the
	// connection secret of the ControlPlane that contains the kubeconfig
	// to be used by running pods in the cluster.
	ResourceCredentialsSecretInClusterKubeconfigKey = "kubeconfig-incluster"

	// ConditionMessageAnnotationKey is the key for the message shown in the
	// message column in kubectl.
	ConditionMessageAnnotationKey = "internal.spaces.upbound.io/message"
)
View Source
const (
	GitAuthTypeNone        = "None"
	GitAuthTypeBasic       = "Basic"
	GitAuthTypeBearerToken = "BearerToken"
	GitAuthTypeSSH         = "SSH"

	AuthSecretKeyUsername      = "username"
	AuthSecretKeyPassword      = "password"
	AuthSecretKeyBearerToken   = "bearerToken"
	AuthSecretKeySSHIdentity   = "identity"
	AuthSecretKeySSHKnownHosts = "knownHosts"

	CASecretKeyCAFile = "ca.crt"
)

GitAuthType constants.

View Source
const (
	// KubeCompositionAnnotation is an optional, alpha-level annotation that
	// selects the KubeControlPlane composition for a specific ControlPlane.
	// The default value is "k8s".
	//
	// It is gated by the "EnableKine" feature gate.
	KubeCompositionAnnotation = "internal.spaces.upbound.io/kube-composition"
	// FeaturesAnnotation is an optional annotation that enables features
	// gates within the control plane compositions. Value should be defined
	// as an inline map of key value pairs expressing features to be enabled.
	// For example: `{"featureA": true,"featureB": false}`. The default value is
	// empty (no features enabled).
	FeaturesAnnotation = "internal.spaces.upbound.io/features"
	// TierLimitsAnnotation is an optional annotation that specifies the limits
	// applied to the control plane, as metered by the mxp-account-gate. These
	// limits are only applicable when the account gate is enabled using the
	// features annotation.
	TierLimitsAnnotation = "internal.spaces.upbound.io/tier-limits"
)
View Source
const (
	Group   = "spaces.upbound.io"
	Version = "v1beta1"
)

Package type metadata.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	// ControlPlaneKind is the kind of the ControlPlane.
	ControlPlaneKind = reflect.TypeOf(ControlPlane{}).Name()
)

ManagedControlPlane type metadata.

Functions

func DeploymentFailed

func DeploymentFailed(err error) xpcommonv1.Condition

DeploymentFailed returns a condition that indicates that deployment of the control plane to a host cluster did not succeed.

func Scheduled

func Scheduled() xpcommonv1.Condition

Scheduled returns a condition that indicates that scheduling of the control plane has succeeded.

func SchedulingError

func SchedulingError(err error) xpcommonv1.Condition

SchedulingError returns a condition that indicates that scheduling of the control plane had an error.

func SchedulingFailed

func SchedulingFailed(reason string) xpcommonv1.Condition

SchedulingFailed returns a condition that indicates that scheduling of the control plane did not succeed.

func SourceError

func SourceError(err error) xpcommonv1.Condition

SourceError returns a condition that indicates the source operation of the control plane has failed.

func SourceInProgress

func SourceInProgress(revision string) xpcommonv1.Condition

SourceInProgress returns a condition that indicates the control plane is still processing resources coming from the source.

func SourceSynced

func SourceSynced(revision string) xpcommonv1.Condition

SourceSynced returns a condition that indicates the control plane is in sync with the source.

func SupportedCrossplaneVersion

func SupportedCrossplaneVersion() xpcommonv1.Condition

SupportedCrossplaneVersion returns a condition that indicates that the control plane is running a supported version of Crossplane.

func UnsupportedCrossplaneVersion

func UnsupportedCrossplaneVersion(msg string) xpcommonv1.Condition

UnsupportedCrossplaneVersion returns a condition that indicates that the control plane is running an unsupported version of Crossplane.

Types

type ControlPlane

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

	Spec   ControlPlaneSpec   `json:"spec"`
	Status ControlPlaneStatus `json:"status,omitempty"`
}

ControlPlane defines a managed Crossplane instance.

func (*ControlPlane) DeepCopy

func (in *ControlPlane) DeepCopy() *ControlPlane

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

func (*ControlPlane) DeepCopyInto

func (in *ControlPlane) DeepCopyInto(out *ControlPlane)

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

func (*ControlPlane) DeepCopyObject

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

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

func (*ControlPlane) GetCondition

func (mg *ControlPlane) GetCondition(ct xpv1.ConditionType) xpv1.Condition

GetCondition of this ControlPlane.

func (*ControlPlane) GetDeletionPolicy

func (mg *ControlPlane) GetDeletionPolicy() xpv1.DeletionPolicy

GetDeletionPolicy of this Environment.

func (*ControlPlane) GetManagementPolicies

func (mg *ControlPlane) GetManagementPolicies() xpv1.ManagementPolicies

GetManagementPolicies of this ManagedControlPlane.

func (*ControlPlane) GetProviderConfigReference

func (mg *ControlPlane) GetProviderConfigReference() *xpv1.Reference

GetProviderConfigReference of this ControlPlane.

func (*ControlPlane) GetPublishConnectionDetailsTo

func (mg *ControlPlane) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo

GetPublishConnectionDetailsTo of this ControlPlane.

func (*ControlPlane) GetWriteConnectionSecretToReference

func (mg *ControlPlane) GetWriteConnectionSecretToReference() *xpv1.SecretReference

GetWriteConnectionSecretToReference of this ControlPlane.

func (*ControlPlane) SetConditions

func (mg *ControlPlane) SetConditions(c ...xpv1.Condition)

SetConditions of this ControlPlane.

func (*ControlPlane) SetDeletionPolicy

func (mg *ControlPlane) SetDeletionPolicy(r xpv1.DeletionPolicy)

SetDeletionPolicy of this ControlPlane.

func (*ControlPlane) SetManagementPolicies

func (mg *ControlPlane) SetManagementPolicies(r xpv1.ManagementPolicies)

SetManagementPolicies of this ManagedControlPlane.

func (*ControlPlane) SetProviderConfigReference

func (mg *ControlPlane) SetProviderConfigReference(r *xpv1.Reference)

SetProviderConfigReference of this ControlPlane.

func (*ControlPlane) SetProviderReference

func (mg *ControlPlane) SetProviderReference(r *xpv1.Reference)

SetProviderReference of this ControlPlane.

func (*ControlPlane) SetPublishConnectionDetailsTo

func (mg *ControlPlane) SetPublishConnectionDetailsTo(p *xpv1.PublishConnectionDetailsTo)

SetPublishConnectionDetailsTo of this ControlPlane.

func (*ControlPlane) SetWriteConnectionSecretToReference

func (mg *ControlPlane) SetWriteConnectionSecretToReference(r *xpv1.SecretReference)

SetWriteConnectionSecretToReference of this ControlPlane.

type ControlPlaneBackupSpec added in v0.3.0

type ControlPlaneBackupSpec struct {
	// [[GATE:EnableControlPlaneBackup]] THIS IS AN ALPHA FIELD. Do not use it in production.
	// StorageLocation specifies details about the control planes underlying storage location
	// where backups are stored or retrieved.
	// +optional
	StorageLocation *StorageLocation `json:"storageLocation,omitempty"`

	// [[GATE:EnableSharedBackup]] THIS IS AN ALPHA FIELD. Do not use it in production.
	// SharedBackupConfigRef is a reference to a v1alpha1.SharedBackupConfig resource that will be used to configure the
	// control plane's backup storage location.
	// Requires "get" permission on the referenced v1alpha1.SharedBackupConfig resource.
	SharedBackupConfigRef *corev1.LocalObjectReference `json:"sharedBackupConfigRef,omitempty"`
}

ControlPlaneBackupSpec specifies details about the control planes backup configuration.

func (*ControlPlaneBackupSpec) DeepCopy added in v0.3.0

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

func (*ControlPlaneBackupSpec) DeepCopyInto added in v0.3.0

func (in *ControlPlaneBackupSpec) DeepCopyInto(out *ControlPlaneBackupSpec)

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

type ControlPlaneList

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

ControlPlaneList contains a list of ControlPlane

func (*ControlPlaneList) DeepCopy

func (in *ControlPlaneList) DeepCopy() *ControlPlaneList

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

func (*ControlPlaneList) DeepCopyInto

func (in *ControlPlaneList) DeepCopyInto(out *ControlPlaneList)

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

func (*ControlPlaneList) DeepCopyObject

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

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

type ControlPlaneSpec

type ControlPlaneSpec struct {
	// [[GATE:EnableGitSource]] THIS IS AN ALPHA FIELD. Do not use it in production.
	// Source points to a Git repository containing a ControlPlaneSource
	// manifest with the desired state of the ControlPlane's configuration.
	Source *SourceSpec `json:"source,omitempty"`

	// WriteConnectionSecretToReference specifies the namespace and name of a
	// Secret to which any connection details for this managed resource should
	// be written. Connection details frequently include the endpoint, username,
	// and password required to connect to the managed resource.
	// This field is planned to be replaced in a future release in favor of
	// PublishConnectionDetailsTo. Currently, both could be set independently
	// and connection details would be published to both without affecting
	// each other.
	//
	// If omitted, it is defaulted to the namespace of the ControlPlane.
	//
	// +optional
	WriteConnectionSecretToReference *SecretReference `json:"writeConnectionSecretToRef,omitempty"`
	// PublishConnectionDetailsTo specifies the connection secret config which
	// contains a name, metadata and a reference to secret store config to
	// which any connection details for this managed resource should be written.
	// Connection details frequently include the endpoint, username,
	// and password required to connect to the managed resource.
	//
	// +optional
	PublishConnectionDetailsTo *xpv1.PublishConnectionDetailsTo `json:"publishConnectionDetailsTo,omitempty"`
	// THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored
	// unless the relevant Crossplane feature flag is enabled, and may be
	// changed or removed without notice.
	// ManagementPolicies specify the array of actions Crossplane is allowed to
	// take on the managed and external resources.
	// This field is planned to replace the DeletionPolicy field in a future
	// release. Currently, both could be set independently and non-default
	// values would be honored if the feature flag is enabled. If both are
	// custom, the DeletionPolicy field will be ignored.
	// See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223
	// and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md
	// +optional
	// +kubebuilder:default={"*"}
	ManagementPolicies xpv1.ManagementPolicies `json:"managementPolicies,omitempty"`
	// DeletionPolicy specifies what will happen to the underlying external
	// resource when this managed resource is deleted - either "Delete" or
	// "Orphan" the external resource.
	// This field is planned to be deprecated in favor of the ManagementPolicy
	// field in a future release. Currently, both could be set independently and
	// non-default values would be honored if the feature flag is enabled.
	// See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223
	// +optional
	// +kubebuilder:default=Delete
	DeletionPolicy xpv1.DeletionPolicy `json:"deletionPolicy,omitempty"`

	// Crossplane defines the configuration for Crossplane.
	Crossplane CrossplaneSpec `json:"crossplane,omitempty"`

	// Backup specifies details about the control planes backup configuration.
	// +optional
	Backup *ControlPlaneBackupSpec `json:"backup,omitempty"`

	// [[GATE:EnableSharedBackup]] THIS IS AN ALPHA FIELD. Do not use it in production.
	// Restore specifies details about the control planes restore configuration.
	// +optional
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="restore can not be changed after creation"
	Restore *Restore `json:"restore,omitempty"`
}

A ControlPlaneSpec represents the desired state of the ControlPlane.

func (*ControlPlaneSpec) DeepCopy

func (in *ControlPlaneSpec) DeepCopy() *ControlPlaneSpec

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

func (*ControlPlaneSpec) DeepCopyInto

func (in *ControlPlaneSpec) DeepCopyInto(out *ControlPlaneSpec)

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

type ControlPlaneStatus

type ControlPlaneStatus struct {
	xpv1.ResourceStatus `json:",inline"`

	ControlPlaneID string `json:"controlPlaneID,omitempty"`
	HostClusterID  string `json:"hostClusterID,omitempty"`

	// [[GATE:EnableGitSource]] SourceStatus is the status of the pull and apply operations of resources
	// from the Source.
	SourceStatus *SourceStatus `json:"source,omitempty"`
}

A ControlPlaneStatus represents the observed state of a ControlPlane.

func (*ControlPlaneStatus) DeepCopy

func (in *ControlPlaneStatus) DeepCopy() *ControlPlaneStatus

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

func (*ControlPlaneStatus) DeepCopyInto

func (in *ControlPlaneStatus) DeepCopyInto(out *ControlPlaneStatus)

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

type CrossplaneAutoUpgradeSpec

type CrossplaneAutoUpgradeSpec struct {
	// Channel defines the upgrade channels for Crossplane. We support the following channels where 'Stable' is the
	// default:
	// - None: disables auto-upgrades and keeps the control plane at its current version of Crossplane.
	// - Patch: automatically upgrades the control plane to the latest supported patch version when it
	//   becomes available while keeping the minor version the same.
	// - Stable: automatically upgrades the control plane to the latest supported patch release on minor
	//   version N-1, where N is the latest supported minor version.
	// - Rapid: automatically upgrades the cluster to the latest supported patch release on the latest
	//   supported minor version.
	// +optional
	// +kubebuilder:default="Stable"
	// +kubebuilder:validation:Enum="None";"Patch";"Stable";"Rapid"
	Channel *CrossplaneUpgradeChannel `json:"channel,omitempty"`
}

CrossplaneAutoUpgradeSpec defines the auto upgrade policy for Crossplane.

func (*CrossplaneAutoUpgradeSpec) DeepCopy

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

func (*CrossplaneAutoUpgradeSpec) DeepCopyInto

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

type CrossplaneSpec

type CrossplaneSpec struct {
	// Version is the version of Universal Crossplane to install.
	// +optional
	Version *string `json:"version,omitempty"`

	// AutoUpgrades defines the auto upgrade configuration for Crossplane.
	// +optional
	// +kubebuilder:default={"channel":"Stable"}
	AutoUpgradeSpec *CrossplaneAutoUpgradeSpec `json:"autoUpgrade,omitempty"`
}

CrossplaneSpec defines the configuration for Crossplane.

func (*CrossplaneSpec) DeepCopy

func (in *CrossplaneSpec) DeepCopy() *CrossplaneSpec

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

func (*CrossplaneSpec) DeepCopyInto

func (in *CrossplaneSpec) DeepCopyInto(out *CrossplaneSpec)

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

type CrossplaneUpgradeChannel

type CrossplaneUpgradeChannel string

CrossplaneUpgradeChannel is the channel for Crossplane upgrades.

const (
	// CrossplaneUpgradeNone disables auto-upgrades and keeps the control plane at its current version of Crossplane.
	CrossplaneUpgradeNone CrossplaneUpgradeChannel = "None"

	// CrossplaneUpgradePatch automatically upgrades the control plane to the latest supported patch version when it
	// becomes available while keeping the minor version the same.
	CrossplaneUpgradePatch CrossplaneUpgradeChannel = "Patch"

	// CrossplaneUpgradeStable automatically upgrades the control plane to the latest supported patch release on minor
	// version N-1, where N is the latest supported minor version.
	CrossplaneUpgradeStable CrossplaneUpgradeChannel = "Stable"

	// CrossplaneUpgradeRapid automatically upgrades the cluster to the latest supported patch release on the latest
	// supported minor version.
	CrossplaneUpgradeRapid CrossplaneUpgradeChannel = "Rapid"
)

type GitAuthConfig

type GitAuthConfig struct {
	// CASecretRef is a reference to a Secret containing CA certificates to use
	// to verify the Git server's certificate. The secret must contain the key
	// "ca.crt" where the content is a CA certificate. The type of the secret
	// can be "Opaque" or "kubernetes.io/tls".
	//
	// +kubebuilder:validation:Optional
	CASecretRef *xpv1.SecretReference `json:"caSecretRef,omitempty"`

	// Type of the authentication to use. Options are: None, Basic
	// (username/password), BearerToken, SSH. Default is None. The corresponding
	// fields must be set for the chosen authentication type.
	//
	// If you are looking to use OAuth tokens with popular servers (e.g.
	// GitHub, Bitbucket, GitLab) you should use BasicAuth instead of
	// BearerToken. These servers use basic HTTP authentication, with the OAuth
	// token as user or password.
	// Check the documentation of your git server for details.
	//
	// +kubebuilder:default="None"
	// +kubebuilder:validation:Enum=None;Basic;BearerToken;SSH
	Type GitAuthType `json:"type"`

	// Basic is the configuration for basic authentication, i.e. username and
	// password.
	Basic *GitBasicAuth `json:"basic,omitempty"`

	// BearerToken is the configuration for bearer token authentication.
	BearerToken *GitBearerTokenAuth `json:"bearerToken,omitempty"`

	// SSH is the configuration for SSH authentication. Note that the URL must
	// use the SSH protocol (e.g. ssh://github.com/org/repo.git).
	SSH *GitSSHAuth `json:"ssh,omitempty"`
}

GitAuthConfig is the configuration for authentication to access a Git.

func (*GitAuthConfig) DeepCopy

func (in *GitAuthConfig) DeepCopy() *GitAuthConfig

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

func (*GitAuthConfig) DeepCopyInto

func (in *GitAuthConfig) DeepCopyInto(out *GitAuthConfig)

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

type GitAuthType

type GitAuthType string

GitAuthType is the type of authentication to use to access a Git repository.

type GitBasicAuth

type GitBasicAuth struct {
	// SecretRef is a reference to a Secret containing the username and password.
	// The secret must contain the keys "username" and "password".
	//
	// +kubebuilder:validation:Required
	SecretRef xpv1.SecretReference `json:"secretRef"`
}

GitBasicAuth is the configuration for basic authentication.

func (*GitBasicAuth) DeepCopy

func (in *GitBasicAuth) DeepCopy() *GitBasicAuth

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

func (*GitBasicAuth) DeepCopyInto

func (in *GitBasicAuth) DeepCopyInto(out *GitBasicAuth)

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

type GitBearerTokenAuth

type GitBearerTokenAuth struct {
	// SecretRef is a reference to a Secret containing the bearer token.
	// The secret must contain the key "bearerToken".
	//
	// +kubebuilder:validation:Required
	SecretRef xpv1.SecretReference `json:"secretRef"`
}

GitBearerTokenAuth is the configuration for bearer token authentication.

func (*GitBearerTokenAuth) DeepCopy

func (in *GitBearerTokenAuth) DeepCopy() *GitBearerTokenAuth

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

func (*GitBearerTokenAuth) DeepCopyInto

func (in *GitBearerTokenAuth) DeepCopyInto(out *GitBearerTokenAuth)

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

type GitReference

type GitReference struct {

	// Branch is the git branch to check out.
	Branch *string `json:"branch,omitempty"`

	// Tag is the git tag to check out.
	Tag *string `json:"tag,omitempty"`

	// Commit is the git commit SHA to check out.
	Commit *string `json:"commit,omitempty"`
}

GitReference is a reference to a git branch, tag or commit SHA.

func (*GitReference) DeepCopy

func (in *GitReference) DeepCopy() *GitReference

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

func (*GitReference) DeepCopyInto

func (in *GitReference) DeepCopyInto(out *GitReference)

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

type GitSSHAuth

type GitSSHAuth struct {
	// SecretRef is a reference to a Secret containing the SSH key and known
	// hosts list.
	// The secret must contain the key "identity" where the content is a private
	// SSH key. Optionally, it can contain the key "knownHosts" where the content
	// is a known hosts file.
	//
	// +kubebuilder:validation:Required
	SecretRef xpv1.SecretReference `json:"secretRef"`
}

GitSSHAuth is the configuration for SSH authentication.

func (*GitSSHAuth) DeepCopy

func (in *GitSSHAuth) DeepCopy() *GitSSHAuth

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

func (*GitSSHAuth) DeepCopyInto

func (in *GitSSHAuth) DeepCopyInto(out *GitSSHAuth)

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

type GitSourceConfig

type GitSourceConfig struct {
	// URL is the URL of the Git repository to pull the Control Plane Source.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	URL string `json:"url"`

	// Ref is the git reference to checkout, which can be a branch, tag, or
	// commit SHA. Default is the main branch.
	//
	// +kubebuilder:default={"branch":"main"}
	Ref *GitReference `json:"ref,omitempty"`

	// Path is the path within the Git repository to pull the Control Plane
	// Source from. The folder it points to must contain a valid ControlPlaneSource
	// manifest. Default is the root of the repository.
	//
	// +kubebuilder:default="/"
	// +kubebuilder:validation:MinLength=1
	Path string `json:"path"`

	// PullInterval is the interval at which the Git repository should be
	// polled for changes. The format is 1h2m3s. Default is 90s. Minimum is 15s.
	//
	// +kubebuilder:default="90s"
	PullInterval *metav1.Duration `json:"pullInterval"`

	// Auth is the authentication configuration to access the Git repository.
	// Default is no authentication.
	// +kubebuilder:default={"type":"None"}
	Auth GitAuthConfig `json:"auth"`
}

GitSourceConfig is the configuration for a Git repository to pull the Control Plane Source from.

func (*GitSourceConfig) DeepCopy

func (in *GitSourceConfig) DeepCopy() *GitSourceConfig

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

func (*GitSourceConfig) DeepCopyInto

func (in *GitSourceConfig) DeepCopyInto(out *GitSourceConfig)

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

type Restore added in v0.3.0

type Restore struct {
	// Source of the Backup or BackupSchedule to restore from.
	// Require "restore" permission on the referenced Backup or BackupSchedule.
	// +kubebuilder:validation:XValidation:rule="self.apiGroup == 'spaces.upbound.io/v1alpha1' && (self.kind == 'Backup' || self.kind == 'BackupSchedule')",message="source must be a reference to a Backup or BackupSchedule (v1alpha1)"
	Source corev1.TypedLocalObjectReference `json:"source"`
}

Restore specifies details about the backup to restore from.

func (*Restore) DeepCopy added in v0.3.0

func (in *Restore) DeepCopy() *Restore

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

func (*Restore) DeepCopyInto added in v0.3.0

func (in *Restore) DeepCopyInto(out *Restore)

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

type SecretReference

type SecretReference struct {
	// Name of the secret.
	Name string `json:"name"`

	// Namespace of the secret. If omitted, it is equal to
	// the namespace of the resource containing this reference as a field.
	// +optional
	Namespace string `json:"namespace"`
}

A SecretReference is a reference to a secret in an arbitrary namespace.

func (*SecretReference) DeepCopy

func (in *SecretReference) DeepCopy() *SecretReference

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

func (*SecretReference) DeepCopyInto

func (in *SecretReference) DeepCopyInto(out *SecretReference)

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

type SourceSpec

type SourceSpec struct {
	// Git is the configuration for a Git repository to pull the Control Plane
	// Source from.
	//
	// +kubebuilder:validation:Required
	Git GitSourceConfig `json:"git"`
}

SourceSpec is the specification about the source of the Control Plane.

func (*SourceSpec) DeepCopy

func (in *SourceSpec) DeepCopy() *SourceSpec

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

func (*SourceSpec) DeepCopyInto

func (in *SourceSpec) DeepCopyInto(out *SourceSpec)

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

type SourceStatus

type SourceStatus struct {
	// Reference is the git reference that the Control Plane Source is currently
	// checked out to. This could be a branch, tag or commit SHA.
	Reference string `json:"reference,omitempty"`

	// Revision is always the commit SHA that the Control Plane Source is
	// currently checked out to.
	Revision string `json:"revision,omitempty"`
}

SourceStatus is the status of the pull and apply operations of resources.

func (*SourceStatus) DeepCopy

func (in *SourceStatus) DeepCopy() *SourceStatus

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

func (*SourceStatus) DeepCopyInto

func (in *SourceStatus) DeepCopyInto(out *SourceStatus)

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

type StorageLocation

type StorageLocation struct {
	// Prefix defines the directory within the control plane's storage location where backups are
	// stored or retrieved.
	// +optional
	// +kubebuilder:validation:MinLength=1
	Prefix *string `json:"prefix,omitempty"`

	// AccessMode specifies the access mode of the control plane's backup storage location.
	// Set to ReadOnly when using restoring an existing control plane to another, so
	// that two control planes aren't backing up to the same location.
	// +optional
	// +kubebuilder:default=ReadWrite
	AccessMode *velerov1.BackupStorageLocationAccessMode `json:"accessMode,omitempty"`
}

StorageLocation specifies where to store back data.

func (*StorageLocation) DeepCopy

func (in *StorageLocation) DeepCopy() *StorageLocation

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

func (*StorageLocation) DeepCopyInto

func (in *StorageLocation) DeepCopyInto(out *StorageLocation)

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