v1

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package v1 contains API Schema definitions for the dana v1 API group +kubebuilder:object:generate=true +groupName=dana.hns.io

Index

Constants

View Source
const (
	SNSNamespace      = "sns-system"
	SNSServiceAccount = "default"
)
View Source
const (
	Root   string = "root"
	NoRole string = "none"
	Leaf   string = "leaf"
	True   string = "True"
	False  string = "False"
)
View Source
const (
	NsFinalizer = MetaGroup + "delete-sns"
	RbFinalizer = MetaGroup + "delete-rb"
)
View Source
const (
	SelfOffset   = 0
	ParentOffset = -1
	ChildOffset  = 1
)
View Source
const (
	Hns          = MetaGroup + "subnamespace"
	Parent       = MetaGroup + "parent"
	ResourcePool = MetaGroup + "resourcepool"
)
View Source
const (
	Role                 = MetaGroup + "role"
	Depth                = MetaGroup + "depth"
	CrqSelector          = MetaGroup + "crq-selector"
	RootCrqSelector      = CrqSelector + "-0"
	SnsPointer           = MetaGroup + "sns-pointer"
	RqDepth              = MetaGroup + "rq-depth"
	IsRq                 = MetaGroup + "is-rq"
	IsSecondaryRoot      = MetaGroup + "is-secondary-root"
	IsUpperRp            = MetaGroup + "is-upper-rp"
	UpperRp              = MetaGroup + "upper-rp"
	CrqPointer           = MetaGroup + "crq-pointer"
	DisplayName          = MetaGroup + "display-name"
	Description          = MetaGroup + "description"
	OpenShiftDisplayName = "openshift.io/display-name"
)
View Source
const (
	MaxRetries   = 600
	SleepTimeout = 500
)
View Source
const MetaGroup = "dana.hns.io/"

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "dana.hns.io", Version: "v1"}

	// 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 DefaultAnnotations = []string{"scheduler.alpha.kubernetes.io/defaultTolerations", "openshift.io/node-selector"}

Functions

This section is empty.

Types

type MigrationHierarchy

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

	Spec   MigrationHierarchySpec   `json:"spec,omitempty"`
	Status MigrationHierarchyStatus `json:"status,omitempty"`
}

MigrationHierarchy is the Schema for the migrationhierarchies API

func (*MigrationHierarchy) DeepCopy

func (in *MigrationHierarchy) DeepCopy() *MigrationHierarchy

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

func (*MigrationHierarchy) DeepCopyInto

func (in *MigrationHierarchy) DeepCopyInto(out *MigrationHierarchy)

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

func (*MigrationHierarchy) DeepCopyObject

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

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

type MigrationHierarchyList

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

MigrationHierarchyList contains a list of MigrationHierarchy

func (*MigrationHierarchyList) DeepCopy

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

func (*MigrationHierarchyList) DeepCopyInto

func (in *MigrationHierarchyList) DeepCopyInto(out *MigrationHierarchyList)

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

func (*MigrationHierarchyList) DeepCopyObject

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

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

type MigrationHierarchySpec

type MigrationHierarchySpec struct {
	// CurrentNamespace is name of the Subnamespace that is being migrated
	CurrentNamespace string `json:"currentns"`

	// ToNamespace is the name of the Subnamespace that represents the new parent
	// of the Subnamespace that needs to be migrated
	ToNamespace string `json:"tons"`
}

MigrationHierarchySpec defines the desired state of MigrationHierarchy

func (*MigrationHierarchySpec) DeepCopy

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

func (*MigrationHierarchySpec) DeepCopyInto

func (in *MigrationHierarchySpec) DeepCopyInto(out *MigrationHierarchySpec)

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

type MigrationHierarchyStatus

