v1alpha1

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the v1alpha1 version of the manifests API group, containing file-based manifests for the packaging infrastructure. +kubebuilder:object:generate=true +groupName=manifests.package-operator.run

Index

Constants

View Source
const (
	// PackagePhaseAnnotation annotation to assign objects to a phase.
	PackagePhaseAnnotation = "package-operator.run/phase"
	// PackageConditionMapAnnotation specifies object conditions to map back
	// into Package Operator APIs.
	// Example: Available => my-own-prefix/Available.
	PackageConditionMapAnnotation = "package-operator.run/condition-map"
	// PackageExternalObjectAnnotation when set to "True", indicates
	// that the referenced object should only be observed during a phase
	// rather than reconciled.
	PackageExternalObjectAnnotation = "package-operator.run/external"
	// PackageCELConditionAnnotation contains a CEL expression
	// evaluating to a boolean value which determines whether the object is created.
	PackageCELConditionAnnotation = "package-operator.run/condition"
	// PackageCollisionProtectionAnnotation prevents Package Operator from working
	// on objects already under management by a different operator.
	PackageCollisionProtectionAnnotation = "package-operator.run/collision-protection"
)
View Source
const (
	// PackageLabel contains the name of the Package from the PackageManifest.
	PackageLabel = "package-operator.run/package"
	// PackageSourceImageAnnotation references the package container image originating this object.
	PackageSourceImageAnnotation = "package-operator.run/package-source-image"
	// PackageConfigAnnotation contains the configuration for this object.
	PackageConfigAnnotation = "package-operator.run/package-config"
	// PackageInstanceLabel contains the name of the Package instance.
	PackageInstanceLabel = "package-operator.run/instance"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "manifests.package-operator.run", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder runtime.SchemeBuilder

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type PackageEnvironment added in v1.7.0

type PackageEnvironment struct {
	// Kubernetes environment information. This section is always set.
	Kubernetes PackageEnvironmentKubernetes `json:"kubernetes"`
	// OpenShift environment information. This section is only set when OpenShift is detected.
	OpenShift *PackageEnvironmentOpenShift `json:"openShift,omitempty"`
	// Proxy configuration. Only available on OpenShift when the cluster-wide Proxy is enabled.
	// https://docs.openshift.com/container-platform/latest/networking/enable-cluster-wide-proxy.html
	Proxy *PackageEnvironmentProxy `json:"proxy,omitempty"`
	// HyperShift specific information. Only available when installed alongside HyperShift.
	// https://github.com/openshift/hypershift
	HyperShift *PackageEnvironmentHyperShift `json:"hyperShift,omitempty"`
}

PackageEnvironment information.

func (*PackageEnvironment) DeepCopy added in v1.7.0

func (in *PackageEnvironment) DeepCopy() *PackageEnvironment

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

func (*PackageEnvironment) DeepCopyInto added in v1.7.0

func (in *PackageEnvironment) DeepCopyInto(out *PackageEnvironment)

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

type PackageEnvironmentHyperShift added in v1.9.4

type PackageEnvironmentHyperShift struct {
	// Contains HyperShift HostedCluster specific information.
	// This information is only available when installed alongside HyperShift within a HostedCluster Namespace.
	// https://github.com/openshift/hypershift
	HostedCluster *PackageEnvironmentHyperShiftHostedCluster `json:"hostedCluster"`
}

PackageEnvironmentHyperShift contains HyperShift specific information. Only available when installed alongside HyperShift. https://github.com/openshift/hypershift

func (*PackageEnvironmentHyperShift) DeepCopy added in v1.9.4

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

func (*PackageEnvironmentHyperShift) DeepCopyInto added in v1.9.4

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

type PackageEnvironmentHyperShiftHostedCluster added in v1.9.4

type PackageEnvironmentHyperShiftHostedCluster struct {
	TemplateContextObjectMeta `json:"metadata"`
	// Namespace of HostedCluster components belonging to this HostedCluster object.
	HostedClusterNamespace string `json:"hostedClusterNamespace"`
}

PackageEnvironmentHyperShiftHostedCluster contains HyperShift HostedCluster specific information. This information is only available when installed alongside HyperShift within a HostedCluster Namespace. https://github.com/openshift/hypershift

func (*PackageEnvironmentHyperShiftHostedCluster) DeepCopy added in v1.9.4

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

func (*PackageEnvironmentHyperShiftHostedCluster) DeepCopyInto added in v1.9.4

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

type PackageEnvironmentKubernetes added in v1.7.0

type PackageEnvironmentKubernetes struct {
	// Kubernetes server version.
	Version string `json:"version"`
}

PackageEnvironmentKubernetes configures kubernetes environments.

func (*PackageEnvironmentKubernetes) DeepCopy added in v1.7.0

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

func (*PackageEnvironmentKubernetes) DeepCopyInto added in v1.7.0

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

type PackageEnvironmentOpenShift added in v1.7.0

type PackageEnvironmentOpenShift struct {
	// OpenShift server version.
	Version string `json:"version"`
}

PackageEnvironmentOpenShift configures openshift environments.

func (*PackageEnvironmentOpenShift) DeepCopy added in v1.7.0

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

func (*PackageEnvironmentOpenShift) DeepCopyInto added in v1.7.0

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

type PackageEnvironmentProxy added in v1.7.0

type PackageEnvironmentProxy struct {
	// HTTP_PROXY
	HTTPProxy string `json:"httpProxy,omitempty"`
	// HTTPS_PROXY
	HTTPSProxy string `json:"httpsProxy,omitempty"`
	// NO_PROXY
	NoProxy string `json:"noProxy,omitempty"`
}

PackageEnvironmentProxy configures proxy environments. On OpenShift, this config is taken from the cluster Proxy object. https://docs.openshift.com/container-platform/4.13/networking/enable-cluster-wide-proxy.html

func (*PackageEnvironmentProxy) DeepCopy added in v1.7.0

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

func (*PackageEnvironmentProxy) DeepCopyInto added in v1.7.0

func (in *PackageEnvironmentProxy) DeepCopyInto(out *PackageEnvironmentProxy)

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

type PackageManifest

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

	Spec PackageManifestSpec `json:"spec,omitempty"`
	Test PackageManifestTest `json:"test,omitempty"`
}

