v1

package
v1.16.0-pre.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Overview

Package v1 is the v1 version of the API.

Index

Constants

View Source
const GroupName = "apiextensions.k8s.io"

Variables

View Source
var (
	ErrInvalidLengthGenerated        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenerated          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs)

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func RegisterConversions added in v1.16.0

func RegisterConversions(s *runtime.Scheme) error

RegisterConversions adds conversion functions to the given scheme. Public to allow building arbitrary schemes.

func RegisterDefaults added in v1.16.0

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns back a Group qualified GroupResource

Types

type CustomResourceDefinition

type CustomResourceDefinition struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
}

CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.

func (*CustomResourceDefinition) DeepCopy

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

func (*CustomResourceDefinition) DeepCopyInto

func (in *CustomResourceDefinition) DeepCopyInto(out *CustomResourceDefinition)

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

func (*CustomResourceDefinition) DeepCopyObject

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

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

func (*CustomResourceDefinition) Descriptor

func (*CustomResourceDefinition) Descriptor() ([]byte, []int)

func (*CustomResourceDefinition) Marshal

func (m *CustomResourceDefinition) Marshal() (dAtA []byte, err error)

func (*CustomResourceDefinition) MarshalTo

func (m *CustomResourceDefinition) MarshalTo(dAtA []byte) (int, error)

func (*CustomResourceDefinition) MarshalToSizedBuffer

func (m *CustomResourceDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CustomResourceDefinition) ProtoMessage

func (*CustomResourceDefinition) ProtoMessage()

func (*CustomResourceDefinition) Reset

func (m *CustomResourceDefinition) Reset()

func (*CustomResourceDefinition) Size

func (m *CustomResourceDefinition) Size() (n int)

func (*CustomResourceDefinition) String

func (this *CustomResourceDefinition) String() string

func (*CustomResourceDefinition) Unmarshal

func (m *CustomResourceDefinition) Unmarshal(dAtA []byte) error

func (*CustomResourceDefinition) XXX_DiscardUnknown

func (m *CustomResourceDefinition) XXX_DiscardUnknown()

func (*CustomResourceDefinition) XXX_Marshal

func (m *CustomResourceDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CustomResourceDefinition) XXX_Merge

func (m *CustomResourceDefinition) XXX_Merge(src proto.Message)

func (*CustomResourceDefinition) XXX_Size

func (m *CustomResourceDefinition) XXX_Size() int

func (*CustomResourceDefinition) XXX_Unmarshal

func (m *CustomResourceDefinition) XXX_Unmarshal(b []byte) error

type CustomResourceDefinitionList

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

	// Standard object's metadata
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// items list individual CustomResourceDefinition objects
	Items []CustomResourceDefinition `json:"items" protobuf:"bytes,2,rep,name=items"`
}

CustomResourceDefinitionList is a list of CustomResourceDefinition objects.

func (*CustomResourceDefinitionList) DeepCopy

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

func (*CustomResourceDefinitionList) DeepCopyInto

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

func (*CustomResourceDefinitionList) DeepCopyObject

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

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

func (*CustomResourceDefinitionList) Descriptor

func (*CustomResourceDefinitionList) Descriptor() ([]byte, []int)

func (*CustomResourceDefinitionList) Marshal

func (m *CustomResourceDefinitionList) Marshal() (dAtA []byte, err error)

func (*CustomResourceDefinitionList) MarshalTo

func (m *CustomResourceDefinitionList) MarshalTo(dAtA []byte) (int, error)

func (*CustomResourceDefinitionList) MarshalToSizedBuffer

func (m *CustomResourceDefinitionList) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CustomResourceDefinitionList) ProtoMessage

func (*CustomResourceDefinitionList) ProtoMessage()

func (*CustomResourceDefinitionList) Reset

func (m *CustomResourceDefinitionList) Reset()

func (*CustomResourceDefinitionList) Size

func (m *CustomResourceDefinitionList) Size() (n int)

func (*CustomResourceDefinitionList) String

func (this *CustomResourceDefinitionList) String() string

func (*CustomResourceDefinitionList) Unmarshal

func (m *CustomResourceDefinitionList) Unmarshal(dAtA []byte) error

func (*CustomResourceDefinitionList) XXX_DiscardUnknown

func (m *CustomResourceDefinitionList) XXX_DiscardUnknown()

func (*CustomResourceDefinitionList) XXX_Marshal

func (m *CustomResourceDefinitionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CustomResourceDefinitionList) XXX_Merge

func (m *CustomResourceDefinitionList) XXX_Merge(src proto.Message)

func (*CustomResourceDefinitionList) XXX_Size

func (m *CustomResourceDefinitionList) XXX_Size() int

func (*CustomResourceDefinitionList) XXX_Unmarshal

func (m *CustomResourceDefinitionList) XXX_Unmarshal(b []byte) error

type CustomResourceSubresourceScale added in v1.16.0

type CustomResourceSubresourceScale struct {
	// specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`.
	// Only JSON paths without the array notation are allowed.
	// Must be a JSON Path under `.spec`.
	// If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.
	SpecReplicasPath string `json:"specReplicasPath" protobuf:"bytes,1,name=specReplicasPath"`
	// statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`.
	// Only JSON paths without the array notation are allowed.
	// Must be a JSON Path under `.status`.
	// If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource
	// will default to 0.
	StatusReplicasPath string `json:"statusReplicasPath" protobuf:"bytes,2,opt,name=statusReplicasPath"`
	// labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`.
	// Only JSON paths without the array notation are allowed.
	// Must be a JSON Path under `.status` or `.spec`.
	// Must be set to work with HorizontalPodAutoscaler.
	// The field pointed by this JSON path must be a string field (not a complex selector struct)
	// which contains a serialized label selector in string form.
	// More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource
	// If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale`
	// subresource will default to the empty string.
	// +optional
	LabelSelectorPath *string `json:"labelSelectorPath,omitempty" protobuf:"bytes,3,opt,name=labelSelectorPath"`
}

CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.

func (*CustomResourceSubresourceScale) DeepCopy added in v1.16.0

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

func (*CustomResourceSubresourceScale) DeepCopyInto added in v1.16.0

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

func (*CustomResourceSubresourceScale) Descriptor added in v1.16.0

func (*CustomResourceSubresourceScale) Descriptor() ([]byte, []int)

func (*CustomResourceSubresourceScale) Marshal added in v1.16.0

