v1

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true +groupName=eno.azure.io

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeGroupVersion = schema.GroupVersion{Group: "eno.azure.io", Version: "v1"}
	SchemeBuilder      = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)

Functions

This section is empty.

Types

type Binding added in v0.0.2

type Binding struct {
	// +required
	Key string `json:"key"`
	// +required
	Resource ResourceBinding `json:"resource"`
}

func (*Binding) DeepCopy added in v0.0.2

func (in *Binding) DeepCopy() *Binding

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

func (*Binding) DeepCopyInto added in v0.0.2

func (in *Binding) DeepCopyInto(out *Binding)

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

type Composition

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

	Spec   CompositionSpec   `json:"spec,omitempty"`
	Status CompositionStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status

func (*Composition) DeepCopy

func (in *Composition) DeepCopy() *Composition

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

func (*Composition) DeepCopyInto

func (in *Composition) DeepCopyInto(out *Composition)

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

func (*Composition) DeepCopyObject

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

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

type CompositionList

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

+kubebuilder:object:root=true

func (*CompositionList) DeepCopy

func (in *CompositionList) DeepCopy() *CompositionList

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

func (*CompositionList) DeepCopyInto

func (in *CompositionList) DeepCopyInto(out *CompositionList)

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

func (*CompositionList) DeepCopyObject

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

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

type CompositionSpec

type CompositionSpec struct {
	// Compositions are synthesized by a Synthesizer.
	Synthesizer SynthesizerRef `json:"synthesizer,omitempty"`

	// Synthesized resources can optionally be reconciled at a given interval.
	// Per-resource jitter will be applied to avoid spikes in request rate.
	ReconcileInterval *metav1.Duration `json:"reconcileInterval,omitempty"`

	// Binds the schema defined in a Synthesizer spec to specific resources.
	Bindings []Binding `json:"bindings,omitempty"`
}

func (*CompositionSpec) DeepCopy

func (in *CompositionSpec) DeepCopy() *CompositionSpec

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

func (*CompositionSpec) DeepCopyInto

func (in *CompositionSpec) DeepCopyInto(out *CompositionSpec)

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

type CompositionStatus

type CompositionStatus struct {
	CurrentSynthesis  *Synthesis `json:"currentSynthesis,omitempty"`
	PreviousSynthesis *Synthesis `json:"previousSynthesis,omitempty"`
}

func (*CompositionStatus) DeepCopy

func (in *CompositionStatus) DeepCopy() *CompositionStatus

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

func (*CompositionStatus) DeepCopyInto

func (in *CompositionStatus) DeepCopyInto(out *CompositionStatus)

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

type Input added in v0.0.2

type Input struct {
	metav1.TypeMeta `json:",inline"`
	// +required
	Key string `json:"key"`
	// +required
	Resource InputResource `json:"resource"`
}

Input is passed to Synthesis Pods at runtime and represents a bound ref.

func NewInput added in v0.0.2

func NewInput(key string, res InputResource) Input

NewInput is used to create an `Input` with TypeMeta populated. This is required because `Input` is not a CRD, but we still want proper encoding/decoding via the Unstructured codec.

func (*Input) DeepCopy added in v0.0.2

func (in *Input) DeepCopy() *Input

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

func (*Input) DeepCopyInto added in v0.0.2

func (in *Input) DeepCopyInto(out *Input)

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

type InputResource added in v0.0.2

type InputResource struct {
	// +required
	Name      string `json:"name"`
	Namespace string `json:"namespace,omitempty"`
	// +required
	Kind  string `json:"kind"`
	Group string `json:"group"`
}

func (*InputResource) DeepCopy added in v0.0.2

func (in *InputResource) DeepCopy() *InputResource

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

func (*InputResource) DeepCopyInto added in v0.0.2

func (in *InputResource) DeepCopyInto(out *InputResource)

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

type Manifest

type Manifest struct {
	// +required
	Manifest string `json:"manifest,omitempty"`

	// Deleted is true when this manifest represents a "tombstone" - a resource that should no longer exist.
	Deleted bool `json:"deleted,omitempty"`

	ReconcileInterval *metav1.Duration `json:"reconcileInterval,omitempty"`
}

func (*Manifest) DeepCopy

func (in *Manifest) DeepCopy() *Manifest

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

func (*Manifest) DeepCopyInto

func (in *Manifest) DeepCopyInto(out *Manifest)

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

type Ref added in v0.0.2

