Documentation
¶
Overview ¶
Package v1 contains core API types used by most Crossplane resources. +kubebuilder:object:generate=true
Index ¶
- Constants
- func IsSystemConditionType(t ConditionType) bool
- type CommonCredentialSelectors
- type CompositeDeletePolicy
- type Condition
- type ConditionReason
- type ConditionType
- type ConditionedStatus
- type CredentialsSource
- type DeletionPolicy
- type EnvSelector
- type FsSelector
- type LocalSecretKeySelector
- type LocalSecretReference
- type ManagementAction
- type ManagementPolicies
- type MergeOptions
- type NamespacedReference
- type NamespacedSelector
- type ObservedStatus
- type Policy
- type ProviderConfigReference
- type ProviderConfigStatus
- type ProviderConfigUsage
- type Reference
- type ResolutionPolicy
- type ResolvePolicy
- type ResourceSpec
- type ResourceStatus
- type SecretKeySelector
- type SecretReference
- type Selector
- type TargetSpec
- type TargetStatus
- type TypedReference
- type UpdatePolicy
Constants ¶
const ( ReasonAvailable = common.ReasonAvailable ReasonCreating = common.ReasonCreating ReasonDeleting = common.ReasonDeleting )
Reasons a resource is or is not ready.
const ( ReasonReconcileSuccess = common.ReasonReconcileSuccess ReasonReconcileError = common.ReasonReconcileError ReasonReconcilePaused = common.ReasonReconcilePaused )
Reasons a resource is or is not synced.
const ( // ManagementActionObserve means that the managed resource status.atProvider // will be updated with the external resource state. ManagementActionObserve = common.ManagementActionObserve // ManagementActionCreate means that the external resource will be created // using the managed resource spec.initProvider and spec.forProvider. ManagementActionCreate = common.ManagementActionCreate // ManagementActionUpdate means that the external resource will be updated // using the managed resource spec.forProvider. ManagementActionUpdate = common.ManagementActionUpdate // ManagementActionDelete means that the external resource will be deleted // when the managed resource is deleted. ManagementActionDelete = common.ManagementActionDelete // ManagementActionLateInitialize means that unspecified fields of the managed // resource spec.forProvider will be updated with the external resource state. ManagementActionLateInitialize = common.ManagementActionLateInitialize // ManagementActionAll means that all of the above actions will be taken // by the Crossplane controllers. ManagementActionAll = common.ManagementActionAll )
const ( // CompositeDeleteBackground means the composite resource will be deleted using // the Background Propagation Policy when the claim is deleted. CompositeDeleteBackground = common.CompositeDeleteBackground // CompositeDeleteForeground means the composite resource will be deleted using // the Foreground Propagation Policy when the claim is deleted. CompositeDeleteForeground = common.CompositeDeleteForeground )
const ( // UpdateAutomatic means the resource should be updated automatically, // without any human intervention. UpdateAutomatic = common.UpdateAutomatic // UpdateManual means the resource requires human intervention to // update. UpdateManual = common.UpdateManual )
const ( // ResolvePolicyAlways is a resolve option. // When the ResolvePolicy is set to ResolvePolicyAlways the reference will // be tried to resolve for every reconcile loop. ResolvePolicyAlways = common.ResolvePolicyAlways // ResolutionPolicyRequired is a resolution option. // When the ResolutionPolicy is set to ResolutionPolicyRequired the execution // could not continue even if the reference cannot be resolved. ResolutionPolicyRequired = common.ResolutionPolicyRequired // ResolutionPolicyOptional is a resolution option. // When the ReferenceResolutionPolicy is set to ReferencePolicyOptional the // execution could continue even if the reference cannot be resolved. ResolutionPolicyOptional = common.ResolutionPolicyOptional )
const ( // ResourceCredentialsSecretEndpointKey is the key inside a connection secret for the connection endpoint. ResourceCredentialsSecretEndpointKey = "endpoint" // ResourceCredentialsSecretPortKey is the key inside a connection secret for the connection port. ResourceCredentialsSecretPortKey = "port" // ResourceCredentialsSecretUserKey is the key inside a connection secret for the connection user. ResourceCredentialsSecretUserKey = "username" // ResourceCredentialsSecretPasswordKey is the key inside a connection secret for the connection password. ResourceCredentialsSecretPasswordKey = "password" // ResourceCredentialsSecretCAKey is the key inside a connection secret for the server CA certificate. ResourceCredentialsSecretCAKey = "clusterCA" // ResourceCredentialsSecretClientCertKey is the key inside a connection secret for the client certificate. ResourceCredentialsSecretClientCertKey = "clientCert" // ResourceCredentialsSecretClientKeyKey is the key inside a connection secret for the client key. ResourceCredentialsSecretClientKeyKey = "clientKey" // ResourceCredentialsSecretTokenKey is the key inside a connection secret for the bearer token value. ResourceCredentialsSecretTokenKey = "token" // ResourceCredentialsSecretKubeconfigKey is the key inside a connection secret for the raw kubeconfig yaml. ResourceCredentialsSecretKubeconfigKey = "kubeconfig" )
const ( // CredentialsSourceNone indicates that a provider does not require // credentials. CredentialsSourceNone = common.CredentialsSourceNone // CredentialsSourceSecret indicates that a provider should acquire // credentials from a secret. CredentialsSourceSecret = common.CredentialsSourceSecret // CredentialsSourceInjectedIdentity indicates that a provider should use // credentials via its (pod's) identity; i.e. via IRSA for AWS, // Workload Identity for GCP, Pod Identity for Azure, or in-cluster // authentication for the Kubernetes API. CredentialsSourceInjectedIdentity = common.CredentialsSourceInjectedIdentity // CredentialsSourceEnvironment indicates that a provider should acquire // credentials from an environment variable. CredentialsSourceEnvironment = common.CredentialsSourceEnvironment // CredentialsSourceFilesystem indicates that a provider should acquire // credentials from the filesystem. CredentialsSourceFilesystem = common.CredentialsSourceFilesystem )
const LabelKeyProviderKind = common.LabelKeyProviderKind
LabelKeyProviderKind is added to ProviderConfigUsages to relate them to their ProviderConfig.
const LabelKeyProviderName = common.LabelKeyProviderName
LabelKeyProviderName is added to ProviderConfigUsages to relate them to their ProviderConfig.
Variables ¶
This section is empty.
Functions ¶
func IsSystemConditionType ¶
func IsSystemConditionType(t ConditionType) bool
IsSystemConditionType returns true if the condition is owned by the Crossplane system (e.g, Ready, Synced, Healthy).
Types ¶
type CommonCredentialSelectors ¶
type CommonCredentialSelectors = common.CommonCredentialSelectors
CommonCredentialSelectors provides common selectors for extracting credentials.
type CompositeDeletePolicy ¶
type CompositeDeletePolicy = common.CompositeDeletePolicy
A CompositeDeletePolicy determines how the composite resource should be deleted when the corresponding claim is deleted.
type Condition ¶
A Condition that may apply to a resource.
func Available ¶
func Available() Condition
Available returns a condition that indicates the resource is currently observed to be available for use.
func Creating ¶
func Creating() Condition
Creating returns a condition that indicates the resource is currently being created.
func Deleting ¶
func Deleting() Condition
Deleting returns a condition that indicates the resource is currently being deleted.
func ReconcileError ¶
ReconcileError returns a condition indicating that Crossplane encountered an error while reconciling the resource. This could mean Crossplane was unable to update the resource to reflect its desired state, or that Crossplane was unable to determine the current actual state of the resource.
func ReconcilePaused ¶
func ReconcilePaused() Condition
ReconcilePaused returns a condition that indicates reconciliation on the managed resource is paused via the pause annotation.
func ReconcileSuccess ¶
func ReconcileSuccess() Condition
ReconcileSuccess returns a condition indicating that Crossplane successfully completed the most recent reconciliation of the resource.
func Unavailable ¶
func Unavailable() Condition
Unavailable returns a condition that indicates the resource is not currently available for use. Unavailable should be set only when Crossplane expects the resource to be available but knows it is not, for example because its API reports it is unhealthy.
type ConditionReason ¶
type ConditionReason = common.ConditionReason
A ConditionReason represents the reason a resource is in a condition.
type ConditionType ¶
type ConditionType = common.ConditionType
A ConditionType represents a condition a resource could be in.
const ( // TypeReady resources are believed to be ready to handle work. TypeReady ConditionType = common.TypeReady // TypeSynced resources are believed to be in sync with the // Kubernetes resources that manage their lifecycle. TypeSynced ConditionType = common.TypeSynced // TypeHealthy resources are believed to be in a healthy state and to have all // of their child resources in a healthy state. For example, a claim is // healthy when the claim is synced and the underlying composite resource is // both synced and healthy. A composite resource is healthy when the composite // resource is synced and all composed resources are synced and, if // applicable, healthy (e.g., the composed resource is a composite resource). // TODO: This condition is not yet implemented. It is currently just reserved // as a system condition. See the tracking issue for more details // https://github.com/crossplane/crossplane/issues/5643. TypeHealthy ConditionType = common.TypeHealthy )
Condition types.
type ConditionedStatus ¶
type ConditionedStatus = common.ConditionedStatus
A ConditionedStatus reflects the observed status of a resource. Only one condition of each type may exist.
func NewConditionedStatus ¶
func NewConditionedStatus(c ...Condition) *ConditionedStatus
NewConditionedStatus returns a stat with the supplied conditions set.
type CredentialsSource ¶
type CredentialsSource = common.CredentialsSource
A CredentialsSource is a source from which provider credentials may be acquired.
type DeletionPolicy ¶
type DeletionPolicy string
A DeletionPolicy determines what should happen to the underlying external resource when a managed resource is deleted. +kubebuilder:validation:Enum=Orphan;Delete
const ( // DeletionOrphan means the external resource will be orphaned when its // managed resource is deleted. DeletionOrphan DeletionPolicy = "Orphan" // DeletionDelete means both the external resource will be deleted when its // managed resource is deleted. DeletionDelete DeletionPolicy = "Delete" )
type EnvSelector ¶
type EnvSelector = common.EnvSelector
EnvSelector selects an environment variable.
type LocalSecretKeySelector ¶
type LocalSecretKeySelector = common.LocalSecretKeySelector
A LocalSecretKeySelector is a reference to a secret key in the same namespace with the referencing object.
type LocalSecretReference ¶
type LocalSecretReference = common.LocalSecretReference
A LocalSecretReference is a reference to a secret in the same namespace as the referencer.
type ManagementAction ¶
type ManagementAction = common.ManagementAction
A ManagementAction represents an action that the Crossplane controllers can take on an external resource.
type ManagementPolicies ¶
type ManagementPolicies = common.ManagementPolicies
ManagementPolicies determine how should Crossplane controllers manage an external resource through an array of ManagementActions.
type MergeOptions ¶
type MergeOptions = common.MergeOptions
MergeOptions Specifies merge options on a field path.
type NamespacedReference ¶
type NamespacedReference = common.NamespacedReference
A NamespacedReference to a named object.
type NamespacedSelector ¶
type NamespacedSelector = common.NamespacedSelector
NamespacedSelector selects a namespaced object.
type ObservedStatus ¶
type ObservedStatus = common.ObservedStatus
ObservedStatus contains the recent reconciliation stats.
type ProviderConfigReference ¶
type ProviderConfigReference = common.ProviderConfigReference
ProviderConfigReference is a typed reference to a ProviderConfig object, with a known api group.
type ProviderConfigStatus ¶
type ProviderConfigStatus = common.ProviderConfigStatus
A ProviderConfigStatus defines the observed status of a ProviderConfig.
type ProviderConfigUsage ¶
type ProviderConfigUsage = common.ProviderConfigUsage
A ProviderConfigUsage is a record that a particular managed resource is using a particular provider configuration.
type ResolutionPolicy ¶
type ResolutionPolicy = common.ResolutionPolicy
ResolutionPolicy is a type for resolution policy.
type ResolvePolicy ¶
type ResolvePolicy = common.ResolvePolicy
ResolvePolicy is a type for resolve policy.
type ResourceSpec ¶
type ResourceSpec struct {
// 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.
// +optional
WriteConnectionSecretToReference *SecretReference `json:"writeConnectionSecretToRef,omitempty"`
// ProviderConfigReference specifies how the provider that will be used to
// create, observe, update, and delete this managed resource should be
// configured.
// +kubebuilder:default={"name": "default"}
ProviderConfigReference *Reference `json:"providerConfigRef,omitempty"`
// THIS IS A BETA FIELD. It is on by default but can be opted out
// through a Crossplane feature flag.
// 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 ManagementPolicies `json:"managementPolicies,omitempty"`
// DeletionPolicy specifies what will happen to the underlying external
// when this managed resource is deleted - either "Delete" or "Orphan" the
// external resource.
// This field is planned to be deprecated in favor of the ManagementPolicies
// 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 DeletionPolicy `json:"deletionPolicy,omitempty"`
}
A ResourceSpec defines the desired state of a managed resource.
func (*ResourceSpec) DeepCopy ¶
func (in *ResourceSpec) DeepCopy() *ResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
func (*ResourceSpec) DeepCopyInto ¶
func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceStatus ¶
type ResourceStatus struct {
ConditionedStatus `json:",inline"`
ObservedStatus `json:",inline"`
}
ResourceStatus represents the observed state of a managed resource.
func (*ResourceStatus) DeepCopy ¶
func (in *ResourceStatus) DeepCopy() *ResourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceStatus.
func (*ResourceStatus) DeepCopyInto ¶
func (in *ResourceStatus) DeepCopyInto(out *ResourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretKeySelector ¶
type SecretKeySelector = common.SecretKeySelector
A SecretKeySelector is a reference to a secret key in an arbitrary namespace.
type SecretReference ¶
type SecretReference = common.SecretReference
A SecretReference is a reference to a secret in an arbitrary namespace.
type TargetSpec ¶
type TargetSpec struct {
// WriteConnectionSecretToReference specifies the name of a Secret, in the
// same namespace as this target, to which any connection details for this
// target should be written or already exist. Connection secrets referenced
// by a target should contain information for connecting to a resource that
// allows for scheduling of workloads.
// +optional
WriteConnectionSecretToReference *LocalSecretReference `json:"connectionSecretRef,omitempty"`
// A ResourceReference specifies an existing managed resource, in any
// namespace, which this target should attempt to propagate a connection
// secret from.
// +optional
ResourceReference *corev1.ObjectReference `json:"clusterRef,omitempty"`
}
A TargetSpec defines the common fields of objects used for exposing infrastructure to workloads that can be scheduled to.
Deprecated.
func (*TargetSpec) DeepCopy ¶
func (in *TargetSpec) DeepCopy() *TargetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetSpec.
func (*TargetSpec) DeepCopyInto ¶
func (in *TargetSpec) DeepCopyInto(out *TargetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetStatus ¶
type TargetStatus struct {
ConditionedStatus `json:",inline"`
}
A TargetStatus defines the observed status a target.
Deprecated.
func (*TargetStatus) DeepCopy ¶
func (in *TargetStatus) DeepCopy() *TargetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetStatus.
func (*TargetStatus) DeepCopyInto ¶
func (in *TargetStatus) DeepCopyInto(out *TargetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TypedReference ¶
type TypedReference = common.TypedReference
A TypedReference refers to an object by Name, Kind, and APIVersion. It is commonly used to reference cluster-scoped objects or objects where the namespace is already known.
type UpdatePolicy ¶
type UpdatePolicy = common.UpdatePolicy
An UpdatePolicy determines how something should be updated - either automatically (without human intervention) or manually.