func (m *CustomResourceSubresourceScale) Marshal() (dAtA []byte, err error)

func (*CustomResourceSubresourceScale) MarshalTo added in v1.16.0

func (m *CustomResourceSubresourceScale) MarshalTo(dAtA []byte) (int, error)

func (*CustomResourceSubresourceScale) MarshalToSizedBuffer added in v1.16.0

func (m *CustomResourceSubresourceScale) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CustomResourceSubresourceScale) ProtoMessage added in v1.16.0

func (*CustomResourceSubresourceScale) ProtoMessage()

func (*CustomResourceSubresourceScale) Reset added in v1.16.0

func (m *CustomResourceSubresourceScale) Reset()

func (*CustomResourceSubresourceScale) Size added in v1.16.0

func (m *CustomResourceSubresourceScale) Size() (n int)

func (*CustomResourceSubresourceScale) String added in v1.16.0

func (this *CustomResourceSubresourceScale) String() string

func (*CustomResourceSubresourceScale) Unmarshal added in v1.16.0

func (m *CustomResourceSubresourceScale) Unmarshal(dAtA []byte) error

func (*CustomResourceSubresourceScale) XXX_DiscardUnknown added in v1.16.0

func (m *CustomResourceSubresourceScale) XXX_DiscardUnknown()

func (*CustomResourceSubresourceScale) XXX_Marshal added in v1.16.0

func (m *CustomResourceSubresourceScale) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CustomResourceSubresourceScale) XXX_Merge added in v1.16.0

func (m *CustomResourceSubresourceScale) XXX_Merge(src proto.Message)

func (*CustomResourceSubresourceScale) XXX_Size added in v1.16.0

func (m *CustomResourceSubresourceScale) XXX_Size() int

func (*CustomResourceSubresourceScale) XXX_Unmarshal added in v1.16.0

func (m *CustomResourceSubresourceScale) XXX_Unmarshal(b []byte) error

type CustomResourceSubresourceStatus added in v1.16.0

type CustomResourceSubresourceStatus struct{}

CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza

func (*CustomResourceSubresourceStatus) DeepCopy added in v1.16.0

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

func (*CustomResourceSubresourceStatus) DeepCopyInto added in v1.16.0

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

func (*CustomResourceSubresourceStatus) Descriptor added in v1.16.0

func (*CustomResourceSubresourceStatus) Descriptor() ([]byte, []int)

func (*CustomResourceSubresourceStatus) Marshal added in v1.16.0

func (m *CustomResourceSubresourceStatus) Marshal() (dAtA []byte, err error)

func (*CustomResourceSubresourceStatus) MarshalTo added in v1.16.0

func (m *CustomResourceSubresourceStatus) MarshalTo(dAtA []byte) (int, error)

func (*CustomResourceSubresourceStatus) MarshalToSizedBuffer added in v1.16.0

func (m *CustomResourceSubresourceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CustomResourceSubresourceStatus) ProtoMessage added in v1.16.0

func (*CustomResourceSubresourceStatus) ProtoMessage()

func (*CustomResourceSubresourceStatus) Reset added in v1.16.0

func (*CustomResourceSubresourceStatus) Size added in v1.16.0

func (m *CustomResourceSubresourceStatus) Size() (n int)

func (*CustomResourceSubresourceStatus) String added in v1.16.0

func (this *CustomResourceSubresourceStatus) String() string

func (*CustomResourceSubresourceStatus) Unmarshal added in v1.16.0

func (m *CustomResourceSubresourceStatus) Unmarshal(dAtA []byte) error

func (*CustomResourceSubresourceStatus) XXX_DiscardUnknown added in v1.16.0

func (m *CustomResourceSubresourceStatus) XXX_DiscardUnknown()

func (*CustomResourceSubresourceStatus) XXX_Marshal added in v1.16.0

func (m *CustomResourceSubresourceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CustomResourceSubresourceStatus) XXX_Merge added in v1.16.0

func (m *CustomResourceSubresourceStatus) XXX_Merge(src proto.Message)

func (*CustomResourceSubresourceStatus) XXX_Size added in v1.16.0

func (m *CustomResourceSubresourceStatus) XXX_Size() int

func (*CustomResourceSubresourceStatus) XXX_Unmarshal added in v1.16.0

func (m *CustomResourceSubresourceStatus) XXX_Unmarshal(b []byte) error

type CustomResourceSubresources added in v1.16.0

type CustomResourceSubresources struct {
	// status indicates the custom resource should serve a `/status` subresource.
	// When enabled:
	// 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object.
	// 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.
	// +optional
	Status *CustomResourceSubresourceStatus `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"`
	// scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.
	// +optional
	Scale *CustomResourceSubresourceScale `json:"scale,omitempty" protobuf:"bytes,2,opt,name=scale"`
}

CustomResourceSubresources defines the status and scale subresources for CustomResources.

func (*CustomResourceSubresources) DeepCopy added in v1.16.0

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

func (*CustomResourceSubresources) DeepCopyInto added in v1.16.0

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

func (*CustomResourceSubresources) Descriptor added in v1.16.0

func (*CustomResourceSubresources) Descriptor() ([]byte, []int)

func (*CustomResourceSubresources) Marshal added in v1.16.0

func (m *CustomResourceSubresources) Marshal() (dAtA []byte, err error)

func (*CustomResourceSubresources) MarshalTo added in v1.16.0

func (m *CustomResourceSubresources) MarshalTo(dAtA []byte) (int, error)

func (*CustomResourceSubresources) MarshalToSizedBuffer added in v1.16.0

func (m *CustomResourceSubresources) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CustomResourceSubresources) ProtoMessage added in v1.16.0

func (*CustomResourceSubresources) ProtoMessage()

func (*CustomResourceSubresources) Reset added in v1.16.0

func (m *CustomResourceSubresources) Reset()

func (*CustomResourceSubresources) Size added in v1.16.0

func (m *CustomResourceSubresources) Size() (n int)

func (*CustomResourceSubresources) String added in v1.16.0

func (this *CustomResourceSubresources) String() string

func (*CustomResourceSubresources) Unmarshal added in v1.16.0

func (m *CustomResourceSubresources) Unmarshal(dAtA []byte) error

func (*CustomResourceSubresources) XXX_DiscardUnknown added in v1.16.0

func (m *CustomResourceSubresources) XXX_DiscardUnknown()

func (*CustomResourceSubresources) XXX_Marshal added in v1.16.0