type Ref struct {
	// +required
	Key string `json:"key"`
	// +required
	Resource ResourceRef `json:"resource"`
	// Allows control over re-synthesis when inputs changed.
	// A non-deferred input will trigger a synthesis immediately, whereas a
	// deferred input will respect the cooldown period.
	Defer bool `json:"defer,omitempty"`
}

func (*Ref) DeepCopy added in v0.0.2

func (in *Ref) DeepCopy() *Ref

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

func (*Ref) DeepCopyInto added in v0.0.2

func (in *Ref) DeepCopyInto(out *Ref)

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

type ResourceBinding added in v0.0.2

type ResourceBinding struct {
	// +required
	Name      string `json:"name"`
	Namespace string `json:"namespace,omitempty"`
}

func (*ResourceBinding) DeepCopy added in v0.0.2

func (in *ResourceBinding) DeepCopy() *ResourceBinding

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

func (*ResourceBinding) DeepCopyInto added in v0.0.2

func (in *ResourceBinding) DeepCopyInto(out *ResourceBinding)

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

type ResourceRef added in v0.0.2

type ResourceRef struct {
	// +required
	Kind  string `json:"kind"`
	Group string `json:"group,omitempty"`
}

func (*ResourceRef) DeepCopy added in v0.0.2

func (in *ResourceRef) DeepCopy() *ResourceRef

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

func (*ResourceRef) DeepCopyInto added in v0.0.2

func (in *ResourceRef) DeepCopyInto(out *ResourceRef)

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

type ResourceSlice

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

	Spec   ResourceSliceSpec   `json:"spec,omitempty"`
	Status ResourceSliceStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status

func (*ResourceSlice) DeepCopy

func (in *ResourceSlice) DeepCopy() *ResourceSlice

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

func (*ResourceSlice) DeepCopyInto

func (in *ResourceSlice) DeepCopyInto(out *ResourceSlice)

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

func (*ResourceSlice) DeepCopyObject

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

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

type ResourceSliceList

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

+kubebuilder:object:root=true

func (*ResourceSliceList) DeepCopy

func (in *ResourceSliceList) DeepCopy() *ResourceSliceList

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

func (*ResourceSliceList) DeepCopyInto

func (in *ResourceSliceList) DeepCopyInto(out *ResourceSliceList)

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

func (*ResourceSliceList) DeepCopyObject

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

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

type ResourceSliceRef

type ResourceSliceRef struct {
	Name string `json:"name,omitempty"`
}

func (*ResourceSliceRef) DeepCopy

func (in *ResourceSliceRef) DeepCopy() *ResourceSliceRef

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

func (*ResourceSliceRef) DeepCopyInto

func (in *ResourceSliceRef) DeepCopyInto(out *ResourceSliceRef)

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

type ResourceSliceSpec

type ResourceSliceSpec struct {
	CompositionGeneration int64      `json:"compositionGeneration,omitempty"`
	Resources             []Manifest `json:"resources,omitempty"`
}

func (*ResourceSliceSpec) DeepCopy

func (in *ResourceSliceSpec) DeepCopy() *ResourceSliceSpec

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

func (*ResourceSliceSpec) DeepCopyInto

func (in *ResourceSliceSpec) DeepCopyInto(out *ResourceSliceSpec)

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

type ResourceSliceStatus

type ResourceSliceStatus struct {
	// Elements of resources correspond in index to those in spec.resources at the observed generation.
	Resources []ResourceState `json:"resources,omitempty"`
}

func (*ResourceSliceStatus) DeepCopy

func (in *ResourceSliceStatus) DeepCopy() *ResourceSliceStatus

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

func (*ResourceSliceStatus) DeepCopyInto

func (in *ResourceSliceStatus) DeepCopyInto(out *ResourceSliceStatus)

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

type ResourceState

type ResourceState struct {
	Reconciled bool         `json:"reconciled,omitempty"`
	Ready      *metav1.Time `json:"ready,omitempty"`
	Deleted    bool         `json:"deleted,omitempty"`
}

func (*ResourceState) DeepCopy

func (in *ResourceState) DeepCopy() *ResourceState

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

func (*ResourceState) DeepCopyInto

func (in *ResourceState) DeepCopyInto(out *ResourceState)

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

type Synthesis

