unversioned

package
v3.9.9 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package unversioned contains the internal representation of mutator objects

Index

Constants

View Source
const (
	// ObjNamespace => metadata.namespace.
	ObjNamespace = Field("namespace")

	// ObjName => metadata.name.
	ObjName = Field("name")
)

Variables

View Source
var (
	ErrExternalDataFeatureFlag = errors.New("external data feature flag is not enabled")
	ErrExternalDataNoDefault   = errors.New("`default` must not be empty when `failurePolicy` is set to `UseDefault`")
)
View Source
var (
	ErrInvalidAssignField  = errors.New("invalid assign field")
	ErrInvalidFromMetadata = errors.New("invalid fromMetadata field")
)

Functions

func DeepCopyWithPlaceholders

func DeepCopyWithPlaceholders(u *unstructured.Unstructured) *unstructured.Unstructured

DeepCopyWithPlaceholders returns a deep copy of the object.

Types

type Assign

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

	Spec   AssignSpec   `json:"spec,omitempty"`
	Status AssignStatus `json:"status,omitempty"`
}

Assign is the Schema for the assign API.

func (*Assign) DeepCopy

func (in *Assign) DeepCopy() *Assign

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

func (*Assign) DeepCopyInto

func (in *Assign) DeepCopyInto(out *Assign)

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

func (*Assign) DeepCopyObject

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

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

type AssignField

type AssignField struct {
	// Value is a constant value that will be assigned to `location`
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:validation:XPreserveUnknownFields
	Value *types.Anything `json:"value,omitempty"`

	// FromMetadata assigns a value from the specified metadata field.
	FromMetadata *FromMetadata `json:"fromMetadata,omitempty"`

	// ExternalData describes the external data provider to be used for mutation.
	ExternalData *ExternalData `json:"externalData,omitempty"`
}

func (*AssignField) DeepCopy

func (in *AssignField) DeepCopy() *AssignField

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

func (*AssignField) DeepCopyInto

func (in *AssignField) DeepCopyInto(out *AssignField)

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

func (*AssignField) GetValue

func (a *AssignField) GetValue(mutable *types.Mutable) (interface{}, error)

func (*AssignField) Validate

func (a *AssignField) Validate() error

type AssignList

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

AssignList contains a list of Assign.

func (*AssignList) DeepCopy

func (in *AssignList) DeepCopy() *AssignList

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

func (*AssignList) DeepCopyInto

func (in *AssignList) DeepCopyInto(out *AssignList)

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

func (*AssignList) DeepCopyObject

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

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

type AssignMetadata

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

	Spec   AssignMetadataSpec   `json:"spec,omitempty"`
	Status AssignMetadataStatus `json:"status,omitempty"`
}

AssignMetadata is the Schema for the assignmetadata API.

func (*AssignMetadata) DeepCopy

func (in *AssignMetadata) DeepCopy() *AssignMetadata

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

func (*AssignMetadata) DeepCopyInto

func (in *AssignMetadata) DeepCopyInto(out *AssignMetadata)

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

func (*AssignMetadata) DeepCopyObject

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

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

type AssignMetadataList

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

AssignMetadataList contains a list of AssignMetadata.

func (*AssignMetadataList) DeepCopy

func (in *AssignMetadataList) DeepCopy() *AssignMetadataList

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

func (*AssignMetadataList) DeepCopyInto

func (in *AssignMetadataList) DeepCopyInto(out *AssignMetadataList)

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

func (*AssignMetadataList) DeepCopyObject

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

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

type AssignMetadataSpec

type AssignMetadataSpec struct {
	Match      match.Match        `json:"match,omitempty"`
	Location   string             `json:"location,omitempty"`
	Parameters MetadataParameters `json:"parameters,omitempty"`
}

AssignMetadataSpec defines the desired state of AssignMetadata.

func (*AssignMetadataSpec) DeepCopy

func (in *AssignMetadataSpec) DeepCopy() *AssignMetadataSpec

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

func (*AssignMetadataSpec) DeepCopyInto

func (in *AssignMetadataSpec) DeepCopyInto(out *AssignMetadataSpec)

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

type AssignMetadataStatus

type AssignMetadataStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	ByPod []v1beta1.MutatorPodStatusStatus `json:"byPod,omitempty"`
}

AssignMetadataStatus defines the observed state of AssignMetadata.

func (*AssignMetadataStatus) DeepCopy

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

func (*AssignMetadataStatus) DeepCopyInto

func (in *AssignMetadataStatus) DeepCopyInto(out *AssignMetadataStatus)

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

type AssignSpec

