v1alpha1

package
v0.7.2-beta.12 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: AGPL-3.0 Imports: 11 Imported by: 4

Documentation

Overview

+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=extensions.kubeblocks.io

Package v1alpha1 contains API Schema definitions for the extensions v1alpha1 API group +kubebuilder:object:generate=true +groupName=extensions.kubeblocks.io

Index

Constants

View Source
const (
	// condition types
	ConditionTypeProgressing = "Progressing"
	ConditionTypeChecked     = "InstallableChecked"
	ConditionTypeSucceed     = "Succeed"
	ConditionTypeFailed      = "Failed"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "extensions.kubeblocks.io", 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
)
View Source
var SchemeGroupVersion = GroupVersion

SchemeGroupVersion is group version used to register these objects.

Functions

func Resource added in v0.6.0

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Addon

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

	Spec   AddonSpec   `json:"spec,omitempty"`
	Status AddonStatus `json:"status,omitempty"`
}

Addon is the Schema for the add-ons API.

func (*Addon) DeepCopy added in v0.6.0

func (in *Addon) DeepCopy() *Addon

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

func (*Addon) DeepCopyInto added in v0.6.0

func (in *Addon) DeepCopyInto(out *Addon)

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

func (*Addon) DeepCopyObject added in v0.6.0

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

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

func (*Addon) GetExtraNames

func (r *Addon) GetExtraNames() []string

GetExtraNames extracts extra items' name.

type AddonDefaultInstallSpecItem

type AddonDefaultInstallSpecItem struct {
	AddonInstallSpec `json:",inline"`

	// Addon installs parameters selectors by default. If multiple selectors are provided,
	// all selectors must evaluate to true.
	// +optional
	Selectors []SelectorRequirement `json:"selectors,omitempty"`
}

func (*AddonDefaultInstallSpecItem) DeepCopy added in v0.6.0

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

func (*AddonDefaultInstallSpecItem) DeepCopyInto added in v0.6.0

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

func (AddonDefaultInstallSpecItem) GetSelectorsStrings

func (r AddonDefaultInstallSpecItem) GetSelectorsStrings() []string

GetSelectorsStrings extracts selectors to string representations.

type AddonInstallExtraItem

type AddonInstallExtraItem struct {
	AddonInstallSpecItem `json:",inline"`

	// Name of the item.
	// +kubebuilder:validation:Required
	Name string `json:"name"`
}

func (*AddonInstallExtraItem) DeepCopy added in v0.6.0

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

func (*AddonInstallExtraItem) DeepCopyInto added in v0.6.0

func (in *AddonInstallExtraItem) DeepCopyInto(out *AddonInstallExtraItem)

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

type AddonInstallSpec

type AddonInstallSpec struct {
	AddonInstallSpecItem `json:",inline"`

	// enabled can be set if there are no specific installation attributes to be set.
	// +optional
	Enabled bool `json:"enabled,omitempty"`

	// Installs spec. for extra items.
	// +patchMergeKey=name
	// +patchStrategy=merge,retainKeys
	// +listType=map
	// +listMapKey=name
	// +optional
	ExtraItems []AddonInstallExtraItem `json:"extras,omitempty"`
}

func (*AddonInstallSpec) DeepCopy added in v0.6.0

func (in *AddonInstallSpec) DeepCopy() *AddonInstallSpec

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

func (*AddonInstallSpec) DeepCopyInto added in v0.6.0

func (in *AddonInstallSpec) DeepCopyInto(out *AddonInstallSpec)

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

func (*AddonInstallSpec) GetEnabled

func (r *AddonInstallSpec) GetEnabled() bool

GetEnabled provides the Enabled property getter.

func (*AddonInstallSpec) HasSetValues

func (r *AddonInstallSpec) HasSetValues() bool

func (*AddonInstallSpec) IsDisabled

func (r *AddonInstallSpec) IsDisabled() bool

type AddonInstallSpecItem

