v1alpha1

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 13

Documentation

Overview

Package v1alpha1 contains the v1alpha1 group Object resources of the Kubernetes provider. +kubebuilder:object:generate=true +groupName=kubernetes.crossplane.io +versionName=v1alpha1

Index

Constants

View Source
const (
	Group   = "kubernetes.crossplane.io"
	Version = "v1alpha1"
)

Package type metadata.

View Source
const (
	// Default means the provider can fully manage the resource.
	Default ManagementPolicy = "Default"
	// ObserveCreateUpdate means the provider can observe, create, or update
	// the resource, but can not delete it.
	ObserveCreateUpdate ManagementPolicy = "ObserveCreateUpdate"
	// ObserveDelete means the provider can observe or delete the resource, but
	// can not create and update it.
	ObserveDelete ManagementPolicy = "ObserveDelete"
	// Observe means the provider can only observe the resource.
	Observe ManagementPolicy = "Observe"

	// ObjectActionCreate means to create an Object
	ObjectActionCreate ObjectAction = "Create"
	// ObjectActionUpdate means to update an Object
	ObjectActionUpdate ObjectAction = "Update"
	// ObjectActionDelete means to delete an Object
	ObjectActionDelete ObjectAction = "Delete"
)

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}
)
View Source
var (
	ObjectKind             = reflect.TypeOf(Object{}).Name()
	ObjectGroupKind        = schema.GroupKind{Group: Group, Kind: ObjectKind}.String()
	ObjectKindAPIVersion   = ObjectKind + "." + SchemeGroupVersion.String()
	ObjectGroupVersionKind = SchemeGroupVersion.WithKind(ObjectKind)
)

Object type metadata.

Functions

This section is empty.

Types

type ConnectionDetail added in v0.8.0

type ConnectionDetail struct {
	v1.ObjectReference    `json:",inline"`
	ToConnectionSecretKey string `json:"toConnectionSecretKey,omitempty"`
}

ConnectionDetail represents an entry in the connection secret for an Object

func (*ConnectionDetail) DeepCopy added in v0.8.0

func (in *ConnectionDetail) DeepCopy() *ConnectionDetail

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

func (*ConnectionDetail) DeepCopyInto added in v0.8.0

func (in *ConnectionDetail) DeepCopyInto(out *ConnectionDetail)

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

type DependsOn added in v0.3.0

type DependsOn struct {
	// APIVersion of the referenced object.
	// +kubebuilder:default=kubernetes.crossplane.io/v1alpha1
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
	// Kind of the referenced object.
	// +kubebuilder:default=Object
	// +optional
	Kind string `json:"kind,omitempty"`
	// Name of the referenced object.
	Name string `json:"name"`
	// Namespace of the referenced object.
	// +optional
	Namespace string `json:"namespace,omitempty"`
}

DependsOn refers to an object by Name, Kind, APIVersion, etc. It is used to reference other Object or arbitrary Kubernetes resource which is either cluster or namespace scoped.

func (*DependsOn) DeepCopy added in v0.3.0

func (in *DependsOn) DeepCopy() *DependsOn

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

func (*DependsOn) DeepCopyInto added in v0.3.0

func (in *DependsOn) DeepCopyInto(out *DependsOn)

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

type ManagementPolicy added in v0.3.0

type ManagementPolicy string

A ManagementPolicy determines what should happen to the underlying external resource when a managed resource is created, updated, deleted, or observed. +kubebuilder:validation:Enum=Default;ObserveCreateUpdate;ObserveDelete;Observe

func (*ManagementPolicy) IsActionAllowed added in v0.3.0

func (p *ManagementPolicy) IsActionAllowed(action ObjectAction) bool

IsActionAllowed determines if action is allowed to be performed on Object

type Object

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

	Spec   ObjectSpec   `json:"spec"`
	Status ObjectStatus `json:"status,omitempty"`
}

A Object is an provider Kubernetes API type +kubebuilder:subresource:status +kubebuilder:printcolumn:name="KIND",type="string",JSONPath=".spec.forProvider.manifest.kind" +kubebuilder:printcolumn:name="APIVERSION",type="string",JSONPath=".spec.forProvider.manifest.apiVersion",priority=1 +kubebuilder:printcolumn:name="METANAME",type="string",JSONPath=".spec.forProvider.manifest.metadata.name",priority=1 +kubebuilder:printcolumn:name="METANAMESPACE",type="string",JSONPath=".spec.forProvider.manifest.metadata.namespace",priority=1 +kubebuilder:printcolumn:name="PROVIDERCONFIG",type="string",JSONPath=".spec.providerConfigRef.name" +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,kubernetes} +kubebuilder:deprecatedversion Deprecated: v1alpha1.Object is deprecated in favor of v1alpha2.Object