type MigrationHierarchyStatus struct {
	// Phase acts like a state machine for the Migrationhierarchy.
	// It is a string and can be one of the following:
	// "Error" - state for a Migrationhierarchy indicating that the operation could not be completed due to an error
	// "Complete" - state for a Migrationhierarchy indicating that the operation completed successfully
	Phase Phase `json:"phase,omitempty"`

	// Reason is a string explaining why an error occurred if it did; otherwise it’s empty
	Reason string `json:"reason,omitempty"`
}

MigrationHierarchyStatus defines the observed state of MigrationHierarchy

func (*MigrationHierarchyStatus) DeepCopy

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

func (*MigrationHierarchyStatus) DeepCopyInto

func (in *MigrationHierarchyStatus) DeepCopyInto(out *MigrationHierarchyStatus)

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

type Namespaces

type Namespaces struct {
	// Namespace is the name of a Subnamespace
	Namespace string `json:"namespace,omitempty"`

	// ResourceQuotaSpec represents the quota allocated to the Subnamespace
	ResourceQuotaSpec v1.ResourceQuotaSpec `json:"resourcequota,omitempty"`
}

func (*Namespaces) DeepCopy

func (in *Namespaces) DeepCopy() *Namespaces

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

func (*Namespaces) DeepCopyInto

func (in *Namespaces) DeepCopyInto(out *Namespaces)

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

type Phase

type Phase string
const (
	Missing    Phase = "Missing"
	Created    Phase = "Created"
	None       Phase = ""
	Migrated   Phase = "Migrated"
	Complete   Phase = "Complete"
	InProgress Phase = "InProgress"
	Error      Phase = "Error"
)

type Subnamespace

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

	Spec   SubnamespaceSpec   `json:"spec,omitempty"`
	Status SubnamespaceStatus `json:"status,omitempty"`
}

Subnamespace is the Schema for the subnamespaces API

func (*Subnamespace) DeepCopy

func (in *Subnamespace) DeepCopy() *Subnamespace

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

func (*Subnamespace) DeepCopyInto

func (in *Subnamespace) DeepCopyInto(out *Subnamespace)

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

func (*Subnamespace) DeepCopyObject

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

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

type SubnamespaceList

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

SubnamespaceList contains a list of Subnamespace

func (*SubnamespaceList) DeepCopy

func (in *SubnamespaceList) DeepCopy() *SubnamespaceList

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

func (*SubnamespaceList) DeepCopyInto

func (in *SubnamespaceList) DeepCopyInto(out *SubnamespaceList)

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

func (*SubnamespaceList) DeepCopyObject

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

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

type SubnamespaceSpec

type SubnamespaceSpec struct {
	// ResourceQuotaSpec represents the limitations that are associated with the Subnamespace.
	// This quota represents both the resources that can be allocated to children Subnamespaces
	// and the overall maximum quota consumption of the current Subnamespace and its children.
	ResourceQuotaSpec v1.ResourceQuotaSpec `json:"resourcequota,omitempty"`

	// The name of the namespace that this Subnamespace is bound to
	NamespaceRef namespaceRef `json:"namespaceRef,omitempty"`
}

SubnamespaceSpec defines the desired state of Subnamespace

func (*SubnamespaceSpec) DeepCopy

func (in *SubnamespaceSpec) DeepCopy() *SubnamespaceSpec

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

func (*SubnamespaceSpec) DeepCopyInto

func (in *SubnamespaceSpec) DeepCopyInto(out *SubnamespaceSpec)

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

type SubnamespaceStatus

type SubnamespaceStatus struct {
	// Phase acts like a state machine for the Subnamespace.
	// It is a string and can be one of the following:
	// "" (Empty) - state for a Subnameapce that is being reconciled for the first time.
	// "Missing" - state for a Subnamespace that does not currently have a namespace bound to it
	// "Created" - state for a Subnamespace that exists and has a namespace bound to it and is being synced
	// "Migrated" - state for a Subnamespace that is currently undergoing migration to a different hierarchy
	Phase Phase `json:"phase,omitempty"`

	// Namespaces is an array of (name, ResourceQuotaSpec) pairs which are logically under the
	// Subnamespace in the hierarchy.
	Namespaces []Namespaces `json:"namespaces,omitempty"`

	// Total represents a summary of the resources allocated to children Subnamespaces
	// and the resources that are still free to allocate, from the total resources made
	// available in the ResourceQuotaSpec field in Spec
	Total Total `json:"total,omitempty"`
}