type Synthesis struct {
	UUID                          string `json:"uuid,omitempty"`
	ObservedCompositionGeneration int64  `json:"observedCompositionGeneration,omitempty"`
	ObservedSynthesizerGeneration int64  `json:"observedSynthesizerGeneration,omitempty"`

	PodCreation *metav1.Time `json:"podCreation,omitempty"`
	Synthesized *metav1.Time `json:"synthesized,omitempty"`
	Reconciled  *metav1.Time `json:"reconciled,omitempty"`
	Ready       *metav1.Time `json:"ready,omitempty"`
	Attempts    int          `json:"attempts,omitempty"`

	ResourceSlices []*ResourceSliceRef `json:"resourceSlices,omitempty"`
}

Synthesis represents a Synthesizer's specific synthesis of a given Composition.

func (*Synthesis) DeepCopy

func (in *Synthesis) DeepCopy() *Synthesis

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

func (*Synthesis) DeepCopyInto

func (in *Synthesis) DeepCopyInto(out *Synthesis)

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

type Synthesizer

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

	Spec   SynthesizerSpec   `json:"spec,omitempty"`
	Status SynthesizerStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster

func (*Synthesizer) DeepCopy

func (in *Synthesizer) DeepCopy() *Synthesizer

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

func (*Synthesizer) DeepCopyInto

func (in *Synthesizer) DeepCopyInto(out *Synthesizer)

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

func (*Synthesizer) DeepCopyObject

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

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

type SynthesizerList

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

+kubebuilder:object:root=true

func (*SynthesizerList) DeepCopy

func (in *SynthesizerList) DeepCopy() *SynthesizerList

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

func (*SynthesizerList) DeepCopyInto

func (in *SynthesizerList) DeepCopyInto(out *SynthesizerList)

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

func (*SynthesizerList) DeepCopyObject

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

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

type SynthesizerRef

type SynthesizerRef struct {
	// +required
	Name string `json:"name,omitempty"`

	// Compositions will be resynthesized if their status.currentState.observedSynthesizerGeneration is < the referenced synthesizer's generation.
	// Used to slowly roll out synthesizer updates across compositions.
	MinGeneration int64 `json:"minGeneration,omitempty"`
}

func (*SynthesizerRef) DeepCopy

func (in *SynthesizerRef) DeepCopy() *SynthesizerRef

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

func (*SynthesizerRef) DeepCopyInto

func (in *SynthesizerRef) DeepCopyInto(out *SynthesizerRef)

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

type SynthesizerSpec

type SynthesizerSpec struct {
	// +required
	Image string `json:"image,omitempty"`

	// +kubebuilder:default={"synthesize"}
	Command []string `json:"command,omitempty"`

	// Timeout for each execution of the synthesizer command.
	//
	// +kubebuilder:default="10s"
	ExecTimeout *metav1.Duration `json:"execTimeout,omitempty"`

	// Pods are recreated after they've existed for at least the pod timeout interval.
	// This helps close the loop in failure modes where a pod may be considered ready but not actually able to run.
	//
	// +kubebuilder:default="2m"
	PodTimeout *metav1.Duration `json:"podTimeout,omitempty"`

	// Any changes to the synthesizer will be propagated to compositions that reference it.
	// This property controls how long Eno will wait between each composition update.
	//
	// +kubebuilder:default="30s"
	RolloutCooldown *metav1.Duration `json:"rolloutCooldown,omitempty"`

	// Refs define the Synthesizer's input schema without binding it to specific
	// resources.
	Refs []Ref `json:"refs,omitempty"`
}

+kubebuilder:validation:XValidation:rule="duration(self.execTimeout) <= duration(self.podTimeout)",message="podTimeout must be greater than execTimeout"

func (*SynthesizerSpec) DeepCopy

func (in *SynthesizerSpec) DeepCopy() *SynthesizerSpec

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

func (*SynthesizerSpec) DeepCopyInto

func (in *SynthesizerSpec) DeepCopyInto(out *SynthesizerSpec)

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

type SynthesizerStatus

type SynthesizerStatus struct {
	// The metadata.generation of this resource at the oldest version currently used by any Generations.
	// This will equal the current generation when slow rollout of an update to the Generations is complete.
	CurrentGeneration int64 `json:"currentGeneration,omitempty"`

	// LastRolloutTime is the timestamp of the last pod creation caused by a change to this resource.
	// Should not be updated due to Composotion changes.
	// Used to calculate rollout cooldown period.
	LastRolloutTime *metav1.Time `json:"lastRolloutTime,omitempty"`
}

func (*SynthesizerStatus) DeepCopy

func (in *SynthesizerStatus) DeepCopy() *SynthesizerStatus

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

func (*SynthesizerStatus) DeepCopyInto

func (in *SynthesizerStatus) DeepCopyInto(out *SynthesizerStatus)

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