v1

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

+groupName=example.openshift.io

Index

Constants

This section is empty.

Variables

View Source
var (
	GroupName    = "example.openshift.io"
	GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}

	// Install is a function which adds this version to a scheme
	Install = schemeBuilder.AddToScheme

	// SchemeGroupVersion generated code relies on this name
	// Deprecated
	SchemeGroupVersion = GroupVersion
	// AddToScheme exists solely to keep the old generators creating valid code
	// DEPRECATED
	AddToScheme = schemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource generated code relies on this being here, but it logically belongs to the group DEPRECATED

Types

type CELUnion

type CELUnion struct {
	// type determines which of the union members should be populated.
	// +kubebuilder:validation:Required
	// +unionDiscriminator
	Type CELUnionDiscriminator `json:"type,omitempty"`

	// requiredMember is a union member that is required.
	// +unionMember
	RequiredMember *string `json:"requiredMember,omitempty"`

	// optionalMember is a union member that is optional.
	// +unionMember,optional
	OptionalMember *string `json:"optionalMember,omitempty"`
}

CELUnion demonstrates how to use a discriminated union and how to validate it using CEL. +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'RequiredMember' ? has(self.requiredMember) : !has(self.requiredMember)",message="requiredMember is required when type is RequiredMember, and forbidden otherwise" +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'OptionalMember' ? true : !has(self.optionalMember)",message="optionalMember is forbidden when type is not OptionalMember" +union

func (*CELUnion) DeepCopy

func (in *CELUnion) DeepCopy() *CELUnion

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

func (*CELUnion) DeepCopyInto

func (in *CELUnion) DeepCopyInto(out *CELUnion)

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

func (CELUnion) SwaggerDoc

func (CELUnion) SwaggerDoc() map[string]string

type CELUnionDiscriminator

type CELUnionDiscriminator string

CELUnionDiscriminator is a union discriminator for the CEL union. +kubebuilder:validation:Enum:="RequiredMember";"OptionalMember";"EmptyMember"

const (
	// RequiredMember represents a required union member.
	RequiredMember CELUnionDiscriminator = "RequiredMember"

	// OptionalMember represents an optional union member.
	OptionalMember CELUnionDiscriminator = "OptionalMember"

	// EmptyMember represents an empty union member.
	EmptyMember CELUnionDiscriminator = "EmptyMember"
)

type EvolvingDiscriminator

type EvolvingDiscriminator string

EvolvingDiscriminator defines the audit policy profile type. +openshift:validation:FeatureSetAwareEnum:featureSet=Default,enum="";StableValue +openshift:validation:FeatureSetAwareEnum:featureSet=CustomNoUpgrade;TechPreviewNoUpgrade,enum="";StableValue;TechPreviewOnlyValue

const (
	// "StableValue" is always present.
	StableValue EvolvingDiscriminator = "StableValue"

	// "TechPreviewOnlyValue" should only be allowed when TechPreviewNoUpgrade is set in the cluster
	TechPreviewOnlyValue EvolvingDiscriminator = "TechPreviewOnlyValue"
)

type EvolvingUnion

type EvolvingUnion struct {
	// type is the discriminator. It has different values for Default and for TechPreviewNoUpgrade
	// +kubebuilder:validation:Required
	Type EvolvingDiscriminator `json:"type,omitempty"`
}

func (*EvolvingUnion) DeepCopy

func (in *EvolvingUnion) DeepCopy() *EvolvingUnion

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

func (*EvolvingUnion) DeepCopyInto

func (in *EvolvingUnion) DeepCopyInto(out *EvolvingUnion)

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

func (EvolvingUnion) SwaggerDoc

func (EvolvingUnion) SwaggerDoc() map[string]string

type StableConfigType

type StableConfigType struct {
	metav1.TypeMeta `json:",inline"`

	// metadata is the standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// spec is the specification of the desired behavior of the StableConfigType.
	Spec StableConfigTypeSpec `json:"spec,omitempty"`
	// status is the most recently observed status of the StableConfigType.
	Status StableConfigTypeStatus `json:"status,omitempty"`
}

