v1beta1

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Overview

Package v1beta1 contains resources relating to Crossplane packages. +kubebuilder:object:generate=true +groupName=pkg.crossplane.io +versionName=v1beta1

Index

Constants

View Source
const (
	Group   = "pkg.crossplane.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 all registered types to the scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	LockKind             = reflect.TypeOf(Lock{}).Name()
	LockGroupKind        = schema.GroupKind{Group: Group, Kind: LockKind}.String()
	LockKindAPIVersion   = LockKind + "." + SchemeGroupVersion.String()
	LockGroupVersionKind = SchemeGroupVersion.WithKind(LockKind)
)

Lock type metadata.

Functions

func ToNodes added in v1.4.0

func ToNodes(pkgs ...LockPackage) []dag.Node

ToNodes converts LockPackages to DAG nodes.

Types

type Dependency added in v1.4.0

type Dependency struct {
	// Package is the OCI image name without a tag or digest.
	Package string `json:"package"`

	// Type is the type of package. Can be either Configuration or Provider.
	Type PackageType `json:"type"`

	// Constraints is a valid semver range, which will be used to select a valid
	// dependency version.
	Constraints string `json:"constraints"`
}

A Dependency is a dependency of a package in the lock.

func (*Dependency) AddNeighbors added in v1.4.0

func (d *Dependency) AddNeighbors(...dag.Node) error

AddNeighbors is a no-op for dependencies. We should never be adding neighbors to a dependency.

func (*Dependency) DeepCopy added in v1.4.0

func (in *Dependency) DeepCopy() *Dependency

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

func (*Dependency) DeepCopyInto added in v1.4.0

func (in *Dependency) DeepCopyInto(out *Dependency)

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

func (*Dependency) Identifier added in v1.4.0

func (d *Dependency) Identifier() string

Identifier returns a dependency's source.

func (*Dependency) Neighbors added in v1.4.0

func (d *Dependency) Neighbors() []dag.Node

Neighbors in is a no-op for dependencies because we are not yet aware of its dependencies.

type Lock added in v1.4.0

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

	Packages []LockPackage `json:"packages,omitempty"`
}

Lock is the CRD type that tracks package dependencies. +kubebuilder:storageversion +kubebuilder:subresource:status +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Cluster

func (*Lock) DeepCopy added in v1.4.0

func (in *Lock) DeepCopy() *Lock

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

func (*Lock) DeepCopyInto added in v1.4.0

func (in *Lock) DeepCopyInto(out *Lock)

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

func (*Lock) DeepCopyObject added in v1.4.0

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

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

type LockList added in v1.4.0

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

LockList contains a list of Lock.

func (*LockList) DeepCopy added in v1.4.0

func (in *LockList) DeepCopy() *LockList

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

func (*LockList) DeepCopyInto added in v1.4.0

func (in *LockList) DeepCopyInto(out *LockList)

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

func (*LockList) DeepCopyObject added in v1.4.0

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

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

type LockPackage added in v1.4.0

type LockPackage struct {
	// Name corresponds to the name of the package revision for this package.
	Name string `json:"name"`

	// Type is the type of package. Can be either Configuration or Provider.
	Type PackageType `json:"type"`

	// Source is the OCI image name without a tag or digest.
	Source string `json:"source"`

	// Version is the tag or digest of the OCI image.
	Version string `json:"version"`

	// Dependencies are the list of dependencies of this package. The order of
	// the dependencies will dictate the order in which they are resolved.
	Dependencies []Dependency `json:"dependencies"`
}

LockPackage is a package that is in the lock.

func (*LockPackage) AddNeighbors added in v1.4.0

func (l *LockPackage) AddNeighbors(nodes ...dag.Node) error

AddNeighbors adds dependencies to a LockPackage. A LockPackage should always have all dependencies declared before being added to the Lock, so we no-op when adding a neighbor.

func (*LockPackage) DeepCopy added in v1.4.0

func (in *LockPackage) DeepCopy() *LockPackage

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

func (*LockPackage) DeepCopyInto added in v1.4.0

func (in *LockPackage) DeepCopyInto(out *LockPackage)

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

func (*LockPackage) Identifier added in v1.4.0

func (l *LockPackage) Identifier() string

Identifier returns the source of a LockPackage.