func (*Object) ConvertFrom added in v0.11.0

func (dst *Object) ConvertFrom(srcRaw conversion.Hub) error

ConvertFrom converts from the Hub version (v1alpha2) to this version.

func (*Object) ConvertTo added in v0.11.0

func (src *Object) ConvertTo(dstRaw conversion.Hub) error

ConvertTo converts this Object to the Hub version (v1alpha2).

func (*Object) DeepCopy

func (in *Object) DeepCopy() *Object

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

func (*Object) DeepCopyInto

func (in *Object) DeepCopyInto(out *Object)

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

func (*Object) DeepCopyObject

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

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

func (*Object) GetCondition

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

GetCondition of this Object.

func (*Object) GetDeletionPolicy

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

GetDeletionPolicy of this Object.

func (*Object) GetManagementPolicies added in v0.10.0

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

GetManagementPolicies of this Object.

func (*Object) GetProviderConfigReference

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

GetProviderConfigReference of this Object.

func (*Object) GetProviderReference

func (mg *Object) GetProviderReference() *xpv1.Reference

GetProviderReference of this Object. Deprecated: Use GetProviderConfigReference.

func (*Object) GetPublishConnectionDetailsTo added in v0.4.0

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

GetPublishConnectionDetailsTo of this Object.

func (*Object) GetWriteConnectionSecretToReference

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

GetWriteConnectionSecretToReference of this Object.

func (*Object) SetConditions

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

SetConditions of this Object.

func (*Object) SetDeletionPolicy

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

SetDeletionPolicy of this Object.

func (*Object) SetManagementPolicies added in v0.10.0

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

SetManagementPolicies of this Object.

func (*Object) SetProviderConfigReference

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

SetProviderConfigReference of this Object.

func (*Object) SetProviderReference

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

SetProviderReference of this Object. Deprecated: Use SetProviderConfigReference.

func (*Object) SetPublishConnectionDetailsTo added in v0.4.0

func (mg *Object) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo)

SetPublishConnectionDetailsTo of this Object.

func (*Object) SetWriteConnectionSecretToReference

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

SetWriteConnectionSecretToReference of this Object.

type ObjectAction added in v0.3.0

type ObjectAction string

ObjectAction defines actions applicable to Object

type ObjectList

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

ObjectList contains a list of Object

func (*ObjectList) DeepCopy

func (in *ObjectList) DeepCopy() *ObjectList

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

func (*ObjectList) DeepCopyInto

func (in *ObjectList) DeepCopyInto(out *ObjectList)

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

func (*ObjectList) DeepCopyObject

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

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

func (*ObjectList) GetItems

func (l *ObjectList) GetItems() []resource.Managed

GetItems of this ObjectList.

type ObjectObservation

type ObjectObservation struct {
	// Raw JSON representation of the remote object.
	// +kubebuilder:validation:EmbeddedResource
	// +kubebuilder:pruning:PreserveUnknownFields
	Manifest runtime.RawExtension `json:"manifest,omitempty"`
}

ObjectObservation are the observable fields of a Object.

func (*ObjectObservation) DeepCopy

func (in *ObjectObservation) DeepCopy() *ObjectObservation

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

func (*ObjectObservation) DeepCopyInto

func (in *ObjectObservation) DeepCopyInto(out *ObjectObservation)

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

type ObjectParameters

type ObjectParameters struct {
	// Raw JSON representation of the kubernetes object to be created.
	// +kubebuilder:validation:EmbeddedResource
	// +kubebuilder:pruning:PreserveUnknownFields
	Manifest runtime.RawExtension `json:"manifest"`
}

ObjectParameters are the configurable fields of a Object.

func (*ObjectParameters) DeepCopy

func (in *ObjectParameters) DeepCopy() *ObjectParameters

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

func (*ObjectParameters) DeepCopyInto

func (in *ObjectParameters) DeepCopyInto(out *ObjectParameters)

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

type ObjectSpec

type ObjectSpec struct {
	ResourceSpec      `json:",inline"`
	ConnectionDetails []ConnectionDetail `json:"connectionDetails,omitempty"`
	ForProvider       ObjectParameters   `json:"forProvider"`
	// +kubebuilder:default=Default
	ManagementPolicy `json:"managementPolicy,omitempty"`
	References       []Reference `json:"references,omitempty"`
	Readiness        Readiness   `json:"readiness,omitempty"`
}

A ObjectSpec defines the desired state of a Object.

func (*ObjectSpec) DeepCopy

func (in *ObjectSpec) DeepCopy() *ObjectSpec

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

func (*ObjectSpec) DeepCopyInto

func (in *ObjectSpec) DeepCopyInto(out *ObjectSpec)

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

