templates

package
v0.0.0-...-c2efb00 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 19

Documentation

Overview

Package templates contains API Schema definitions for the templates API group +k8s:deepcopy-gen=package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Anything

type Anything struct {
	Value interface{} `json:"-"`
}

Anything is a struct wrapper around a field of type `interface{}` that plays nicely with controller-gen +kubebuilder:object:generate=false +kubebuilder:validation:Type=""

func (*Anything) DeepCopy

func (in *Anything) DeepCopy() *Anything

func (*Anything) DeepCopyInto

func (in *Anything) DeepCopyInto(out *Anything)

func (*Anything) GetValue

func (in *Anything) GetValue() interface{}

func (Anything) MarshalJSON

func (in Anything) MarshalJSON() ([]byte, error)

MarshalJSON should be implemented against a value per http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go credit to K8s api machinery's RawExtension for finding this.

func (*Anything) UnmarshalJSON

func (in *Anything) UnmarshalJSON(val []byte) error

type ByPodStatus

type ByPodStatus struct {
	// a unique identifier for the pod that wrote the status
	ID                 string           `json:"id,omitempty"`
	ObservedGeneration int64            `json:"observedGeneration,omitempty"`
	Errors             []CreateCRDError `json:"errors,omitempty"`
}

ByPodStatus defines the observed state of ConstraintTemplate as seen by an individual controller.

func (*ByPodStatus) DeepCopy

func (in *ByPodStatus) DeepCopy() *ByPodStatus

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

func (*ByPodStatus) DeepCopyInto

func (in *ByPodStatus) DeepCopyInto(out *ByPodStatus)

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

type CRD

type CRD struct {
	Spec CRDSpec `json:"spec,omitempty"`
}

func (*CRD) DeepCopy

func (in *CRD) DeepCopy() *CRD

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

func (*CRD) DeepCopyInto

func (in *CRD) DeepCopyInto(out *CRD)

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

type CRDSpec

type CRDSpec struct {
	Names      Names       `json:"names,omitempty"`
	Validation *Validation `json:"validation,omitempty"`
}

func (*CRDSpec) DeepCopy

func (in *CRDSpec) DeepCopy() *CRDSpec

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

func (*CRDSpec) DeepCopyInto

func (in *CRDSpec) DeepCopyInto(out *CRDSpec)

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

type Code

type Code struct {
	// +kubebuilder:validation:Required
	// The engine used to evaluate the code. Example: "Rego". Required.
	Engine string `json:"engine,omitempty"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	// The source code for the template. Required.
	Source *Anything `json:"source,omitempty"`
}

func (*Code) DeepCopy

func (in *Code) DeepCopy() *Code

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

func (*Code) DeepCopyInto

func (in *Code) DeepCopyInto(out *Code)

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

type ConstraintTemplate

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

	Spec   ConstraintTemplateSpec   `json:"spec,omitempty"`
	Status ConstraintTemplateStatus `json:"status,omitempty"`
}

ConstraintTemplate is the Schema for the constrainttemplates API +k8s:openapi-gen=true

func (*ConstraintTemplate) DeepCopy

func (in *ConstraintTemplate) DeepCopy() *ConstraintTemplate

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

func (*ConstraintTemplate) DeepCopyInto

func (in *ConstraintTemplate) DeepCopyInto(out *ConstraintTemplate)

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

func (*ConstraintTemplate) DeepCopyObject

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

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

func (*ConstraintTemplate) SemanticEqual

func (ct *ConstraintTemplate) SemanticEqual(other *ConstraintTemplate) bool

SemanticEqual returns whether there have been changes to a constraint that the framework should know about. It can ignore most metadata as it assumes the two comparables share the same identity. Labels are compared because the labels of a constraint may impact functionality (e.g. whether a constraint is expected to be enforced by Kubernetes' Validating Admission Policy).

type ConstraintTemplateList

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

ConstraintTemplateList contains a list of ConstraintTemplate.

func (*ConstraintTemplateList) DeepCopy

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

func (*ConstraintTemplateList) DeepCopyInto

func (in *ConstraintTemplateList) DeepCopyInto(out *ConstraintTemplateList)

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

func (*ConstraintTemplateList) DeepCopyObject

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

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

type ConstraintTemplateSpec

type ConstraintTemplateSpec struct {
	CRD     CRD      `json:"crd,omitempty"`
	Targets []Target `json:"targets,omitempty"`
}

ConstraintTemplateSpec defines the desired state of ConstraintTemplate.

func (*ConstraintTemplateSpec) DeepCopy

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

func (*ConstraintTemplateSpec) DeepCopyInto

func (in *ConstraintTemplateSpec) DeepCopyInto(out *ConstraintTemplateSpec)

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

type ConstraintTemplateStatus

type ConstraintTemplateStatus struct {
	Created bool          `json:"created,omitempty"`
	ByPod   []ByPodStatus `json:"byPod,omitempty"`
}

ConstraintTemplateStatus defines the observed state of ConstraintTemplate.

func (*ConstraintTemplateStatus) DeepCopy

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

func (*ConstraintTemplateStatus) DeepCopyInto

func (in *ConstraintTemplateStatus) DeepCopyInto(out *ConstraintTemplateStatus)

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

type CreateCRDError

type CreateCRDError struct {
	Code     string `json:"code"`
	Message  string `json:"message"`
	Location string `json:"location,omitempty"`
}

CreateCRDError represents a single error caught during parsing, compiling, etc.

func (*CreateCRDError) DeepCopy

func (in *CreateCRDError) DeepCopy() *CreateCRDError

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

func (*CreateCRDError) DeepCopyInto

func (in *CreateCRDError) DeepCopyInto(out *CreateCRDError)

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

type Names

type Names struct {
	Kind       string   `json:"kind,omitempty"`
	ShortNames []string `json:"shortNames,omitempty"`
}

func (*Names) DeepCopy

func (in *Names) DeepCopy() *Names

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

func (*Names) DeepCopyInto

func (in *Names) DeepCopyInto(out *Names)

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

type Target

type Target struct {
	Target string   `json:"target,omitempty"`
	Rego   string   `json:"rego,omitempty"`
	Libs   []string `json:"libs,omitempty"`
	// The source code options for the constraint template, only one of this
	// or "rego" can be specified.
	Code []Code `json:"code,omitempty"`
}

func (*Target) DeepCopy

func (in *Target) DeepCopy() *Target

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

func (*Target) DeepCopyInto

func (in *Target) DeepCopyInto(out *Target)

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

type Validation

type Validation struct {
	// +kubebuilder:validation:Schemaless
	OpenAPIV3Schema *apiextensions.JSONSchemaProps `json:"openAPIV3Schema,omitempty"`
	LegacySchema    *bool                          `json:"legacySchema,omitempty"`
}

func (*Validation) DeepCopy

func (in *Validation) DeepCopy() *Validation

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

func (*Validation) DeepCopyInto

func (in *Validation) DeepCopyInto(out *Validation)

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