func (*LockPackage) Neighbors added in v1.4.0

func (l *LockPackage) Neighbors() []dag.Node

Neighbors returns dependencies of a LockPackage.

type PackageRevisionDesiredState

type PackageRevisionDesiredState string

PackageRevisionDesiredState is the desired state of the package revision.

const (
	// PackageRevisionActive is an active package revision.
	PackageRevisionActive PackageRevisionDesiredState = "Active"

	// PackageRevisionInactive is an inactive package revision.
	PackageRevisionInactive PackageRevisionDesiredState = "Inactive"
)

type PackageRevisionSpec

type PackageRevisionSpec struct {
	// ControllerConfigRef references a ControllerConfig resource that will be
	// used to configure the packaged controller Deployment.
	// +optional
	ControllerConfigReference *xpv1.Reference `json:"controllerConfigRef,omitempty"`

	// DesiredState of the PackageRevision. Can be either Active or Inactive.
	DesiredState PackageRevisionDesiredState `json:"desiredState"`

	// Package image used by install Pod to extract package contents.
	Package string `json:"image"`

	// PackagePullSecrets are named secrets in the same namespace that can be
	// used to fetch packages from private registries. They are also applied to
	// any images pulled for the package, such as a provider's controller image.
	// +optional
	PackagePullSecrets []corev1.LocalObjectReference `json:"packagePullSecrets,omitempty"`

	// PackagePullPolicy defines the pull policy for the package. It is also
	// applied to any images pulled for the package, such as a provider's
	// controller image.
	// Default is IfNotPresent.
	// +optional
	// +kubebuilder:default=IfNotPresent
	PackagePullPolicy *corev1.PullPolicy `json:"packagePullPolicy,omitempty"`

	// Revision number. Indicates when the revision will be garbage collected
	// based on the parent's RevisionHistoryLimit.
	Revision int64 `json:"revision"`

	// IgnoreCrossplaneConstraints indicates to the package manager whether to
	// honor Crossplane version constrains specified by the package.
	// Default is false.
	// +optional
	// +kubebuilder:default=false
	IgnoreCrossplaneConstraints *bool `json:"ignoreCrossplaneConstraints,omitempty"`

	// SkipDependencyResolution indicates to the package manager whether to skip
	// resolving dependencies for a package. Setting this value to true may have
	// unintended consequences.
	// Default is false.
	// +optional
	// +kubebuilder:default=false
	SkipDependencyResolution *bool `json:"skipDependencyResolution,omitempty"`
}

PackageRevisionSpec specifies the desired state of a PackageRevision.

func (*PackageRevisionSpec) DeepCopy

func (in *PackageRevisionSpec) DeepCopy() *PackageRevisionSpec

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

func (*PackageRevisionSpec) DeepCopyInto

func (in *PackageRevisionSpec) DeepCopyInto(out *PackageRevisionSpec)

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

type PackageRevisionStatus

type PackageRevisionStatus struct {
	xpv1.ConditionedStatus `json:",inline"`
	ControllerRef          xpv1.Reference `json:"controllerRef,omitempty"`

	// References to objects owned by PackageRevision.
	ObjectRefs []xpv1.TypedReference `json:"objectRefs,omitempty"`

	// Dependency information.
	FoundDependencies     int64 `json:"foundDependencies,omitempty"`
	InstalledDependencies int64 `json:"installedDependencies,omitempty"`
	InvalidDependencies   int64 `json:"invalidDependencies,omitempty"`

	// PermissionRequests made by this package. The package declares that its
	// controller needs these permissions to run. The RBAC manager is
	// responsible for granting them.
	PermissionRequests []rbacv1.PolicyRule `json:"permissionRequests,omitempty"`
}

PackageRevisionStatus represents the observed state of a PackageRevision.

func (*PackageRevisionStatus) DeepCopy

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

func (*PackageRevisionStatus) DeepCopyInto

func (in *PackageRevisionStatus) DeepCopyInto(out *PackageRevisionStatus)

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

type PackageType added in v1.4.0

type PackageType string

A PackageType is a type of package.

const (
	ConfigurationPackageType PackageType = "Configuration"
	ProviderPackageType      PackageType = "Provider"
)

Types of packages.

Jump to

Keyboard shortcuts

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