func (m *CustomResourceSubresources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CustomResourceSubresources) XXX_Merge added in v1.16.0

func (m *CustomResourceSubresources) XXX_Merge(src proto.Message)

func (*CustomResourceSubresources) XXX_Size added in v1.16.0

func (m *CustomResourceSubresources) XXX_Size() int

func (*CustomResourceSubresources) XXX_Unmarshal added in v1.16.0

func (m *CustomResourceSubresources) XXX_Unmarshal(b []byte) error

type CustomResourceValidation added in v1.16.0

type CustomResourceValidation struct {
	// openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.
	// +optional
	OpenAPIV3Schema *JSONSchemaProps `json:"openAPIV3Schema,omitempty" protobuf:"bytes,1,opt,name=openAPIV3Schema"`
}

CustomResourceValidation is a list of validation methods for CustomResources.

func (*CustomResourceValidation) DeepCopy added in v1.16.0

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

func (*CustomResourceValidation) DeepCopyInto added in v1.16.0

func (in *CustomResourceValidation) DeepCopyInto(out *CustomResourceValidation)

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

func (*CustomResourceValidation) Descriptor added in v1.16.0

func (*CustomResourceValidation) Descriptor() ([]byte, []int)

func (*CustomResourceValidation) Marshal added in v1.16.0

func (m *CustomResourceValidation) Marshal() (dAtA []byte, err error)

func (*CustomResourceValidation) MarshalTo added in v1.16.0

func (m *CustomResourceValidation) MarshalTo(dAtA []byte) (int, error)

func (*CustomResourceValidation) MarshalToSizedBuffer added in v1.16.0

func (m *CustomResourceValidation) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CustomResourceValidation) ProtoMessage added in v1.16.0

func (*CustomResourceValidation) ProtoMessage()

func (*CustomResourceValidation) Reset added in v1.16.0

func (m *CustomResourceValidation) Reset()

func (*CustomResourceValidation) Size added in v1.16.0

func (m *CustomResourceValidation) Size() (n int)

func (*CustomResourceValidation) String added in v1.16.0

func (this *CustomResourceValidation) String() string

func (*CustomResourceValidation) Unmarshal added in v1.16.0

func (m *CustomResourceValidation) Unmarshal(dAtA []byte) error

func (*CustomResourceValidation) XXX_DiscardUnknown added in v1.16.0

func (m *CustomResourceValidation) XXX_DiscardUnknown()

func (*CustomResourceValidation) XXX_Marshal added in v1.16.0

func (m *CustomResourceValidation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CustomResourceValidation) XXX_Merge added in v1.16.0

func (m *CustomResourceValidation) XXX_Merge(src proto.Message)

func (*CustomResourceValidation) XXX_Size added in v1.16.0

func (m *CustomResourceValidation) XXX_Size() int

func (*CustomResourceValidation) XXX_Unmarshal added in v1.16.0

func (m *CustomResourceValidation) XXX_Unmarshal(b []byte) error

type ExternalDocumentation added in v1.16.0

type ExternalDocumentation struct {
	Description string `json:"description,omitempty" protobuf:"bytes,1,opt,name=description"`
	URL         string `json:"url,omitempty" protobuf:"bytes,2,opt,name=url"`
}

ExternalDocumentation allows referencing an external resource for extended documentation.

func (*ExternalDocumentation) DeepCopy added in v1.16.0

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

func (*ExternalDocumentation) DeepCopyInto added in v1.16.0

func (in *ExternalDocumentation) DeepCopyInto(out *ExternalDocumentation)

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

func (*ExternalDocumentation) Descriptor added in v1.16.0

func (*ExternalDocumentation) Descriptor() ([]byte, []int)

func (*ExternalDocumentation) Marshal added in v1.16.0

func (m *ExternalDocumentation) Marshal() (dAtA []byte, err error)

func (*ExternalDocumentation) MarshalTo added in v1.16.0

func (m *ExternalDocumentation) MarshalTo(dAtA []byte) (int, error)

func (*ExternalDocumentation) MarshalToSizedBuffer added in v1.16.0

func (m *ExternalDocumentation) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExternalDocumentation) ProtoMessage added in v1.16.0

func (*ExternalDocumentation) ProtoMessage()

func (*ExternalDocumentation) Reset added in v1.16.0

func (m *ExternalDocumentation) Reset()

func (*ExternalDocumentation) Size added in v1.16.0

func (m *ExternalDocumentation) Size() (n int)

func (*ExternalDocumentation) String added in v1.16.0

func (this *ExternalDocumentation) String() string

func (*ExternalDocumentation) Unmarshal added in v1.16.0

func (m *ExternalDocumentation) Unmarshal(dAtA []byte) error

func (*ExternalDocumentation) XXX_DiscardUnknown added in v1.16.0

func (m *ExternalDocumentation) XXX_DiscardUnknown()

func (*ExternalDocumentation) XXX_Marshal added in v1.16.0

func (m *ExternalDocumentation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExternalDocumentation) XXX_Merge added in v1.16.0

func (m *ExternalDocumentation) XXX_Merge(src proto.Message)

func (*ExternalDocumentation) XXX_Size added in v1.16.0

func (m *ExternalDocumentation) XXX_Size() int

func (*ExternalDocumentation) XXX_Unmarshal added in v1.16.0

func (m *ExternalDocumentation) XXX_Unmarshal(b []byte) error

type FieldValueErrorReason added in v1.16.0

type FieldValueErrorReason string

FieldValueErrorReason is a machine-readable value providing more detail about why a field failed the validation. +enum

const (
	// FieldValueRequired is used to report required values that are not
	// provided (e.g. empty strings, null values, or empty arrays).
	FieldValueRequired FieldValueErrorReason = "FieldValueRequired"
	// FieldValueDuplicate is used to report collisions of values that must be
	// unique (e.g. unique IDs).
	FieldValueDuplicate FieldValueErrorReason = "FieldValueDuplicate"
	// FieldValueInvalid is used to report malformed values (e.g. failed regex
	// match, too long, out of bounds).
	FieldValueInvalid FieldValueErrorReason = "FieldValueInvalid"
	// FieldValueForbidden is used to report valid (as per formatting rules)
	// values which would be accepted under some conditions, but which are not
	// permitted by the current conditions (such as security policy).
	FieldValueForbidden FieldValueErrorReason = "FieldValueForbidden"
)

type JSON added in v1.16.0