type AssignSpec struct {

	// ApplyTo lists the specific groups, versions and kinds a mutation will be applied to.
	// This is necessary because every mutation implies part of an object schema and object
	// schemas are associated with specific GVKs.
	ApplyTo []match.ApplyTo `json:"applyTo,omitempty"`

	// Match allows the user to limit which resources get mutated.
	// Individual match criteria are AND-ed together. An undefined
	// match criteria matches everything.
	Match match.Match `json:"match,omitempty"`

	// Location describes the path to be mutated, for example: `spec.containers[name: main]`.
	Location string `json:"location,omitempty"`

	// Parameters define the behavior of the mutator.
	Parameters Parameters `json:"parameters,omitempty"`
}

AssignSpec defines the desired state of Assign.

func (*AssignSpec) DeepCopy

func (in *AssignSpec) DeepCopy() *AssignSpec

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

func (*AssignSpec) DeepCopyInto

func (in *AssignSpec) DeepCopyInto(out *AssignSpec)

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

type AssignStatus

type AssignStatus struct {
	ByPod []v1beta1.MutatorPodStatusStatus `json:"byPod,omitempty"`
}

AssignStatus defines the observed state of Assign.

func (*AssignStatus) DeepCopy

func (in *AssignStatus) DeepCopy() *AssignStatus

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

func (*AssignStatus) DeepCopyInto

func (in *AssignStatus) DeepCopyInto(out *AssignStatus)

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

type ExternalData

type ExternalData struct {
	// Provider is the name of the external data provider.
	// +kubebuilder:validation:Required
	Provider string `json:"provider,omitempty"`

	// DataSource specifies where to extract the data that will be sent
	// to the external data provider as parameters.
	// +kubebuilder:default="ValueAtLocation"
	DataSource types.ExternalDataSource `json:"dataSource,omitempty"`

	// FailurePolicy specifies the policy to apply when the external data
	// provider returns an error.
	// +kubebuilder:default="Fail"
	FailurePolicy types.ExternalDataFailurePolicy `json:"failurePolicy,omitempty"`

	// Default specifies the default value to use when the external data
	// provider returns an error and the failure policy is set to "UseDefault".
	Default string `json:"default,omitempty"`
}

ExternalData describes the external data source to use for the mutation.

func (*ExternalData) DeepCopy

func (in *ExternalData) DeepCopy() *ExternalData

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

func (*ExternalData) DeepCopyInto

func (in *ExternalData) DeepCopyInto(out *ExternalData)

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

func (*ExternalData) GetPlaceholder

func (e *ExternalData) GetPlaceholder() *ExternalDataPlaceholder

GetPlaceholder returns the placeholder for the given external data provider.

func (*ExternalData) Validate

func (e *ExternalData) Validate() error

Validate validates the external data configuration.

type ExternalDataPlaceholder

type ExternalDataPlaceholder struct {
	// Ref is the reference to the external data object.
	Ref *ExternalData

	// ValueAtLocation is the current value of the field that will
	// eventually be resolved by an external data provider.
	ValueAtLocation string
}

ExternalDataPlaceholder contains a placeholder value for a field that will eventually be resolved by an external data provider.

func (*ExternalDataPlaceholder) DeepCopy

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

func (*ExternalDataPlaceholder) DeepCopyInto

func (in *ExternalDataPlaceholder) DeepCopyInto(out *ExternalDataPlaceholder)

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

type Field

type Field string

type FromMetadata

type FromMetadata struct {
	// Field specifies which metadata field provides the assigned value. Valid fields are `namespace` and `name`.
	Field Field `json:"field,omitempty"`
}

func (*FromMetadata) DeepCopy

func (in *FromMetadata) DeepCopy() *FromMetadata

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

func (*FromMetadata) DeepCopyInto

func (in *FromMetadata) DeepCopyInto(out *FromMetadata)

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

func (*FromMetadata) GetValue

func (fm *FromMetadata) GetValue(obj types.MetadataGetter) (string, error)

func (*FromMetadata) Validate

func (fm *FromMetadata) Validate() error

type MetadataParameters

type MetadataParameters struct {
	// Assign.value holds the value to be assigned
	Assign AssignField `json:"assign,omitempty"`
}

func (*MetadataParameters) DeepCopy

func (in *MetadataParameters) DeepCopy() *MetadataParameters

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

func (*MetadataParameters) DeepCopyInto

func (in *MetadataParameters) DeepCopyInto(out *MetadataParameters)

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

type ModifySet

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

	Spec   ModifySetSpec   `json:"spec,omitempty"`
	Status ModifySetStatus `json:"status,omitempty"`
}

ModifySet allows the user to modify non-keyed lists, such as the list of arguments to a container.

func (*ModifySet) DeepCopy

func (in *ModifySet) DeepCopy() *ModifySet

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

func (*ModifySet) DeepCopyInto

func (in *ModifySet) DeepCopyInto(out *ModifySet)

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