type AddonInstallSpecItem struct {
	// Replicas value.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// Persistent Volume Enabled value.
	// +optional
	PVEnabled *bool `json:"persistentVolumeEnabled,omitempty"`

	// Storage class name.
	// +optional
	StorageClass string `json:"storageClass,omitempty"`

	// Tolerations JSON array string value.
	// +optional
	Tolerations string `json:"tolerations,omitempty"`

	// Resource requirements.
	// +optional
	Resources ResourceRequirements `json:"resources,omitempty"`
}

func NewAddonInstallSpecItem

func NewAddonInstallSpecItem() AddonInstallSpecItem

NewAddonInstallSpecItem creates an initialized AddonInstallSpecItem object.

func (*AddonInstallSpecItem) DeepCopy added in v0.6.0

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

func (*AddonInstallSpecItem) DeepCopyInto added in v0.6.0

func (in *AddonInstallSpecItem) DeepCopyInto(out *AddonInstallSpecItem)

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

func (AddonInstallSpecItem) IsEmpty

func (r AddonInstallSpecItem) IsEmpty() bool

type AddonList

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

AddonList contains a list of add-ons.

func (*AddonList) DeepCopy added in v0.6.0

func (in *AddonList) DeepCopy() *AddonList

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

func (*AddonList) DeepCopyInto added in v0.6.0

func (in *AddonList) DeepCopyInto(out *AddonList)

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

func (*AddonList) DeepCopyObject added in v0.6.0

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

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

type AddonPhase

type AddonPhase string

AddonPhase defines addon phases. +enum

const (
	AddonDisabled  AddonPhase = "Disabled"
	AddonEnabled   AddonPhase = "Enabled"
	AddonFailed    AddonPhase = "Failed"
	AddonEnabling  AddonPhase = "Enabling"
	AddonDisabling AddonPhase = "Disabling"
)

type AddonSelectorKey

type AddonSelectorKey string

AddonSelectorKey are selector requirement key types. +enum +kubebuilder:validation:Enum={KubeGitVersion,KubeVersion,KubeProvider}

const (
	KubeGitVersion AddonSelectorKey = "KubeGitVersion"
	KubeVersion    AddonSelectorKey = "KubeVersion"
	KubeProvider   AddonSelectorKey = "KubeProvider"
)

type AddonSpec

type AddonSpec struct {
	// Addon description.
	// +optional
	Description string `json:"description,omitempty"`

	// Add-on type. The valid value is helm.
	// +unionDiscriminator
	// +kubebuilder:validation:Required
	Type AddonType `json:"type"`

	// Helm installation spec. It's processed only when type=helm.
	// +optional
	Helm *HelmTypeInstallSpec `json:"helm,omitempty"`

	// Default installation parameters.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinItems=1
	DefaultInstallValues []AddonDefaultInstallSpecItem `json:"defaultInstallValues"`

	// Installation parameters.
	// +optional
	InstallSpec *AddonInstallSpec `json:"install,omitempty"`

	// Addon installable spec. It provides selector and auto-install settings.
	// +optional
	Installable *InstallableSpec `json:"installable,omitempty"`

	// Plugin installation spec.
	// +optional
	CliPlugins []CliPlugin `json:"cliPlugins,omitempty"`
}

AddonSpec defines the desired state of an add-on. +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Helm' ? has(self.helm) : !has(self.helm)",message="spec.helm is required when spec.type is Helm, and forbidden otherwise"

func (*AddonSpec) DeepCopy added in v0.6.0

func (in *AddonSpec) DeepCopy() *AddonSpec

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

func (*AddonSpec) DeepCopyInto added in v0.6.0

func (in *AddonSpec) DeepCopyInto(out *AddonSpec)

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

func (AddonSpec) GetSortedDefaultInstallValues

func (r AddonSpec) GetSortedDefaultInstallValues() []AddonDefaultInstallSpecItem

GetSortedDefaultInstallValues returns DefaultInstallValues items with items that have a provided selector first.