type JSON struct {
	Raw []byte `json:"-" protobuf:"bytes,1,opt,name=raw"`
}

JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.

func (*JSON) DeepCopy added in v1.16.0

func (in *JSON) DeepCopy() *JSON

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

func (*JSON) DeepCopyInto added in v1.16.0

func (in *JSON) DeepCopyInto(out *JSON)

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

func (*JSON) Descriptor added in v1.16.0

func (*JSON) Descriptor() ([]byte, []int)

func (*JSON) Marshal added in v1.16.0

func (m *JSON) Marshal() (dAtA []byte, err error)

func (*JSON) MarshalTo added in v1.16.0

func (m *JSON) MarshalTo(dAtA []byte) (int, error)

func (*JSON) MarshalToSizedBuffer added in v1.16.0

func (m *JSON) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (JSON) OpenAPISchemaFormat added in v1.16.0

func (_ JSON) OpenAPISchemaFormat() string

OpenAPISchemaFormat is used by the kube-openapi generator when constructing the OpenAPI spec of this type.

func (JSON) OpenAPISchemaType added in v1.16.0

func (_ JSON) OpenAPISchemaType() []string

OpenAPISchemaType is used by the kube-openapi generator when constructing the OpenAPI spec of this type.

See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators

func (*JSON) ProtoMessage added in v1.16.0

func (*JSON) ProtoMessage()

func (*JSON) Reset added in v1.16.0

func (m *JSON) Reset()

func (*JSON) Size added in v1.16.0

func (m *JSON) Size() (n int)

func (*JSON) String added in v1.16.0

func (this *JSON) String() string

func (*JSON) Unmarshal added in v1.16.0

func (m *JSON) Unmarshal(dAtA []byte) error

func (*JSON) XXX_DiscardUnknown added in v1.16.0

func (m *JSON) XXX_DiscardUnknown()

func (*JSON) XXX_Marshal added in v1.16.0

func (m *JSON) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JSON) XXX_Merge added in v1.16.0

func (m *JSON) XXX_Merge(src proto.Message)

func (*JSON) XXX_Size added in v1.16.0

func (m *JSON) XXX_Size() int

func (*JSON) XXX_Unmarshal added in v1.16.0

func (m *JSON) XXX_Unmarshal(b []byte) error

type JSONSchemaDefinitions added in v1.16.0

type JSONSchemaDefinitions map[string]JSONSchemaProps

JSONSchemaDefinitions contains the models explicitly defined in this spec.

func (JSONSchemaDefinitions) DeepCopy added in v1.16.0

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

func (JSONSchemaDefinitions) DeepCopyInto added in v1.16.0

func (in JSONSchemaDefinitions) DeepCopyInto(out *JSONSchemaDefinitions)

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

type JSONSchemaDependencies added in v1.16.0

type JSONSchemaDependencies map[string]JSONSchemaPropsOrStringArray

JSONSchemaDependencies represent a dependencies property.

func (JSONSchemaDependencies) DeepCopy added in v1.16.0

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

func (JSONSchemaDependencies) DeepCopyInto added in v1.16.0

func (in JSONSchemaDependencies) DeepCopyInto(out *JSONSchemaDependencies)

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

type JSONSchemaProps added in v1.16.0