func (*ModifySet) DeepCopyObject

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

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

type ModifySetList

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

ModifySetList contains a list of ModifySet.

func (*ModifySetList) DeepCopy

func (in *ModifySetList) DeepCopy() *ModifySetList

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

func (*ModifySetList) DeepCopyInto

func (in *ModifySetList) DeepCopyInto(out *ModifySetList)

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

func (*ModifySetList) DeepCopyObject

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

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

type ModifySetParameters

type ModifySetParameters struct {
	// PathTests are a series of existence tests that can be checked
	// before a mutation is applied
	PathTests []PathTest `json:"pathTests,omitempty"`

	// Operation describes whether values should be merged in ("merge"), or pruned ("prune"). Default value is "merge"
	// +kubebuilder:validation:Enum=merge;prune
	// +kubebuilder:default=merge
	Operation Operation `json:"operation,omitempty"`

	// Values describes the values provided to the operation as `values.fromList`.
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:validation:Type=object
	// +kubebuilder:validation:XPreserveUnknownFields
	Values Values `json:"values,omitempty"`
}

func (*ModifySetParameters) DeepCopy

func (in *ModifySetParameters) DeepCopy() *ModifySetParameters

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

func (*ModifySetParameters) DeepCopyInto

func (in *ModifySetParameters) DeepCopyInto(out *ModifySetParameters)

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

type ModifySetSpec

type ModifySetSpec struct {

	// ApplyTo lists the specific groups, versions and kinds a mutation will be applied to.
	// This is necessary because every mutation implies part of an object schema and object
	// schemas are associated with specific GVKs.
	ApplyTo []match.ApplyTo `json:"applyTo,omitempty"`

	// Match allows the user to limit which resources get mutated.
	// Individual match criteria are AND-ed together. An undefined
	// match criteria matches everything.
	Match match.Match `json:"match,omitempty"`

	// Location describes the path to be mutated, for example: `spec.containers[name: main].args`.
	Location string `json:"location,omitempty"`

	// Parameters define the behavior of the mutator.
	Parameters ModifySetParameters `json:"parameters,omitempty"`
}

ModifySetSpec defines the desired state of ModifySet.

func (*ModifySetSpec) DeepCopy

func (in *ModifySetSpec) DeepCopy() *ModifySetSpec

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

func (*ModifySetSpec) DeepCopyInto

func (in *ModifySetSpec) DeepCopyInto(out *ModifySetSpec)

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

type ModifySetStatus

type ModifySetStatus struct {
	ByPod []v1beta1.MutatorPodStatusStatus `json:"byPod,omitempty"`
}

ModifySetStatus defines the observed state of ModifySet.

func (*ModifySetStatus) DeepCopy

func (in *ModifySetStatus) DeepCopy() *ModifySetStatus

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

func (*ModifySetStatus) DeepCopyInto

func (in *ModifySetStatus) DeepCopyInto(out *ModifySetStatus)

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

type Operation

type Operation string
const (
	// MergeOp means that the provided values should be merged with the existing values.
	MergeOp Operation = "merge"

	// PruneOp means that the provided values should be removed from the existing values.
	PruneOp Operation = "prune"
)

type Parameters

type Parameters struct {
	PathTests []PathTest `json:"pathTests,omitempty"`

	// Assign.value holds the value to be assigned
	Assign AssignField `json:"assign,omitempty"`
}

func (*Parameters) DeepCopy

func (in *Parameters) DeepCopy() *Parameters

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

func (*Parameters) DeepCopyInto

func (in *Parameters) DeepCopyInto(out *Parameters)

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

type PathTest

type PathTest struct {
	SubPath   string           `json:"subPath,omitempty"`
	Condition tester.Condition `json:"condition,omitempty"`
}

PathTest allows the user to customize how the mutation works if parent paths are missing. It traverses the list in order. All sub paths are tested against the provided condition, if the test fails, the mutation is not applied. All `subPath` entries must be a prefix of `location`. Any glob characters will take on the same value as was used to expand the matching glob in `location`.

Available Tests: * MustExist - the path must exist or do not mutate * MustNotExist - the path must not exist or do not mutate.

func (*PathTest) DeepCopy

func (in *PathTest) DeepCopy() *PathTest

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

func (*PathTest) DeepCopyInto

func (in *PathTest) DeepCopyInto(out *PathTest)

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

type Values

type Values struct {
	FromList []interface{} `json:"fromList,omitempty"`
}

Values describes the values provided to the operation. +kubebuilder:object:generate=false

func (*Values) DeepCopy

func (in *Values) DeepCopy() *Values

func (*Values) DeepCopyInto

func (in *Values) DeepCopyInto(out *Values)

Jump to

Keyboard shortcuts

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