PackageManifest defines the manifest of a package. +kubebuilder:object:root=true

func (*PackageManifest) DeepCopy

func (in *PackageManifest) DeepCopy() *PackageManifest

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

func (*PackageManifest) DeepCopyInto

func (in *PackageManifest) DeepCopyInto(out *PackageManifest)

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

func (*PackageManifest) DeepCopyObject

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

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

type PackageManifestComponentsConfig added in v1.9.1

type PackageManifestComponentsConfig struct{}

PackageManifestComponentsConfig configures components of a package.

func (*PackageManifestComponentsConfig) DeepCopy added in v1.9.1

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

func (*PackageManifestComponentsConfig) DeepCopyInto added in v1.9.1

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

type PackageManifestConditionalFiltering added in v1.11.0

type PackageManifestConditionalFiltering struct {
	// Reusable CEL expressions. Can be used in 'package-operator.run/condition' annotations.
	// They are evaluated once per package.
	// +optional
	NamedConditions []PackageManifestNamedCondition `json:"namedConditions,omitempty"`
	// Adds CEL conditions to file system paths matching a glob pattern.
	// If a single condition matching a file system object's path evaluates to false,
	// the object is ignored.
	ConditionalPaths []PackageManifestConditionalPath `json:"conditionalPaths,omitempty"`
}

PackageManifestConditionalFiltering is used to conditionally render objects based on CEL expressions.

func (*PackageManifestConditionalFiltering) DeepCopy added in v1.11.0

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

func (*PackageManifestConditionalFiltering) DeepCopyInto added in v1.11.0

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

type PackageManifestConditionalPath added in v1.11.0

type PackageManifestConditionalPath struct {
	// A file system path glob pattern.
	// Syntax: https://pkg.go.dev/github.com/bmatcuk/doublestar@v1.3.4#Match
	Glob string `json:"glob"`
	// A CEL expression with a boolean output type.
	// Has access to the full template context and named conditions.
	Expression string `json:"expression"`
}

PackageManifestConditionalPath is used to conditionally render package objects based on their path.

func (*PackageManifestConditionalPath) DeepCopy added in v1.11.0

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

func (*PackageManifestConditionalPath) DeepCopyInto added in v1.11.0

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

type PackageManifestImage added in v1.3.0

type PackageManifestImage struct {
	// Image name to be use to reference it in the templates
	Name string `json:"name"`
	// Image identifier (REPOSITORY[:TAG])
	Image string `json:"image"`
}

PackageManifestImage specifies an image tag to be resolved.

func (*PackageManifestImage) DeepCopy added in v1.3.0

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

func (*PackageManifestImage) DeepCopyInto added in v1.3.0

func (in *PackageManifestImage) DeepCopyInto(out *PackageManifestImage)

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

type PackageManifestLock added in v1.3.0

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

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

PackageManifestLock allows locking packages to specific versions. +kubebuilder:object:root=true