type JSONSchemaProps struct {
	ID          string        `json:"id,omitempty" protobuf:"bytes,1,opt,name=id"`
	Schema      JSONSchemaURL `json:"$schema,omitempty" protobuf:"bytes,2,opt,name=schema"`
	Ref         *string       `json:"$ref,omitempty" protobuf:"bytes,3,opt,name=ref"`
	Description string        `json:"description,omitempty" protobuf:"bytes,4,opt,name=description"`
	Type        string        `json:"type,omitempty" protobuf:"bytes,5,opt,name=type"`

	// format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:
	//
	// - bsonobjectid: a bson object ID, i.e. a 24 characters hex string
	// - uri: an URI as parsed by Golang net/url.ParseRequestURI
	// - email: an email address as parsed by Golang net/mail.ParseAddress
	// - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034].
	// - ipv4: an IPv4 IP as parsed by Golang net.ParseIP
	// - ipv6: an IPv6 IP as parsed by Golang net.ParseIP
	// - cidr: a CIDR as parsed by Golang net.ParseCIDR
	// - mac: a MAC address as parsed by Golang net.ParseMAC
	// - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$
	// - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$
	// - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
	// - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
	// - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041"
	// - isbn10: an ISBN10 number string like "0321751043"
	// - isbn13: an ISBN13 number string like "978-0321751041"
	// - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in
	// - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$
	// - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
	// - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559"
	// - byte: base64 encoded binary data
	// - password: any kind of string
	// - date: a date string like "2006-01-02" as defined by full-date in RFC3339
	// - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format
	// - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339.
	Format string `json:"format,omitempty" protobuf:"bytes,6,opt,name=format"`

	Title string `json:"title,omitempty" protobuf:"bytes,7,opt,name=title"`
	// default is a default value for undefined object fields.
	// Defaulting is a beta feature under the CustomResourceDefaulting feature gate.
	// Defaulting requires spec.preserveUnknownFields to be false.
	Default          *JSON    `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"`
	Maximum          *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"`
	ExclusiveMaximum bool     `json:"exclusiveMaximum,omitempty" protobuf:"bytes,10,opt,name=exclusiveMaximum"`
	Minimum          *float64 `json:"minimum,omitempty" protobuf:"bytes,11,opt,name=minimum"`
	ExclusiveMinimum bool     `json:"exclusiveMinimum,omitempty" protobuf:"bytes,12,opt,name=exclusiveMinimum"`
	MaxLength        *int64   `json:"maxLength,omitempty" protobuf:"bytes,13,opt,name=maxLength"`
	MinLength        *int64   `json:"minLength,omitempty" protobuf:"bytes,14,opt,name=minLength"`
	Pattern          string   `json:"pattern,omitempty" protobuf:"bytes,15,opt,name=pattern"`
	MaxItems         *int64   `json:"maxItems,omitempty" protobuf:"bytes,16,opt,name=maxItems"`
	MinItems         *int64   `json:"minItems,omitempty" protobuf:"bytes,17,opt,name=minItems"`
	UniqueItems      bool     `json:"uniqueItems,omitempty" protobuf:"bytes,18,opt,name=uniqueItems"`
	MultipleOf       *float64 `json:"multipleOf,omitempty" protobuf:"bytes,19,opt,name=multipleOf"`
	// +listType=atomic
	Enum          []JSON `json:"enum,omitempty" protobuf:"bytes,20,rep,name=enum"`
	MaxProperties *int64 `json:"maxProperties,omitempty" protobuf:"bytes,21,opt,name=maxProperties"`
	MinProperties *int64 `json:"minProperties,omitempty" protobuf:"bytes,22,opt,name=minProperties"`
	// +listType=atomic
	Required []string                `json:"required,omitempty" protobuf:"bytes,23,rep,name=required"`
	Items    *JSONSchemaPropsOrArray `json:"items,omitempty" protobuf:"bytes,24,opt,name=items"`
	// +listType=atomic
	AllOf []JSONSchemaProps `json:"allOf,omitempty" protobuf:"bytes,25,rep,name=allOf"`
	// +listType=atomic
	OneOf []JSONSchemaProps `json:"oneOf,omitempty" protobuf:"bytes,26,rep,name=oneOf"`
	// +listType=atomic
	AnyOf                []JSONSchemaProps          `json:"anyOf,omitempty" protobuf:"bytes,27,rep,name=anyOf"`
	Not                  *JSONSchemaProps           `json:"not,omitempty" protobuf:"bytes,28,opt,name=not"`
	Properties           map[string]JSONSchemaProps `json:"properties,omitempty" protobuf:"bytes,29,rep,name=properties"`
	AdditionalProperties *JSONSchemaPropsOrBool     `json:"additionalProperties,omitempty" protobuf:"bytes,30,opt,name=additionalProperties"`
	PatternProperties    map[string]JSONSchemaProps `json:"patternProperties,omitempty" protobuf:"bytes,31,rep,name=patternProperties"`
	Dependencies         JSONSchemaDependencies     `json:"dependencies,omitempty" protobuf:"bytes,32,opt,name=dependencies"`
	AdditionalItems      *JSONSchemaPropsOrBool     `json:"additionalItems,omitempty" protobuf:"bytes,33,opt,name=additionalItems"`
	Definitions          JSONSchemaDefinitions      `json:"definitions,omitempty" protobuf:"bytes,34,opt,name=definitions"`
	ExternalDocs         *ExternalDocumentation     `json:"externalDocs,omitempty" protobuf:"bytes,35,opt,name=externalDocs"`
	Example              *JSON                      `json:"example,omitempty" protobuf:"bytes,36,opt,name=example"`
	Nullable             bool                       `json:"nullable,omitempty" protobuf:"bytes,37,opt,name=nullable"`

	// x-kubernetes-preserve-unknown-fields stops the API server
	// decoding step from pruning fields which are not specified
	// in the validation schema. This affects fields recursively,
	// but switches back to normal pruning behaviour if nested
	// properties or additionalProperties are specified in the schema.
	// This can either be true or undefined. False is forbidden.
	XPreserveUnknownFields *bool `json:"x-kubernetes-preserve-unknown-fields,omitempty" protobuf:"bytes,38,opt,name=xKubernetesPreserveUnknownFields"`

	// x-kubernetes-embedded-resource defines that the value is an
	// embedded Kubernetes runtime.Object, with TypeMeta and
	// ObjectMeta. The type must be object. It is allowed to further
	// restrict the embedded object. kind, apiVersion and metadata
	// are validated automatically. x-kubernetes-preserve-unknown-fields
	// is allowed to be true, but does not have to be if the object
	// is fully specified (up to kind, apiVersion, metadata).
	XEmbeddedResource bool `json:"x-kubernetes-embedded-resource,omitempty" protobuf:"bytes,39,opt,name=xKubernetesEmbeddedResource"`

	// x-kubernetes-int-or-string specifies that this value is
	// either an integer or a string. If this is true, an empty
	// type is allowed and type as child of anyOf is permitted
	// if following one of the following patterns:
	//
	// 1) anyOf:
	//    - type: integer
	//    - type: string
	// 2) allOf:
	//    - anyOf:
	//      - type: integer
	//      - type: string
	//    - ... zero or more
	XIntOrString bool `json:"x-kubernetes-int-or-string,omitempty" protobuf:"bytes,40,opt,name=xKubernetesIntOrString"`

	// x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used
	// as the index of the map.
	//
	// This tag MUST only be used on lists that have the "x-kubernetes-list-type"
	// extension set to "map". Also, the values specified for this attribute must
	// be a scalar typed field of the child structure (no nesting is supported).
	//
	// The properties specified must either be required or have a default value,
	// to ensure those properties are present for all list items.
	//
	// +optional
	// +listType=atomic
	XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty" protobuf:"bytes,41,rep,name=xKubernetesListMapKeys"`

	// x-kubernetes-list-type annotates an array to further describe its topology.
	// This extension must only be used on lists and may have 3 possible values:
	//
	// 1) `atomic`: the list is treated as a single entity, like a scalar.
	//      Atomic lists will be entirely replaced when updated. This extension
	//      may be used on any type of list (struct, scalar, ...).
	// 2) `set`:
	//      Sets are lists that must not have multiple items with the same value. Each
	//      value must be a scalar, an object with x-kubernetes-map-type `atomic` or an
	//      array with x-kubernetes-list-type `atomic`.
	// 3) `map`:
	//      These lists are like maps in that their elements have a non-index key
	//      used to identify them. Order is preserved upon merge. The map tag
	//      must only be used on a list with elements of type object.
	// Defaults to atomic for arrays.
	// +optional
	XListType *string `json:"x-kubernetes-list-type,omitempty" protobuf:"bytes,42,opt,name=xKubernetesListType"`

	// x-kubernetes-map-type annotates an object to further describe its topology.
	// This extension must only be used when type is object and may have 2 possible values:
	//
	// 1) `granular`:
	//      These maps are actual maps (key-value pairs) and each fields are independent
	//      from each other (they can each be manipulated by separate actors). This is
	//      the default behaviour for all maps.
	// 2) `atomic`: the list is treated as a single entity, like a scalar.
	//      Atomic maps will be entirely replaced when updated.
	// +optional
	XMapType *string `json:"x-kubernetes-map-type,omitempty" protobuf:"bytes,43,opt,name=xKubernetesMapType"`

	// x-kubernetes-validations describes a list of validation rules written in the CEL expression language.
	// This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled.
	// +patchMergeKey=rule
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=rule
	XValidations ValidationRules `` /* 136-byte string literal not displayed */
}

JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).

