v1alpha1

package
v0.0.5-alpha Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the constraint v1alpha1 API group +kubebuilder:object:generate=true +groupName=constraint.ciena.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "constraint.ciena.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

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

nolint:gochecknoglobals

Functions

This section is empty.

Types

type ConstraintPolicy

type ConstraintPolicy struct {
	// nolint:tagliatelle
	metav1.TypeMeta `json:",inline"`
	// nolint:tagliatelle
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ConstraintPolicySpec   `json:"spec,omitempty"`
	Status ConstraintPolicyStatus `json:"status,omitempty"`
}

ConstraintPolicy is the Schema for the constraintpolicies API.

func (*ConstraintPolicy) DeepCopy

func (in *ConstraintPolicy) DeepCopy() *ConstraintPolicy

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

func (*ConstraintPolicy) DeepCopyInto

func (in *ConstraintPolicy) DeepCopyInto(out *ConstraintPolicy)

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

func (*ConstraintPolicy) DeepCopyObject

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

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

type ConstraintPolicyBinding

type ConstraintPolicyBinding struct {
	// nolint:tagliatelle
	metav1.TypeMeta `json:",inline"`
	// nolint:tagliatelle
	metav1.ObjectMeta `json:"metadata,omitempty"`

	//+kubernetes:validation:Required
	Spec   ConstraintPolicyBindingSpec   `json:"spec,omitempty"`
	Status ConstraintPolicyBindingStatus `json:"status,omitempty"`
}

ConstraintPolicyBinding is the Schema for the constraintpolicybindings API. +genclient.

func (*ConstraintPolicyBinding) DeepCopy

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

func (*ConstraintPolicyBinding) DeepCopyInto

func (in *ConstraintPolicyBinding) DeepCopyInto(out *ConstraintPolicyBinding)

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

func (*ConstraintPolicyBinding) DeepCopyObject

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

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

type ConstraintPolicyBindingList

type ConstraintPolicyBindingList struct {
	// nolint:tagliatelle
	metav1.TypeMeta `json:",inline"`
	// nolint:tagliatelle
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []*ConstraintPolicyBinding `json:"items"`
}

ConstraintPolicyBindingList contains a list of ConstraintPolicyBinding.

func (*ConstraintPolicyBindingList) DeepCopy

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

func (*ConstraintPolicyBindingList) DeepCopyInto

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

func (*ConstraintPolicyBindingList) DeepCopyObject

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

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

type ConstraintPolicyBindingSpec

type ConstraintPolicyBindingSpec struct {

	// Targets the list of targets for the binding
	//+kubernetes:validate:Required
	Targets map[string]types.Reference `json:"targets"`

	// Offer references the offer from which this binding is created in a
	// cluster/namespace/mame form.
	//+kubernetes:validate:Required
	//+kubebuilder:validation:Pattern:=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
	Offer string `json:"offer"`
}

ConstraintPolicyBindingSpec defines the desired state of ConstraintPolicyBinding.

func (*ConstraintPolicyBindingSpec) DeepCopy

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

func (*ConstraintPolicyBindingSpec) DeepCopyInto

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

type ConstraintPolicyBindingStatus

type ConstraintPolicyBindingStatus struct {

	//+kubebuilder:validate:Required
	//+kubebuilder:validation:Enum=Error;Pending;Compliant;Limit;Violation
	Compliance string `json:"compliance"`

	//+optional
	FirstReason string `json:"firstReason"`

	//+optional
	Details []*ConstraintPolicyBindingStatusDetail `json:"details"`

	//+optional
	//+nullable
	LastComplianceChangeTimestamp metav1.Time `json:"lastComplianceChangeTimestamp,omitempty"`

	//+optional
	//+nullable
	LastMitigatedTimestamp metav1.Time `json:"lastMitigatedTimestamp,omitempty"`
}

ConstraintPolicyBindingStatus defines the observed state of ConstraintPolicyBinding.

func (*ConstraintPolicyBindingStatus) DeepCopy

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

func (*ConstraintPolicyBindingStatus) DeepCopyInto

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

type ConstraintPolicyBindingStatusDetail