func (*PackageManifestLock) DeepCopy added in v1.3.0

func (in *PackageManifestLock) DeepCopy() *PackageManifestLock

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

func (*PackageManifestLock) DeepCopyInto added in v1.3.0

func (in *PackageManifestLock) DeepCopyInto(out *PackageManifestLock)

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

func (*PackageManifestLock) DeepCopyObject added in v1.3.0

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

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

type PackageManifestLockImage added in v1.3.0

type PackageManifestLockImage struct {
	// Image name to be use to reference it in the templates
	Name string `json:"name"`
	// Image identifier (REPOSITORY[:TAG])
	Image string `json:"image"`
	// Image digest
	Digest string `json:"digest"`
}

PackageManifestLockImage contains information about a resolved image.

func (*PackageManifestLockImage) DeepCopy added in v1.3.0

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

func (*PackageManifestLockImage) DeepCopyInto added in v1.3.0

func (in *PackageManifestLockImage) DeepCopyInto(out *PackageManifestLockImage)

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

type PackageManifestLockSpec added in v1.3.0

type PackageManifestLockSpec struct {
	// List of resolved images
	Images []PackageManifestLockImage `json:"images"`
}

PackageManifestLockSpec defines a set of packages that are locked to a specific version.

func (*PackageManifestLockSpec) DeepCopy added in v1.3.0

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

func (*PackageManifestLockSpec) DeepCopyInto added in v1.3.0

func (in *PackageManifestLockSpec) DeepCopyInto(out *PackageManifestLockSpec)

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

type PackageManifestNamedCondition added in v1.11.0

type PackageManifestNamedCondition struct {
	// A unique name. Must match the CEL identifier pattern: [_a-zA-Z][_a-zA-Z0-9]*
	Name string `json:"name"`
	// A CEL expression with a boolean output type.
	// Has access to the full template context.
	Expression string `json:"expression"`
}

PackageManifestNamedCondition is a reusable named CEL expression. It is injected as a variable into the CEL evaluation environment, and its value is set to the result of Expression ("true"/"false").

func (*PackageManifestNamedCondition) DeepCopy added in v1.11.0

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

func (*PackageManifestNamedCondition) DeepCopyInto added in v1.11.0

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

type PackageManifestPhase

type PackageManifestPhase struct {
	// Name of the reconcile phase. Must be unique within a PackageManifest
	Name string `json:"name"`
	// If non empty, phase reconciliation is delegated to another controller.
	// If set to the string "default" the built-in controller reconciling the object.
	// If set to any other string, an out-of-tree controller needs to be present to handle ObjectSetPhase objects.
	Class string `json:"class,omitempty"`
}

PackageManifestPhase defines a package phase.

func (*PackageManifestPhase) DeepCopy

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

func (*PackageManifestPhase) DeepCopyInto

func (in *PackageManifestPhase) DeepCopyInto(out *PackageManifestPhase)

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

type PackageManifestScope

type PackageManifestScope string

PackageManifestScope declares the available scopes to install this package in.

const (
	// PackageManifestScopeCluster scope allows the package to be installed for the whole cluster.
	// The package needs to default installation namespaces and create them.
	PackageManifestScopeCluster PackageManifestScope = "Cluster"
	// PackageManifestScopeNamespaced scope allows the package to be installed for specific namespaces.
	PackageManifestScopeNamespaced PackageManifestScope = "Namespaced"
)

type PackageManifestSpec

type PackageManifestSpec struct {
	// Scopes declare the available installation scopes for the package.
	// Either Cluster, Namespaced, or both.
	Scopes []PackageManifestScope `json:"scopes"`
	// Phases correspond to the references to the phases which are going to be the
	// part of the ObjectDeployment/ClusterObjectDeployment.
	Phases []PackageManifestPhase `json:"phases"`
	// Availability Probes check objects that are part of the package.
	// All probes need to succeed for a package to be considered Available.
	// Failing probes will prevent the reconciliation of objects in later phases.
	// +optional
	AvailabilityProbes []corev1alpha1.ObjectSetProbe `json:"availabilityProbes,omitempty"`
	// Configuration specification.
	Config PackageManifestSpecConfig `json:"config,omitempty"`
	// List of images to be resolved
	Images []PackageManifestImage `json:"images"`
	// Configuration for multi-component packages. If this field is not set it is assumed
	// that the containing package is a single-component package.
	// +optional
	Components *PackageManifestComponentsConfig `json:"components,omitempty"`
	// Used to conditionally render objects based on CEL expressions.
	// +optional
	ConditionalFiltering PackageManifestConditionalFiltering `json:"conditionalFiltering,omitempty"`
}