SubnamespaceStatus defines the observed state of Subnamespace

func (*SubnamespaceStatus) DeepCopy

func (in *SubnamespaceStatus) DeepCopy() *SubnamespaceStatus

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

func (*SubnamespaceStatus) DeepCopyInto

func (in *SubnamespaceStatus) DeepCopyInto(out *SubnamespaceStatus)

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

type Total

type Total struct {
	// Allocated is a set of (resource name, quantity) pairs representing the total resources that
	// are allocated to the children Subnamespaces of a Subnamespace.
	Allocated v1.ResourceList `json:"allocated,omitempty"`

	// Free is a set of (resource name, quantity) pairs representing the total free/available/allocatable
	// resources that can still be allocated to the children Subnamespaces of a Subnamespace.
	Free v1.ResourceList `json:"free,omitempty"`
}

func (*Total) DeepCopy

func (in *Total) DeepCopy() *Total

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

func (*Total) DeepCopyInto

func (in *Total) DeepCopyInto(out *Total)

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

type Updatequota

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

	Spec   UpdatequotaSpec   `json:"spec,omitempty"`
	Status UpdatequotaStatus `json:"status,omitempty"`
}

Updatequota is the Schema for the updatequota API

func (*Updatequota) DeepCopy

func (in *Updatequota) DeepCopy() *Updatequota

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

func (*Updatequota) DeepCopyInto

func (in *Updatequota) DeepCopyInto(out *Updatequota)

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

func (*Updatequota) DeepCopyObject

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

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

type UpdatequotaList

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

UpdatequotaList contains a list of Updatequota

func (*UpdatequotaList) DeepCopy

func (in *UpdatequotaList) DeepCopy() *UpdatequotaList

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

func (*UpdatequotaList) DeepCopyInto

func (in *UpdatequotaList) DeepCopyInto(out *UpdatequotaList)

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

func (*UpdatequotaList) DeepCopyObject

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

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

type UpdatequotaSpec

type UpdatequotaSpec struct {
	// ResourceQuotaSpec represents resources that need to be transferred
	// from one Subnamespace to another
	ResourceQuotaSpec v1.ResourceQuotaSpec `json:"resourcequota"`

	// DestNamespace is the name of the Subnamespace to which resources need to be transferred
	DestNamespace string `json:"destns"`

	// SourceNamespace is name of the Subnamespace from which resources need to be transferred
	SourceNamespace string `json:"sourcens"`
}

UpdatequotaSpec defines the desired state of Updatequota

func (*UpdatequotaSpec) DeepCopy

func (in *UpdatequotaSpec) DeepCopy() *UpdatequotaSpec

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

func (*UpdatequotaSpec) DeepCopyInto

func (in *UpdatequotaSpec) DeepCopyInto(out *UpdatequotaSpec)

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

type UpdatequotaStatus

type UpdatequotaStatus struct {
	// Phase acts like a state machine for the Updatequota.
	// It is a string and can be one of the following:
	// "Error" - state for an Updatequota indicating that the operation could not be completed due to an error
	// "Complete" - state for an Updatequota indicating that the operation completed successfully
	Phase Phase `json:"phase,omitempty"`

	// Reason is a string explaining why an error occurred if it did; otherwise it’s empty
	Reason string `json:"reason,omitempty"`
}

UpdatequotaStatus defines the observed state of Updatequota

func (*UpdatequotaStatus) DeepCopy

func (in *UpdatequotaStatus) DeepCopy() *UpdatequotaStatus

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

func (*UpdatequotaStatus) DeepCopyInto

func (in *UpdatequotaStatus) DeepCopyInto(out *UpdatequotaStatus)

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