StableConfigType is a stable config type that may include TechPreviewNoUpgrade fields.

Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +openshift:compatibility-gen:level=1

func (*StableConfigType) DeepCopy

func (in *StableConfigType) DeepCopy() *StableConfigType

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

func (*StableConfigType) DeepCopyInto

func (in *StableConfigType) DeepCopyInto(out *StableConfigType)

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

func (*StableConfigType) DeepCopyObject

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

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

func (StableConfigType) SwaggerDoc

func (StableConfigType) SwaggerDoc() map[string]string

type StableConfigTypeList

type StableConfigTypeList struct {
	metav1.TypeMeta `json:",inline"`

	// metadata is the standard list's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []StableConfigType `json:"items"`
}

StableConfigTypeList contains a list of StableConfigTypes.

Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +openshift:compatibility-gen:level=1

func (*StableConfigTypeList) DeepCopy

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

func (*StableConfigTypeList) DeepCopyInto

func (in *StableConfigTypeList) DeepCopyInto(out *StableConfigTypeList)

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

func (*StableConfigTypeList) DeepCopyObject

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

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

func (StableConfigTypeList) SwaggerDoc

func (StableConfigTypeList) SwaggerDoc() map[string]string

type StableConfigTypeSpec

type StableConfigTypeSpec struct {
	// coolNewField is a field that is for tech preview only.  On normal clusters this shouldn't be present
	//
	// +kubebuilder:validation:Optional
	// +openshift:enable:FeatureSets=CustomNoUpgrade;TechPreviewNoUpgrade
	// +optional
	CoolNewField string `json:"coolNewField"`

	// stableField is a field that is present on default clusters and on tech preview clusters
	//
	// If empty, the platform will choose a good default, which may change over time without notice.
	//
	// +optional
	StableField string `json:"stableField"`

	// immutableField is a field that is immutable once the object has been created.
	// It is required at all times.
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="immutableField is immutable"
	// +kubebuilder:validation:Required
	ImmutableField string `json:"immutableField"`

	// optionalImmutableField is a field that is immutable once set.
	// It is optional but may not be changed once set.
	// +kubebuilder:validation:XValidation:rule="oldSelf == ” || self == oldSelf",message="optionalImmutableField is immutable once set"
	// +optional
	OptionalImmutableField string `json:"optionalImmutableField"`

	// evolvingUnion demonstrates how to phase in new values into discriminated union
	// +optional
	EvolvingUnion EvolvingUnion `json:"evolvingUnion"`

	// celUnion demonstrates how to validate a discrminated union using CEL
	// +optional
	CELUnion CELUnion `json:"celUnion,omitempty"`
}

StableConfigTypeSpec is the desired state +openshift:validation:FeatureSetAwareXValidation:featureSet=CustomNoUpgrade;TechPreviewNoUpgrade,rule="has(oldSelf.coolNewField) ? has(self.coolNewField) : true",message="coolNewField may not be removed once set"

func (*StableConfigTypeSpec) DeepCopy

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

func (*StableConfigTypeSpec) DeepCopyInto

func (in *StableConfigTypeSpec) DeepCopyInto(out *StableConfigTypeSpec)

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

func (StableConfigTypeSpec) SwaggerDoc

func (StableConfigTypeSpec) SwaggerDoc() map[string]string

type StableConfigTypeStatus

type StableConfigTypeStatus struct {
	// Represents the observations of a foo's current state.
	// Known .status.conditions.type are: "Available", "Progressing", and "Degraded"
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`

	// immutableField is a field that is immutable once the object has been created.
	// It is required at all times.
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="immutableField is immutable"
	// +optional
	ImmutableField string `json:"immutableField,omitempty"`
}

StableConfigTypeStatus defines the observed status of the StableConfigType.

func (*StableConfigTypeStatus) DeepCopy

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

func (*StableConfigTypeStatus) DeepCopyInto

func (in *StableConfigTypeStatus) DeepCopyInto(out *StableConfigTypeStatus)

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

func (StableConfigTypeStatus) SwaggerDoc

func (StableConfigTypeStatus) SwaggerDoc() map[string]string

Jump to

Keyboard shortcuts

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