func (*JSONSchemaProps) DeepCopy added in v1.16.0

func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps

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

func (*JSONSchemaProps) DeepCopyInto added in v1.16.0

func (in *JSONSchemaProps) DeepCopyInto(out *JSONSchemaProps)

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

func (*JSONSchemaProps) Descriptor added in v1.16.0

func (*JSONSchemaProps) Descriptor() ([]byte, []int)

func (*JSONSchemaProps) Marshal added in v1.16.0

func (m *JSONSchemaProps) Marshal() (dAtA []byte, err error)

func (*JSONSchemaProps) MarshalTo added in v1.16.0

func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error)

func (*JSONSchemaProps) MarshalToSizedBuffer added in v1.16.0

func (m *JSONSchemaProps) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*JSONSchemaProps) ProtoMessage added in v1.16.0

func (*JSONSchemaProps) ProtoMessage()

func (*JSONSchemaProps) Reset added in v1.16.0

func (m *JSONSchemaProps) Reset()

func (*JSONSchemaProps) Size added in v1.16.0

func (m *JSONSchemaProps) Size() (n int)

func (*JSONSchemaProps) String added in v1.16.0

func (this *JSONSchemaProps) String() string

func (*JSONSchemaProps) Unmarshal added in v1.16.0

func (m *JSONSchemaProps) Unmarshal(dAtA []byte) error

func (*JSONSchemaProps) XXX_DiscardUnknown added in v1.16.0

func (m *JSONSchemaProps) XXX_DiscardUnknown()

func (*JSONSchemaProps) XXX_Marshal added in v1.16.0

func (m *JSONSchemaProps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JSONSchemaProps) XXX_Merge added in v1.16.0

func (m *JSONSchemaProps) XXX_Merge(src proto.Message)

func (*JSONSchemaProps) XXX_Size added in v1.16.0

func (m *JSONSchemaProps) XXX_Size() int

func (*JSONSchemaProps) XXX_Unmarshal added in v1.16.0

func (m *JSONSchemaProps) XXX_Unmarshal(b []byte) error

type JSONSchemaPropsOrArray added in v1.16.0

type JSONSchemaPropsOrArray struct {
	Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"`
	// +listType=atomic
	JSONSchemas []JSONSchemaProps `protobuf:"bytes,2,rep,name=jSONSchemas"`
}

JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.

func (*JSONSchemaPropsOrArray) DeepCopy added in v1.16.0

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

func (*JSONSchemaPropsOrArray) DeepCopyInto added in v1.16.0

func (in *JSONSchemaPropsOrArray) DeepCopyInto(out *JSONSchemaPropsOrArray)

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

func (*JSONSchemaPropsOrArray) Descriptor added in v1.16.0

func (*JSONSchemaPropsOrArray) Descriptor() ([]byte, []int)

func (*JSONSchemaPropsOrArray) Marshal added in v1.16.0

func (m *JSONSchemaPropsOrArray) Marshal() (dAtA []byte, err error)

func (*JSONSchemaPropsOrArray) MarshalTo added in v1.16.0

func (m *JSONSchemaPropsOrArray) MarshalTo(dAtA []byte) (int, error)

func (*JSONSchemaPropsOrArray) MarshalToSizedBuffer added in v1.16.0

func (m *JSONSchemaPropsOrArray) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (JSONSchemaPropsOrArray) OpenAPISchemaFormat added in v1.16.0

func (_ JSONSchemaPropsOrArray) OpenAPISchemaFormat() string

OpenAPISchemaFormat is used by the kube-openapi generator when constructing the OpenAPI spec of this type.

func (JSONSchemaPropsOrArray) OpenAPISchemaType added in v1.16.0

func (_ JSONSchemaPropsOrArray) OpenAPISchemaType() []string

OpenAPISchemaType is used by the kube-openapi generator when constructing the OpenAPI spec of this type.

See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators

func (*JSONSchemaPropsOrArray) ProtoMessage added in v1.16.0

func (*JSONSchemaPropsOrArray) ProtoMessage()

func (*JSONSchemaPropsOrArray) Reset added in v1.16.0

func (m *JSONSchemaPropsOrArray) Reset()

func (*JSONSchemaPropsOrArray) Size added in v1.16.0

func (m *JSONSchemaPropsOrArray) Size() (n int)

func (*JSONSchemaPropsOrArray) String added in v1.16.0

func (this *JSONSchemaPropsOrArray) String() string

func (*JSONSchemaPropsOrArray) Unmarshal added in v1.16.0

func (m *JSONSchemaPropsOrArray) Unmarshal(dAtA []byte) error

func (*JSONSchemaPropsOrArray) XXX_DiscardUnknown added in v1.16.0

func (m *JSONSchemaPropsOrArray) XXX_DiscardUnknown()

func (*JSONSchemaPropsOrArray) XXX_Marshal added in v1.16.0

func (m *JSONSchemaPropsOrArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JSONSchemaPropsOrArray) XXX_Merge added in v1.16.0

func (m *JSONSchemaPropsOrArray) XXX_Merge(src proto.Message)

func (*JSONSchemaPropsOrArray) XXX_Size added in v1.16.0

func (m *JSONSchemaPropsOrArray) XXX_Size() int

func (*JSONSchemaPropsOrArray) XXX_Unmarshal added in v1.16.0

func (m *JSONSchemaPropsOrArray) XXX_Unmarshal(b []byte) error

type JSONSchemaPropsOrBool added in v1.16.0

type JSONSchemaPropsOrBool struct {
	Allows bool             `protobuf:"varint,1,opt,name=allows"`
	Schema *JSONSchemaProps `protobuf:"bytes,2,opt,name=schema"`
}

JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.

func (*JSONSchemaPropsOrBool) DeepCopy added in v1.16.0

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

func (*JSONSchemaPropsOrBool) DeepCopyInto added in v1.16.0

func (in *JSONSchemaPropsOrBool) DeepCopyInto(out *JSONSchemaPropsOrBool)

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

func (*JSONSchemaPropsOrBool) Descriptor added in v1.16.0

func (*JSONSchemaPropsOrBool) Descriptor() ([]byte, []int)

func (*JSONSchemaPropsOrBool) Marshal added in v1.16.0

func (m *JSONSchemaPropsOrBool) Marshal() (dAtA []byte, err error)

func (*JSONSchemaPropsOrBool) MarshalTo added in v1.16.0