type ObjectStatus

type ObjectStatus struct {
	xpv1.ResourceStatus `json:",inline"`
	AtProvider          ObjectObservation `json:"atProvider,omitempty"`
}

A ObjectStatus represents the observed state of a Object.

func (*ObjectStatus) DeepCopy

func (in *ObjectStatus) DeepCopy() *ObjectStatus

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

func (*ObjectStatus) DeepCopyInto

func (in *ObjectStatus) DeepCopyInto(out *ObjectStatus)

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

type PatchesFrom added in v0.3.0

type PatchesFrom struct {
	DependsOn `json:",inline"`
	// FieldPath is the path of the field on the resource whose value is to be
	// used as input.
	FieldPath *string `json:"fieldPath"`
}

PatchesFrom refers to an object by Name, Kind, APIVersion, etc., and patch fields from this object.

func (*PatchesFrom) DeepCopy added in v0.3.0

func (in *PatchesFrom) DeepCopy() *PatchesFrom

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

func (*PatchesFrom) DeepCopyInto added in v0.3.0

func (in *PatchesFrom) DeepCopyInto(out *PatchesFrom)

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

type Readiness added in v0.9.0

type Readiness struct {
	// Policy defines how the Object's readiness condition should be computed.
	// +optional
	// +kubebuilder:validation:Enum=SuccessfulCreate;DeriveFromObject;AllTrue
	// +kubebuilder:default=SuccessfulCreate
	Policy ReadinessPolicy `json:"policy,omitempty"`
}

Readiness defines how the object's readiness condition should be computed, if not specified it will be considered ready as soon as the underlying external resource is considered up-to-date.

func (*Readiness) DeepCopy added in v0.9.0

func (in *Readiness) DeepCopy() *Readiness

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

func (*Readiness) DeepCopyInto added in v0.9.0

func (in *Readiness) DeepCopyInto(out *Readiness)

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

type ReadinessPolicy added in v0.9.0

type ReadinessPolicy string

ReadinessPolicy defines how the Object's readiness condition should be computed.

const (
	// ReadinessPolicySuccessfulCreate means the object is marked as ready when the
	// underlying external resource is successfully created.
	ReadinessPolicySuccessfulCreate ReadinessPolicy = "SuccessfulCreate"
	// ReadinessPolicyDeriveFromObject means the object is marked as ready if and only if the underlying
	// external resource is considered ready.
	ReadinessPolicyDeriveFromObject ReadinessPolicy = "DeriveFromObject"

	// ReadinessPolicyAllTrue means that all conditions have status true on the object.
	// There must be at least one condition.
	ReadinessPolicyAllTrue ReadinessPolicy = "AllTrue"
)

type Reference added in v0.3.0

type Reference struct {
	// DependsOn is used to declare dependency on other Object or arbitrary
	// Kubernetes resource.
	// +optional
	*DependsOn `json:"dependsOn,omitempty"`
	// PatchesFrom is used to declare dependency on other Object or arbitrary
	// Kubernetes resource, and also patch fields from this object.
	// +optional
	*PatchesFrom `json:"patchesFrom,omitempty"`
	// ToFieldPath is the path of the field on the resource whose value will
	// be changed with the result of transforms. Leave empty if you'd like to
	// propagate to the same path as patchesFrom.fieldPath.
	// +optional
	ToFieldPath *string `json:"toFieldPath,omitempty"`
}

Reference refers to an Object or arbitrary Kubernetes resource and optionally patch values from that resource to the current Object.

func (*Reference) ApplyFromFieldPathPatch added in v0.3.0

func (r *Reference) ApplyFromFieldPathPatch(from, to runtime.Object) error

ApplyFromFieldPathPatch patches the "to" resource, using a source field on the "from" resource.

func (*Reference) DeepCopy added in v0.3.0

func (in *Reference) DeepCopy() *Reference

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

func (*Reference) DeepCopyInto added in v0.3.0

func (in *Reference) DeepCopyInto(out *Reference)

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

type ResourceSpec added in v0.9.0

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.
	// 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.
	// +optional
	WriteConnectionSecretToReference *xpv1.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"`

	// 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 *xpv1.Reference `json:"providerConfigRef,omitempty"`

	// ProviderReference specifies the provider that will be used to create,
	// observe, update, and delete this managed resource.
	// Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`
	ProviderReference *xpv1.Reference `json:"providerRef,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 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"`
}

A ResourceSpec defines the desired state of a managed resource.

func (*ResourceSpec) DeepCopy added in v0.9.0

func (in *ResourceSpec) DeepCopy() *ResourceSpec

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

func (*ResourceSpec) DeepCopyInto added in v0.9.0

func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)

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