v1alpha1

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Overview

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

Index

Constants

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

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 (
	ControllerConfigKind             = reflect.TypeOf(ControllerConfig{}).Name()
	ControllerConfigGroupKind        = schema.GroupKind{Group: Group, Kind: ControllerConfigKind}.String()
	ControllerConfigKindAPIVersion   = ControllerConfigKind + "." + SchemeGroupVersion.String()
	ControllerConfigGroupVersionKind = SchemeGroupVersion.WithKind(ControllerConfigKind)
)

ControllerConfig type metadata.

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.0.0

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

ToNodes converts LockPackages to DAG nodes.

Types

type ControllerConfig added in v0.14.0

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

	Spec ControllerConfigSpec `json:"spec,omitempty"`
}

ControllerConfig is the CRD type for a packaged controller configuration. +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Cluster

func (*ControllerConfig) DeepCopy added in v0.14.0

func (in *ControllerConfig) DeepCopy() *ControllerConfig

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

func (*ControllerConfig) DeepCopyInto added in v0.14.0

func (in *ControllerConfig) DeepCopyInto(out *ControllerConfig)

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

func (*ControllerConfig) DeepCopyObject added in v0.14.0

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

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

type ControllerConfigList added in v0.14.0

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

ControllerConfigList contains a list of ControllerConfig.

func (*ControllerConfigList) DeepCopy added in v0.14.0

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

func (*ControllerConfigList) DeepCopyInto added in v0.14.0

func (in *ControllerConfigList) DeepCopyInto(out *ControllerConfigList)

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

func (*ControllerConfigList) DeepCopyObject added in v0.14.0

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

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

type ControllerConfigSpec added in v0.14.0

type ControllerConfigSpec struct {
	// Metadata that will be added to the provider Pod.
	// +optional
	Metadata *PodObjectMeta `json:"metadata,omitempty"`

	// Number of desired pods. This is a pointer to distinguish between explicit
	// zero and not specified. Defaults to 1.
	// Note: If more than 1 replica is set and leader election is not enabled then
	// controllers could conflict. Environment variable "LEADER_ELECTION" can be
	// used to enable leader election process.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`
	// Docker image name.
	// More info: https://kubernetes.io/docs/concepts/containers/images
	// This field is optional to allow higher level config management to default or override
	// container images in workload controllers like Deployments and StatefulSets.
	// +optional
	Image *string `json:"image,omitempty"`
	// NodeSelector is a selector which must be true for the pod to fit on a node.
	// Selector which must match a node's labels for the pod to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// ServiceAccountName is the name of the ServiceAccount to use to run this pod.
	// More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
	// +optional
	ServiceAccountName *string `json:"serviceAccountName,omitempty"`
	// NodeName is a request to schedule this pod onto a specific node. If it is non-empty,
	// the scheduler simply schedules this pod onto that node, assuming that it fits resource
	// requirements.
	// +optional
	NodeName *string `json:"nodeName,omitempty"`
	// PodSecurityContext holds pod-level security attributes and common container settings.
	// Optional: Defaults to empty.  See type description for default values of each field.
	// +optional
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
	// SecurityContext holds container-level security attributes and common container settings.
	// Optional: Defaults to empty.  See type description for default values of each field.
	// +optional
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
	// If specified, these secrets will be passed to individual puller implementations for them to use. For example,
	// in the case of docker, only DockerConfig type secrets are honored.
	// More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
	// Setting ImagePullSecrets will replace any secrets that have been
	// propagated to a controller Deployment, typically via packagePullSecrets.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	// Image pull policy.
	// One of Always, Never, IfNotPresent.
	// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
	// +optional
	ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// If specified, the pod's scheduling constraints
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`
	// If specified, the pod's tolerations.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	// If specified, indicates the pod's priority. "system-node-critical" and
	// "system-cluster-critical" are two special keywords which indicate the
	// highest priorities with the former being the highest priority. Any other
	// name must be defined by creating a PriorityClass object with that name.
	// If not specified, the pod priority will be default or zero if there is no
	// default.
	// +optional
	PriorityClassName *string `json:"priorityClassName,omitempty"`
	// RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used
	// to run this pod.  If no RuntimeClass resource matches the named class, the pod will not be run.
	// If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an
	// empty definition that uses the default runtime handler.
	// More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md
	// This is a beta feature as of Kubernetes v1.14.
	// +optional
	RuntimeClassName *string `json:"runtimeClassName,omitempty"`
	// Compute Resources required by this container.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
	// +optional
	ResourceRequirements *corev1.ResourceRequirements `json:"resources,omitempty"`
	// Arguments to the entrypoint.
	// The docker image's CMD is used if this is not provided.
	// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
	// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
	// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
	// regardless of whether the variable exists or not.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
	// +optional
	Args []string `json:"args,omitempty"`
	// List of sources to populate environment variables in the container.
	// The keys defined within a source must be a C_IDENTIFIER. All invalid keys
	// will be reported as an event when the container is starting. When a key exists in multiple
	// sources, the value associated with the last source will take precedence.
	// Values defined by an Env with a duplicate key will take precedence.
	// Cannot be updated.
	// +optional
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
	// List of environment variables to set in the container.
	// Cannot be updated.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
	// List of container ports to expose on the container
	// +optional
	Ports []corev1.ContainerPort `json:"ports,omitempty"`
}

ControllerConfigSpec specifies the configuration for a packaged controller. Values provided will override package manager defaults. Labels and annotations are passed to both the controller Deployment and ServiceAccount.

func (*ControllerConfigSpec) DeepCopy added in v0.14.0

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

func (*ControllerConfigSpec) DeepCopyInto added in v0.14.0

func (in *ControllerConfigSpec) DeepCopyInto(out *ControllerConfigSpec)

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

type Dependency added in v1.0.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.0.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.0.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.0.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.0.0

func (d *Dependency) Identifier() string

Identifier returns a dependency's source.

func (*Dependency) Neighbors added in v1.0.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.0.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:subresource:status +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Cluster

func (*Lock) DeepCopy added in v1.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.0

func (l *LockPackage) Identifier() string

Identifier returns the source of a LockPackage.

func (*LockPackage) Neighbors added in v1.0.0

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

Neighbors returns dependencies of a LockPackage.

type PackageType added in v1.0.0

type PackageType string

A PackageType is a type of package.

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

Types of packages.

type PodObjectMeta added in v1.1.0

type PodObjectMeta struct {
	// Annotations is an unstructured key value map stored with a resource that may be
	// set by external tools to store and retrieve arbitrary metadata. They are not
	// queryable and should be preserved when modifying objects.
	// More info: http://kubernetes.io/docs/user-guide/annotations
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
}

PodObjectMeta is metadata that is added to the Pods in a provider's Deployment.

func (*PodObjectMeta) DeepCopy added in v1.1.0

func (in *PodObjectMeta) DeepCopy() *PodObjectMeta

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

func (*PodObjectMeta) DeepCopyInto added in v1.1.0

func (in *PodObjectMeta) DeepCopyInto(out *PodObjectMeta)

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