func (m *JSONSchemaPropsOrBool) MarshalTo(dAtA []byte) (int, error)

func (*JSONSchemaPropsOrBool) MarshalToSizedBuffer added in v1.16.0

func (m *JSONSchemaPropsOrBool) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (JSONSchemaPropsOrBool) OpenAPISchemaFormat added in v1.16.0

func (_ JSONSchemaPropsOrBool) OpenAPISchemaFormat() string

OpenAPISchemaFormat is used by the kube-openapi generator when constructing the OpenAPI spec of this type.

func (JSONSchemaPropsOrBool) OpenAPISchemaType added in v1.16.0

func (_ JSONSchemaPropsOrBool) OpenAPISchemaType() []string

OpenAPISchemaType is used by the kube-openapi generator when constructing the OpenAPI spec of this type.

See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators

func (*JSONSchemaPropsOrBool) ProtoMessage added in v1.16.0

func (*JSONSchemaPropsOrBool) ProtoMessage()

func (*JSONSchemaPropsOrBool) Reset added in v1.16.0

func (m *JSONSchemaPropsOrBool) Reset()

func (*JSONSchemaPropsOrBool) Size added in v1.16.0

func (m *JSONSchemaPropsOrBool) Size() (n int)

func (*JSONSchemaPropsOrBool) String added in v1.16.0

func (this *JSONSchemaPropsOrBool) String() string

func (*JSONSchemaPropsOrBool) Unmarshal added in v1.16.0

func (m *JSONSchemaPropsOrBool) Unmarshal(dAtA []byte) error

func (*JSONSchemaPropsOrBool) XXX_DiscardUnknown added in v1.16.0

func (m *JSONSchemaPropsOrBool) XXX_DiscardUnknown()

func (*JSONSchemaPropsOrBool) XXX_Marshal added in v1.16.0

func (m *JSONSchemaPropsOrBool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JSONSchemaPropsOrBool) XXX_Merge added in v1.16.0

func (m *JSONSchemaPropsOrBool) XXX_Merge(src proto.Message)

func (*JSONSchemaPropsOrBool) XXX_Size added in v1.16.0

func (m *JSONSchemaPropsOrBool) XXX_Size() int

func (*JSONSchemaPropsOrBool) XXX_Unmarshal added in v1.16.0

func (m *JSONSchemaPropsOrBool) XXX_Unmarshal(b []byte) error

type JSONSchemaPropsOrStringArray added in v1.16.0

type JSONSchemaPropsOrStringArray struct {
	Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"`
	// +listType=atomic
	Property []string `protobuf:"bytes,2,rep,name=property"`
}

JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.

func (*JSONSchemaPropsOrStringArray) DeepCopy added in v1.16.0

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

func (*JSONSchemaPropsOrStringArray) DeepCopyInto added in v1.16.0

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

func (*JSONSchemaPropsOrStringArray) Descriptor added in v1.16.0

func (*JSONSchemaPropsOrStringArray) Descriptor() ([]byte, []int)

func (*JSONSchemaPropsOrStringArray) Marshal added in v1.16.0

func (m *JSONSchemaPropsOrStringArray) Marshal() (dAtA []byte, err error)

func (*JSONSchemaPropsOrStringArray) MarshalTo added in v1.16.0

func (m *JSONSchemaPropsOrStringArray) MarshalTo(dAtA []byte) (int, error)

func (*JSONSchemaPropsOrStringArray) MarshalToSizedBuffer added in v1.16.0

func (m *JSONSchemaPropsOrStringArray) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (JSONSchemaPropsOrStringArray) OpenAPISchemaFormat added in v1.16.0

func (_ JSONSchemaPropsOrStringArray) OpenAPISchemaFormat() string

OpenAPISchemaFormat is used by the kube-openapi generator when constructing the OpenAPI spec of this type.

func (JSONSchemaPropsOrStringArray) OpenAPISchemaType added in v1.16.0

func (_ JSONSchemaPropsOrStringArray) OpenAPISchemaType() []string

OpenAPISchemaType is used by the kube-openapi generator when constructing the OpenAPI spec of this type.

See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators

func (*JSONSchemaPropsOrStringArray) ProtoMessage added in v1.16.0

func (*JSONSchemaPropsOrStringArray) ProtoMessage()

func (*JSONSchemaPropsOrStringArray) Reset added in v1.16.0

func (m *JSONSchemaPropsOrStringArray) Reset()

func (*JSONSchemaPropsOrStringArray) Size added in v1.16.0

func (m *JSONSchemaPropsOrStringArray) Size() (n int)

func (*JSONSchemaPropsOrStringArray) String added in v1.16.0

func (this *JSONSchemaPropsOrStringArray) String() string

func (*JSONSchemaPropsOrStringArray) Unmarshal added in v1.16.0

func (m *JSONSchemaPropsOrStringArray) Unmarshal(dAtA []byte) error

func (*JSONSchemaPropsOrStringArray) XXX_DiscardUnknown added in v1.16.0

func (m *JSONSchemaPropsOrStringArray) XXX_DiscardUnknown()

func (*JSONSchemaPropsOrStringArray) XXX_Marshal added in v1.16.0

func (m *JSONSchemaPropsOrStringArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JSONSchemaPropsOrStringArray) XXX_Merge added in v1.16.0

func (m *JSONSchemaPropsOrStringArray) XXX_Merge(src proto.Message)

func (*JSONSchemaPropsOrStringArray) XXX_Size added in v1.16.0

func (m *JSONSchemaPropsOrStringArray) XXX_Size() int

func (*JSONSchemaPropsOrStringArray) XXX_Unmarshal added in v1.16.0

func (m *JSONSchemaPropsOrStringArray) XXX_Unmarshal(b []byte) error

type JSONSchemaURL added in v1.16.0

type JSONSchemaURL string

JSONSchemaURL represents a schema url.

type ValidationRule added in v1.16.0