type AddonStatus

type AddonStatus struct {
	// Add-on installation phases. Valid values are Disabled, Enabled, Failed, Enabling, Disabling.
	// +kubebuilder:validation:Enum={Disabled,Enabled,Failed,Enabling,Disabling}
	Phase AddonPhase `json:"phase,omitempty"`

	// Describes the current state of add-on API installation conditions.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// observedGeneration is the most recent generation observed for this
	// add-on. It corresponds to the add-on's generation, which is
	// updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

AddonStatus defines the observed state of an add-on.

func (*AddonStatus) DeepCopy added in v0.6.0

func (in *AddonStatus) DeepCopy() *AddonStatus

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

func (*AddonStatus) DeepCopyInto added in v0.6.0

func (in *AddonStatus) DeepCopyInto(out *AddonStatus)

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

type AddonType

type AddonType string

AddonType defines the addon types. +enum +kubebuilder:validation:Enum={Helm}

const (
	HelmType AddonType = "Helm"
)

type CliPlugin added in v0.6.0

type CliPlugin struct {
	// Name of the plugin.
	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// The index repository of the plugin.
	// +kubebuilder:validation:Required
	IndexRepository string `json:"indexRepository"`

	// The description of the plugin.
	// +optional
	Description string `json:"description,omitempty"`
}

func (*CliPlugin) DeepCopy added in v0.6.0

func (in *CliPlugin) DeepCopy() *CliPlugin

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

func (*CliPlugin) DeepCopyInto added in v0.6.0

func (in *CliPlugin) DeepCopyInto(out *CliPlugin)

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

type DataObjectKeySelector

type DataObjectKeySelector struct {
	// Object name of the referent.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$`
	Name string `json:"name"` // need corev1.LocalObjectReference

	// The key to select.
	// +kubebuilder:validation:Required
	Key string `json:"key"`
}

func (*DataObjectKeySelector) DeepCopy added in v0.6.0

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

func (*DataObjectKeySelector) DeepCopyInto added in v0.6.0

func (in *DataObjectKeySelector) DeepCopyInto(out *DataObjectKeySelector)

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

type HelmInstallOptions

type HelmInstallOptions map[string]string

func (HelmInstallOptions) DeepCopy added in v0.6.0

func (in HelmInstallOptions) DeepCopy() HelmInstallOptions

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

func (HelmInstallOptions) DeepCopyInto added in v0.6.0

func (in HelmInstallOptions) DeepCopyInto(out *HelmInstallOptions)

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

type HelmInstallValues

type HelmInstallValues struct {
	// +optional
	URLs []string `json:"urls,omitempty"`

	// Selects a key of a ConfigMap item list. The value of ConfigMap can be
	// a JSON or YAML string content. Use a key name with ".json" or ".yaml" or ".yml"
	// extension name to specify a content type.
	// +optional
	ConfigMapRefs []DataObjectKeySelector `json:"configMapRefs,omitempty"`

	// Selects a key of a Secrets item list. The value of Secrets can be
	// a JSON or YAML string content. Use a key name with ".json" or ".yaml" or ".yml"
	// extension name to specify a content type.
	// +optional
	SecretRefs []DataObjectKeySelector `json:"secretRefs,omitempty"`

	// Helm install set values. It can specify multiple or separate values with commas(key1=val1,key2=val2).
	// +optional
	SetValues []string `json:"setValues,omitempty"`

	// Helm install set JSON values. It can specify multiple or separate values with commas(key1=jsonval1,key2=jsonval2).
	// +optional
	SetJSONValues []string `json:"setJSONValues,omitempty"`
}

func (*HelmInstallValues) DeepCopy added in v0.6.0

func (in *HelmInstallValues) DeepCopy() *HelmInstallValues

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

func (*HelmInstallValues) DeepCopyInto added in v0.6.0

func (in *HelmInstallValues) DeepCopyInto(out *HelmInstallValues)

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

type HelmJSONValueMapType

type HelmJSONValueMapType struct {
	// tolerations sets the toleration mapping key.
	// +optional
	Tolerations string `json:"tolerations,omitempty"`
}

func (*HelmJSONValueMapType) DeepCopy added in v0.6.0

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

func (*HelmJSONValueMapType) DeepCopyInto added in v0.6.0

func (in *HelmJSONValueMapType) DeepCopyInto(out *HelmJSONValueMapType)

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

type HelmTypeInstallSpec

type HelmTypeInstallSpec struct {
	// A Helm Chart location URL.
	// +kubebuilder:validation:Required
	ChartLocationURL string `json:"chartLocationURL"`

	// installOptions defines Helm release installation options.
	// +optional
	InstallOptions HelmInstallOptions `json:"installOptions,omitempty"`

	// HelmInstallValues defines Helm release installation set values.
	// +optional
	InstallValues HelmInstallValues `json:"installValues,omitempty"`

	// valuesMapping defines add-on normalized resources parameters mapped to Helm values' keys.
	// +optional
	ValuesMapping HelmValuesMapping `json:"valuesMapping,omitempty"`

	// chartsImage defines the image of Helm charts.
	// +optional
	ChartsImage string `json:"chartsImage,omitempty"`

	// chartsPathInImage defines the path of Helm charts in the image. It's used to copy
	// Helm charts from the image to the shared volume.
	// +kubeBuilder:default="/charts"
	// +optional
	ChartsPathInImage string `json:"chartsPathInImage,omitempty"`
}

HelmTypeInstallSpec defines the Helm installation spec. +kubebuilder:validation:XValidation:rule="self.chartLocationURL.startsWith('file://') ? has(self.chartsImage) : true",message="chartsImage is required when chartLocationURL starts with 'file://'"

func (*HelmTypeInstallSpec) BuildContainerArgs

func (r *HelmTypeInstallSpec) BuildContainerArgs(helmContainer *corev1.Container, installValues HelmInstallValues) error

BuildContainerArgs derives helm container args.

func (*HelmTypeInstallSpec) BuildMergedValues

func (r *HelmTypeInstallSpec) BuildMergedValues(installSpec *AddonInstallSpec) HelmInstallValues

BuildMergedValues merges values from a AddonInstallSpec and pre-set values.

func (*HelmTypeInstallSpec) DeepCopy added in v0.6.0

func (in *HelmTypeInstallSpec) DeepCopy() *HelmTypeInstallSpec

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

func (*HelmTypeInstallSpec) DeepCopyInto added in v0.6.0

func (in *HelmTypeInstallSpec) DeepCopyInto(out *HelmTypeInstallSpec)

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

type HelmValueMapType

type HelmValueMapType struct {
	// replicaCount sets the replicaCount value mapping key.
	// +optional
	ReplicaCount string `json:"replicaCount,omitempty"`

	// persistentVolumeEnabled sets the persistent volume enabled mapping key.
	// +optional
	PVEnabled string `json:"persistentVolumeEnabled,omitempty"`

	// storageClass sets the storageClass mapping key.
	// +optional
	StorageClass string `json:"storageClass,omitempty"`
}

func (*HelmValueMapType) DeepCopy added in v0.6.0

func (in *HelmValueMapType) DeepCopy() *HelmValueMapType

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

func (*HelmValueMapType) DeepCopyInto added in v0.6.0

func (in *HelmValueMapType) DeepCopyInto(out *HelmValueMapType)

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

type HelmValuesMapping

type HelmValuesMapping struct {
	HelmValuesMappingItem `json:",inline"`

	// Helm value mapping items for extra items.
	// +patchMergeKey=name
	// +patchStrategy=merge,retainKeys
	// +listType=map
	// +listMapKey=name
	// +optional
	ExtraItems []HelmValuesMappingExtraItem `json:"extras,omitempty"`
}

func (*HelmValuesMapping) DeepCopy added in v0.6.0

func (in *HelmValuesMapping) DeepCopy() *HelmValuesMapping

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

func (*HelmValuesMapping) DeepCopyInto added in v0.6.0

func (in *HelmValuesMapping) DeepCopyInto(out *HelmValuesMapping)

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

type HelmValuesMappingExtraItem

type HelmValuesMappingExtraItem struct {
	HelmValuesMappingItem `json:",inline"`

	// Name of the item.
	// +kubebuilder:validation:Required
	Name string `json:"name"`
}

func (*HelmValuesMappingExtraItem) DeepCopy added in v0.6.0

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

func (*HelmValuesMappingExtraItem) DeepCopyInto added in v0.6.0

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

type HelmValuesMappingItem

type HelmValuesMappingItem struct {
	// valueMap define the "key" mapping values. Valid keys are replicaCount,
	// persistentVolumeEnabled, and storageClass. Enum values explained:
	// `"replicaCount"` sets the replicaCount value mapping key.
	// `"persistentVolumeEnabled"` sets the persistent volume enabled mapping key.
	// `"storageClass"` sets the storageClass mapping key.
	// +optional
	HelmValueMap HelmValueMapType `json:"valueMap,omitempty"`

	// jsonMap defines the "key" mapping values. The valid key is tolerations.
	// Enum values explained:
	// `"tolerations"` sets the toleration mapping key.
	// +optional
	HelmJSONMap HelmJSONValueMapType `json:"jsonMap,omitempty"`

	// resources sets resources related mapping keys.
	// +optional
	ResourcesMapping *ResourceMappingItem `json:"resources,omitempty"`
}

func (*HelmValuesMappingItem) DeepCopy added in v0.6.0

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

func (*HelmValuesMappingItem) DeepCopyInto added in v0.6.0

func (in *HelmValuesMappingItem) DeepCopyInto(out *HelmValuesMappingItem)

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

type InstallableSpec

type InstallableSpec struct {
	// Add-on installable selectors. If multiple selectors are provided,
	// all selectors must evaluate to true.
	// +optional
	Selectors []SelectorRequirement `json:"selectors,omitempty"`

	// autoInstall defines an add-on should be installed automatically.
	// +kubebuilder:default=false
	AutoInstall bool `json:"autoInstall"`
}

func (*InstallableSpec) DeepCopy added in v0.6.0

func (in *InstallableSpec) DeepCopy() *InstallableSpec

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

func (*InstallableSpec) DeepCopyInto added in v0.6.0

func (in *InstallableSpec) DeepCopyInto(out *InstallableSpec)

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

func (*InstallableSpec) GetSelectorsStrings

func (r *InstallableSpec) GetSelectorsStrings() []string

GetSelectorsStrings extracts selectors to string representations.

type LineSelectorOperator

type LineSelectorOperator string

LineSelectorOperator defines line selector operators. +enum +kubebuilder:validation:Enum={Contains,DoesNotContain,MatchRegex,DoesNotMatchRegex}

const (
	Contains          LineSelectorOperator = "Contains"
	DoesNotContain    LineSelectorOperator = "DoesNotContain"
	MatchRegex        LineSelectorOperator = "MatchRegex"
	DoesNotMatchRegex LineSelectorOperator = "DoesNotMatchRegex"
)

type ResourceMappingItem

type ResourceMappingItem struct {

	// storage sets the storage size value mapping key.
	// +optional
	Storage string `json:"storage,omitempty"`

	// cpu sets CPU requests and limits mapping keys.
	// +optional
	CPU *ResourceReqLimItem `json:"cpu,omitempty"`

	// memory sets Memory requests and limits mapping keys.
	// +optional
	Memory *ResourceReqLimItem `json:"memory,omitempty"`
}

func (*ResourceMappingItem) DeepCopy added in v0.6.0

func (in *ResourceMappingItem) DeepCopy() *ResourceMappingItem

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

func (*ResourceMappingItem) DeepCopyInto added in v0.6.0

func (in *ResourceMappingItem) DeepCopyInto(out *ResourceMappingItem)

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

func (*ResourceMappingItem) HasCPULimMapping

func (r *ResourceMappingItem) HasCPULimMapping() bool

func (*ResourceMappingItem) HasCPUReqMapping

func (r *ResourceMappingItem) HasCPUReqMapping() bool

func (*ResourceMappingItem) HasMemLimMapping

func (r *ResourceMappingItem) HasMemLimMapping() bool

func (*ResourceMappingItem) HasMemReqMapping

func (r *ResourceMappingItem) HasMemReqMapping() bool

func (*ResourceMappingItem) HasStorageMapping

func (r *ResourceMappingItem) HasStorageMapping() bool

type ResourceReqLimItem

type ResourceReqLimItem struct {
	// Requests value mapping key.
	// +optional
	Requests string `json:"requests,omitempty"`

	// Limits value mapping key.
	// +optional
	Limits string `json:"limits,omitempty"`
}

func (*ResourceReqLimItem) DeepCopy added in v0.6.0

func (in *ResourceReqLimItem) DeepCopy() *ResourceReqLimItem

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

func (*ResourceReqLimItem) DeepCopyInto added in v0.6.0

func (in *ResourceReqLimItem) DeepCopyInto(out *ResourceReqLimItem)

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

type ResourceRequirements

type ResourceRequirements struct {
	// Limits describes the maximum amount of compute resources allowed.
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/.
	// +optional
	Limits corev1.ResourceList `json:"limits,omitempty"`
	// Requests describes the minimum amount of compute resources required.
	// If Requests is omitted for a container, it defaults to Limits if that is explicitly specified;
	// otherwise, it defaults to an implementation-defined value.
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/.
	// +optional
	Requests corev1.ResourceList `json:"requests,omitempty"`
}

func (*ResourceRequirements) DeepCopy added in v0.6.0

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

func (*ResourceRequirements) DeepCopyInto added in v0.6.0

func (in *ResourceRequirements) DeepCopyInto(out *ResourceRequirements)

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

type SelectorRequirement

type SelectorRequirement struct {
	// The selector key. Valid values are KubeVersion, KubeGitVersion and KubeProvider.
	// "KubeVersion" the semver expression of Kubernetes versions, i.e., v1.24.
	// "KubeGitVersion" may contain distro. info., i.e., v1.24.4+eks.
	// "KubeProvider" the Kubernetes provider, i.e., aws,gcp,azure,huaweiCloud,tencentCloud etc.
	// +kubebuilder:validation:Required
	Key AddonSelectorKey `json:"key"`

	// Represents a key's relationship to a set of values.
	// Valid operators are Contains, NotIn, DoesNotContain, MatchRegex, and DoesNoteMatchRegex.
	//
	// Possible enum values:
	// `"Contains"` line contains a string.
	// `"DoesNotContain"` line does not contain a string.
	// `"MatchRegex"` line contains a match to the regular expression.
	// `"DoesNotMatchRegex"` line does not contain a match to the regular expression.
	// +kubebuilder:validation:Required
	Operator LineSelectorOperator `json:"operator"`

	// An array of string values. It serves as an "OR" expression to the operator.
	// +optional
	Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
}

func (*SelectorRequirement) DeepCopy added in v0.6.0

func (in *SelectorRequirement) DeepCopy() *SelectorRequirement

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

func (*SelectorRequirement) DeepCopyInto added in v0.6.0

func (in *SelectorRequirement) DeepCopyInto(out *SelectorRequirement)

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

func (SelectorRequirement) MatchesFromConfig

func (r SelectorRequirement) MatchesFromConfig() bool

MatchesFromConfig matches the selector requirement value.

func (SelectorRequirement) String

func (r SelectorRequirement) String() string

Jump to

Keyboard shortcuts

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