type ConstraintPolicyBindingStatusDetail struct {
	//+kubernetes:validate:Required
	//+kubebuilder:validation:Pattern:=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
	Policy string `json:"policy"`

	//+kubebuilder:validate:Required
	//+kubebuilder:validation:Enum=Error;Pending;Compliant;Limit;Violation
	Compliance string `json:"compliance"`

	//+optional
	//+nullable
	Reason string `json:"reason"`

	RuleDetails []*ConstraintPolicyBindingStatusRuleDetail `json:"ruleDetails"`
}

ConstraintPolicyBindingStatusDetail contains the summary compliance status of a binding as well as the detail from which it is summarized.

func (*ConstraintPolicyBindingStatusDetail) DeepCopy

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

func (*ConstraintPolicyBindingStatusDetail) DeepCopyInto

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

type ConstraintPolicyBindingStatusRuleDetail

type ConstraintPolicyBindingStatusRuleDetail struct {
	//+kubernetes:validate:Required
	//+kubebuilder:validation:Pattern:=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
	Rule string `json:"rule"`

	//+kubebuilder:validate:Required
	//+kubebuilder:validation:Enum=Error;Pending;Compliant;Limit;Violation
	Compliance string `json:"compliance"`

	//+optional
	//+nullable
	Reason string `json:"reason"`
}

ConstraintPolicyBindingStatusRuleDetail contains the compliance information for a given rule.

func (*ConstraintPolicyBindingStatusRuleDetail) DeepCopy

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

func (*ConstraintPolicyBindingStatusRuleDetail) DeepCopyInto

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

type ConstraintPolicyList

type ConstraintPolicyList struct {
	// nolint:tagliatelle
	metav1.TypeMeta `json:",inline"`
	// nolint:tagliatelle
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ConstraintPolicy `json:"items"`
}

ConstraintPolicyList contains a list of ConstraintPolicy.

func (*ConstraintPolicyList) DeepCopy

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

func (*ConstraintPolicyList) DeepCopyInto

func (in *ConstraintPolicyList) DeepCopyInto(out *ConstraintPolicyList)

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

func (*ConstraintPolicyList) DeepCopyObject

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

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

type ConstraintPolicyOffer

type ConstraintPolicyOffer struct {
	// nolint:tagliatelle
	metav1.TypeMeta `json:",inline"`
	// nolint:tagliatelle
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ConstraintPolicyOfferSpec   `json:"spec,omitempty"`
	Status ConstraintPolicyOfferStatus `json:"status,omitempty"`
}

ConstraintPolicyOffer is the Schema for the constraintpolicyoffers API. +genclient.

func (*ConstraintPolicyOffer) DeepCopy

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

func (*ConstraintPolicyOffer) DeepCopyInto

func (in *ConstraintPolicyOffer) DeepCopyInto(out *ConstraintPolicyOffer)

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

func (*ConstraintPolicyOffer) DeepCopyObject

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

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

type ConstraintPolicyOfferList

type ConstraintPolicyOfferList struct {
	// nolint:tagliatelle
	metav1.TypeMeta `json:",inline"`
	// nolint:tagliatelle
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []*ConstraintPolicyOffer `json:"items"`
}

ConstraintPolicyOfferList contains a list of ConstraintPolicyOffer.

func (*ConstraintPolicyOfferList) DeepCopy

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

func (*ConstraintPolicyOfferList) DeepCopyInto

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

func (*ConstraintPolicyOfferList) DeepCopyObject

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

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

type ConstraintPolicyOfferSpec

type ConstraintPolicyOfferSpec struct {

	// Targets list of targets to be included in the offer.
	//+kubebuilder:validation:Required
	Targets []*ConstraintPolicyOfferTarget `json:"targets"`

	// Policies list of policies included in the offer.
	//+kubebuilder:validation:Required
	Policies []Policy `json:"policies"`

	// Period defines how often the policies included in the offer should be
	// evaluated.
	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Pattern:=`^([0-9]+\.)?[0-9]+(h|m|s|us|µs|ms|ns)+$`
	Period string `json:"period"`

	// Garce defines how long a policy must be out of range before the policy
	// is considered in violation.
	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Pattern:=`^([0-9]+\.)?[0-9]+(h|m|s|us|µs|ms|ns)+$`
	Grace string `json:"grace"`

	// ViolationPolicy defines the action that should be taken when a policy
	// is in violation.
	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Enum=Ignore;Mediate;Evict
	ViolationPolicy string `json:"violationPolicy"`
}