type ValidationRule struct {
	// Rule represents the expression which will be evaluated by CEL.
	// ref: https://github.com/google/cel-spec
	// The Rule is scoped to the location of the x-kubernetes-validations extension in the schema.
	// The `self` variable in the CEL expression is bound to the scoped value.
	// Example:
	// - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"}
	//
	// If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable
	// via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as
	// absent fields in CEL expressions.
	// If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map
	// are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map
	// are accessible via CEL macros and functions such as `self.all(...)`.
	// If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and
	// functions.
	// If the Rule is scoped to a scalar, `self` is bound to the scalar value.
	// Examples:
	// - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority < 10"}
	// - Rule scoped to a list of integers: {"rule": "self.values.all(value, value >= 0 && value < 100)"}
	// - Rule scoped to a string value: {"rule": "self.startsWith('kube')"}
	//
	// The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the
	// object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible.
	//
	// Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL
	// expressions. This includes:
	// - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields.
	// - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as:
	//   - A schema with no type and x-kubernetes-preserve-unknown-fields set to true
	//   - An array where the items schema is of an "unknown type"
	//   - An object where the additionalProperties schema is of an "unknown type"
	//
	// Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.
	// Accessible property names are escaped according to the following rules when accessed in the expression:
	// - '__' escapes to '__underscores__'
	// - '.' escapes to '__dot__'
	// - '-' escapes to '__dash__'
	// - '/' escapes to '__slash__'
	// - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:
	//	  "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if",
	//	  "import", "let", "loop", "package", "namespace", "return".
	// Examples:
	//   - Rule accessing a property named "namespace": {"rule": "self.__namespace__ > 0"}
	//   - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop > 0"}
	//   - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d > 0"}
	//
	// Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1].
	// Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:
	//   - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and
	//     non-intersecting elements in `Y` are appended, retaining their partial order.
	//   - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values
	//     are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with
	//     non-intersecting keys are appended, retaining their partial order.
	//
	// If `rule` makes use of the `oldSelf` variable it is implicitly a
	// `transition rule`.
	//
	// By default, the `oldSelf` variable is the same type as `self`.
	// When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional
	//  variable whose value() is the same type as `self`.
	// See the documentation for the `optionalOldSelf` field for details.
	//
	// Transition rules by default are applied only on UPDATE requests and are
	// skipped if an old value could not be found. You can opt a transition
	// rule into unconditional evaluation by setting `optionalOldSelf` to true.
	//
	Rule string `json:"rule" protobuf:"bytes,1,opt,name=rule"`
	// Message represents the message displayed when validation fails. The message is required if the Rule contains
	// line breaks. The message must not contain line breaks.
	// If unset, the message is "failed rule: {Rule}".
	// e.g. "must be a URL with the host matching spec.host"
	Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
	// MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.
	// Since messageExpression is used as a failure message, it must evaluate to a string.
	// If both message and messageExpression are present on a rule, then messageExpression will be used if validation
	// fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced
	// as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string
	// that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and
	// the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.
	// messageExpression has access to all the same variables as the rule; the only difference is the return type.
	// Example:
	// "x must be less than max ("+string(self.max)+")"
	// +optional
	MessageExpression string `json:"messageExpression,omitempty" protobuf:"bytes,3,opt,name=messageExpression"`
	// reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule.
	// The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule.
	// The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate".
	// If not set, default to use "FieldValueInvalid".
	// All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid.
	// +optional
	Reason *FieldValueErrorReason `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
	// fieldPath represents the field path returned when the validation fails.
	// It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field.
	// e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo`
	// If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList`
	// It does not support list numeric index.
	// It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info.
	// Numeric index of array is not supported.
	// For field name which contains special characters, use `['specialName']` to refer the field name.
	// e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']`
	// +optional
	FieldPath string `json:"fieldPath,omitempty" protobuf:"bytes,5,opt,name=fieldPath"`

	// optionalOldSelf is used to opt a transition rule into evaluation
	// even when the object is first created, or if the old object is
	// missing the value.
	//
	// When enabled `oldSelf` will be a CEL optional whose value will be
	// `None` if there is no old value, or when the object is initially created.
	//
	// You may check for presence of oldSelf using `oldSelf.hasValue()` and
	// unwrap it after checking using `oldSelf.value()`. Check the CEL
	// documentation for Optional types for more information:
	// https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes
	//
	// May not be set unless `oldSelf` is used in `rule`.
	//
	// +featureGate=CRDValidationRatcheting
	// +optional
	OptionalOldSelf *bool `json:"optionalOldSelf,omitempty" protobuf:"bytes,6,opt,name=optionalOldSelf"`
}

ValidationRule describes a validation rule written in the CEL expression language.

func (*ValidationRule) DeepCopy added in v1.16.0

func (in *ValidationRule) DeepCopy() *ValidationRule

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

func (*ValidationRule) DeepCopyInto added in v1.16.0

func (in *ValidationRule) DeepCopyInto(out *ValidationRule)

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

func (*ValidationRule) Descriptor added in v1.16.0

func (*ValidationRule) Descriptor() ([]byte, []int)

func (*ValidationRule) Marshal added in v1.16.0

func (m *ValidationRule) Marshal() (dAtA []byte, err error)

func (*ValidationRule) MarshalTo added in v1.16.0

func (m *ValidationRule) MarshalTo(dAtA []byte) (int, error)

func (*ValidationRule) MarshalToSizedBuffer added in v1.16.0

func (m *ValidationRule) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ValidationRule) ProtoMessage added in v1.16.0

func (*ValidationRule) ProtoMessage()

func (*ValidationRule) Reset added in v1.16.0

func (m *ValidationRule) Reset()

func (*ValidationRule) Size added in v1.16.0

func (m *ValidationRule) Size() (n int)

func (*ValidationRule) String added in v1.16.0

func (this *ValidationRule) String() string

func (*ValidationRule) Unmarshal added in v1.16.0

func (m *ValidationRule) Unmarshal(dAtA []byte) error

func (*ValidationRule) XXX_DiscardUnknown added in v1.16.0

func (m *ValidationRule) XXX_DiscardUnknown()

func (*ValidationRule) XXX_Marshal added in v1.16.0

func (m *ValidationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ValidationRule) XXX_Merge added in v1.16.0

func (m *ValidationRule) XXX_Merge(src proto.Message)

func (*ValidationRule) XXX_Size added in v1.16.0

func (m *ValidationRule) XXX_Size() int

func (*ValidationRule) XXX_Unmarshal added in v1.16.0

func (m *ValidationRule) XXX_Unmarshal(b []byte) error

type ValidationRules added in v1.16.0

type ValidationRules []ValidationRule

ValidationRules describes a list of validation rules written in the CEL expression language.

func (ValidationRules) DeepCopy added in v1.16.0

func (in ValidationRules) DeepCopy() ValidationRules

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

func (ValidationRules) DeepCopyInto added in v1.16.0

func (in ValidationRules) DeepCopyInto(out *ValidationRules)

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