PackageManifestSpec represents the spec of the packagemanifest containing the details about phases and availability probes.

func (*PackageManifestSpec) DeepCopy

func (in *PackageManifestSpec) DeepCopy() *PackageManifestSpec

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

func (*PackageManifestSpec) DeepCopyInto

func (in *PackageManifestSpec) DeepCopyInto(out *PackageManifestSpec)

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

type PackageManifestSpecConfig added in v1.3.0

type PackageManifestSpecConfig struct {
	// OpenAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.
	OpenAPIV3Schema *apiextensionsv1.JSONSchemaProps `json:"openAPIV3Schema,omitempty"`
}

PackageManifestSpecConfig configutes a package manifest.

func (*PackageManifestSpecConfig) DeepCopy added in v1.3.0

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

func (*PackageManifestSpecConfig) DeepCopyInto added in v1.3.0

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

type PackageManifestTest added in v1.1.0

type PackageManifestTest struct {
	// Template testing configuration.
	Template    []PackageManifestTestCaseTemplate `json:"template,omitempty"`
	Kubeconform *PackageManifestTestKubeconform   `json:"kubeconform,omitempty"`
}

PackageManifestTest configures test cases.

func (*PackageManifestTest) DeepCopy added in v1.1.0

func (in *PackageManifestTest) DeepCopy() *PackageManifestTest

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

func (*PackageManifestTest) DeepCopyInto added in v1.1.0

func (in *PackageManifestTest) DeepCopyInto(out *PackageManifestTest)

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

type PackageManifestTestCaseTemplate added in v1.1.0

type PackageManifestTestCaseTemplate struct {
	// Name describing the test case.
	Name string `json:"name"`
	// Template data to use in the test case.
	Context TemplateContext `json:"context,omitempty"`
}

PackageManifestTestCaseTemplate template testing configuration.

func (*PackageManifestTestCaseTemplate) DeepCopy added in v1.1.0

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

func (*PackageManifestTestCaseTemplate) DeepCopyInto added in v1.1.0

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

type PackageManifestTestKubeconform added in v1.9.2

type PackageManifestTestKubeconform struct {
	// Kubernetes version to use schemas from.
	KubernetesVersion string `json:"kubernetesVersion"`
	//nolint:lll
	// OpenAPI schema locations for kubeconform
	// defaults to:
	// - https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/{{ .NormalizedKubernetesVersion }}-standalone{{ .StrictSuffix }}/{{ .ResourceKind }}{{ .KindSuffix }}.json
	// - https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json
	SchemaLocations []string `json:"schemaLocations,omitempty"`
}

PackageManifestTestKubeconform configures kubeconform testing.

func (*PackageManifestTestKubeconform) DeepCopy added in v1.9.2

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

func (*PackageManifestTestKubeconform) DeepCopyInto added in v1.9.2

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

type TemplateContext added in v1.1.0

type TemplateContext struct {
	// Package object.
	Package TemplateContextPackage `json:"package"`
	// Configuration as presented via the (Cluster)Package API after admission.
	Config *runtime.RawExtension `json:"config,omitempty"`
	// Environment specific information.
	Environment PackageEnvironment `json:"environment"`
}

TemplateContext is available within the package templating process.

func (*TemplateContext) DeepCopy added in v1.1.0

func (in *TemplateContext) DeepCopy() *TemplateContext

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

func (*TemplateContext) DeepCopyInto added in v1.1.0

func (in *TemplateContext) DeepCopyInto(out *TemplateContext)

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

type TemplateContextObjectMeta added in v1.1.0

type TemplateContextObjectMeta struct {
	Name        string            `json:"name"`
	Namespace   string            `json:"namespace"`
	Labels      map[string]string `json:"labels"`
	Annotations map[string]string `json:"annotations"`
}

TemplateContextObjectMeta represents a simplified version of metav1.ObjectMeta for use in templates.

func (*TemplateContextObjectMeta) DeepCopy added in v1.1.0

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

func (*TemplateContextObjectMeta) DeepCopyInto added in v1.1.0

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

type TemplateContextPackage added in v1.1.0

type TemplateContextPackage struct {
	TemplateContextObjectMeta `json:"metadata"`
	// Image as presented via the (Cluster)Package API after admission.
	Image string `json:"image"`
}

TemplateContextPackage represents the (Cluster)Package object requesting this package content.

func (*TemplateContextPackage) DeepCopy added in v1.1.0

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

func (*TemplateContextPackage) DeepCopyInto added in v1.1.0

func (in *TemplateContextPackage) DeepCopyInto(out *TemplateContextPackage)

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