ConstraintPolicyOfferSpec defines the desired state of ConstraintPolicyOffer.

func (*ConstraintPolicyOfferSpec) DeepCopy

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

func (*ConstraintPolicyOfferSpec) DeepCopyInto

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

type ConstraintPolicyOfferStatus

type ConstraintPolicyOfferStatus struct {

	// BindingCount summary of how many bindings were created from this offer.
	BindingCount int `json:"bindingCount"`

	// CompliantBindingCount summary of how many of the bindings are currently
	// compliant.
	CompliantBindingCount int `json:"compliantBindingCount"`

	// BindingSelector label used to locate (reference) the bindings created
	// by this offer.
	BindingSelector string `json:"bindingSelector"`
}

ConstraintPolicyOfferStatus defines the observed state of ConstraintPolicyOffer.

func (*ConstraintPolicyOfferStatus) DeepCopy

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

func (*ConstraintPolicyOfferStatus) DeepCopyInto

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

type ConstraintPolicyOfferTarget

type ConstraintPolicyOfferTarget struct {

	// Name defines the optional name for the target specification/
	//+optional
	Name string `json:"name"`

	// ApiVersion used to help identify the Kubernetes resource type
	// to select.
	//+optional
	APIVersion string `json:"apiVersion"`

	// Kind use to help identify the Kubernetes resource type to select.
	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Enum=Pod;Cluster;Endpoint;NetworkService
	Kind string `json:"kind"`

	// Mode hint used when selecting more abstract concepts such as a
	// network chain to help identify which element of the abstract
	// should be used for reference.
	//+optional
	//+kubebuilder:validation:Required
	//+kubebuilder:validation:Enum=Start;End
	Mode string `json:"mode"`

	// LabelSelector is used to select the Kubernetes resources to
	// include as part of the target.
	//+optional
	LabelSelector *metav1.LabelSelector `json:"labelSelector"`
}

ConstraintPolicyOfferTarget identifies a target of a policy offer.

func (*ConstraintPolicyOfferTarget) DeepCopy

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

func (*ConstraintPolicyOfferTarget) DeepCopyInto

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

type ConstraintPolicyRule

type ConstraintPolicyRule struct {
	//+kubebuilder:validation:Required
	Name string `json:"name"`

	//+kubebuilder:validation:Required
	Request string `json:"request"`

	//+kubebuilder:validation:Required
	Limit string `json:"limit"`
}

ConstraintPolicyRule defines a single constraint policy rule.

func (*ConstraintPolicyRule) DeepCopy

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

func (*ConstraintPolicyRule) DeepCopyInto

func (in *ConstraintPolicyRule) DeepCopyInto(out *ConstraintPolicyRule)

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

type ConstraintPolicySpec

type ConstraintPolicySpec struct {
	//+kubebuilder:validation:MinItems=1
	//+kubebuilder:validation:Required
	Rules []*ConstraintPolicyRule `json:"rules"`
}

ConstraintPolicySpec defines the desired state of ConstraintPolicy.

func (*ConstraintPolicySpec) DeepCopy

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

func (*ConstraintPolicySpec) DeepCopyInto

func (in *ConstraintPolicySpec) DeepCopyInto(out *ConstraintPolicySpec)

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

type ConstraintPolicyStatus

type ConstraintPolicyStatus struct {
	Table ConstraintPolicyTable `json:"table"`
}

ConstraintPolicyStatus defines a array of policy rules used to manage the results of rule evalautions as part of the policy binding status.

func (*ConstraintPolicyStatus) DeepCopy

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

func (*ConstraintPolicyStatus) DeepCopyInto

func (in *ConstraintPolicyStatus) DeepCopyInto(out *ConstraintPolicyStatus)

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

type ConstraintPolicyTable

type ConstraintPolicyTable struct {
	Rules []string `json:"rules"`
}

ConstraintPolicyTable defines a array of policy rules used to manage the results of rule evalautions as part of the policy binding status.

func (*ConstraintPolicyTable) DeepCopy

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

func (*ConstraintPolicyTable) DeepCopyInto

func (in *ConstraintPolicyTable) DeepCopyInto(out *ConstraintPolicyTable)

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

type Policy

type Policy string

Policy used to type a policy name so that if can be validated with a pattern. +kubebuilder:validation:Pattern:=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`

Jump to

Keyboard shortcuts

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