v1alpha1

package
v0.0.0-...-6a55101 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Overview

+k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=nodeset.k8s.io

Copyright 2017 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	NodeClassResourceFile      NodeClassResourceType = "File"
	NodeClassResourceReference NodeClassResourceType = "Reference"

	NodeClassResourcePlural = "nodeclasses"
	NodeSetResourcePlural   = "nodesets"

	NodeClassContentAnnotationKey     = "nodeset.k8s.io/nodeclass-content"
	NodeClassContentHashAnnotationKey = "nodeset.k8s.io/nodeclass-content-hash"
	NodeClassNameAnnotationKey        = "nodeset.k8s.io/node-class"

	NodeSetGenerationAnnotationKey = "nodeset.k8s.io/nodeset-generation"

	NodeSetNameLabelKey = "nodeset.k8s.io/nodeset"
	ControllerLabelKey  = "nodeset.k8s.io/controller"
)
View Source
const GroupName = "nodeset.k8s.io"

GroupName is the group name use in this package

View Source
const GroupVersion = "v1alpha1"

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion}

SchemeGroupVersion is group version used to register these objects

Functions

func RegisterDefaults

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 a Group qualified GroupResource

Types

type NodeClass

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

	// Standard object's metadata.
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// NodeController specifes which node controller should provision and
	// control this class of nodes
	NodeController string `json:"nodeController,omitempty"`

	// NodeLabels specifies a list of labels each node should get.
	NodeLabels map[string]string `json:"nodeLabels,omitempty"`

	// Config is free form data containing overridable parameters that the controller
	// will use
	// +optional
	Config runtime.RawExtension `json:"config,omitempty"`

	// Resources is a list of file-like resources that the controller can use
	// +optional
	Resources []NodeClassResource `json:"resources,omitempty"`
}

NodeClass describes the parameters for a class of nodes that can be provisioned by the specific controller

func (*NodeClass) DeepCopy

func (in *NodeClass) DeepCopy() *NodeClass

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

func (*NodeClass) DeepCopyInto

func (in *NodeClass) DeepCopyInto(out *NodeClass)

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

func (*NodeClass) DeepCopyObject

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

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

type NodeClassList

type NodeClassList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is the list of NodeClasses
	Items []NodeClass `json:"items"`
}

NodeClassList is a collection of node classes.

func (*NodeClassList) DeepCopy

func (in *NodeClassList) DeepCopy() *NodeClassList

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

func (*NodeClassList) DeepCopyInto

func (in *NodeClassList) DeepCopyInto(out *NodeClassList)

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

func (*NodeClassList) DeepCopyObject

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

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

type NodeClassResource

type NodeClassResource struct {
	// Type is the type of the resource
	Type NodeClassResourceType `json:"type,omitempty"`

	// Name is the name of the resource
	// It can be used as a key for overriding
	Name string `json:"name,omitempty"`

	// For File type
	// Path is the full path of the file including filename
	// +optional
	Path string `json:"path,omitempty"`
	// Owner is the owner of the file
	// +optional
	Owner string `json:"owner,omitempty"`
	// Permission is the permission of the file
	// +optional
	Permission string `json:"permission,omitempty"`
	// Template is the template or content of the file
	// +optional
	Template string `json:"template,omitempty"`

	// For Reference type
	// Reference points to an Object in registry that the controller will use when
	// provisioning the node
	// Ex. a secret ref to be used as ssh credentials.
	// +optional
	Reference *corev1.ObjectReference `json:"reference,omitempty"`
}

func (*NodeClassResource) DeepCopy

func (in *NodeClassResource) DeepCopy() *NodeClassResource

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

func (*NodeClassResource) DeepCopyInto

func (in *NodeClassResource) DeepCopyInto(out *NodeClassResource)

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

type NodeClassResourceType

type NodeClassResourceType string

type NodeSet

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

	// Standard object's metadata.
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Specification of desired behavior of the NodeSet.
	// +optional
	Spec NodeSetSpec `json:"spec,omitempty"`

	// Most recently observed status of the NodeSet.
	// This data may not be up to date.
	// Populated by the system.
	// Read-only.
	// +optional
	Status NodeSetStatus `json:"status,omitempty"`
}

NodeSet is a set of nodes of the same class.

func (*NodeSet) DeepCopy

func (in *NodeSet) DeepCopy() *NodeSet

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

func (*NodeSet) DeepCopyInto

func (in *NodeSet) DeepCopyInto(out *NodeSet)

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

func (*NodeSet) DeepCopyObject

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

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

type NodeSetCondition

type NodeSetCondition struct {
	// Type of NodeSet condition.
	Type NodeSetConditionType `json:"type"`

	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`

	// The last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

	// The reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`

	// A human readable message indicating details about the transition.
	// +optional
	Message string `json:"message,omitempty"`
}

NodeSetCondition describes the state of a NodeSet at a certain point.

func (*NodeSetCondition) DeepCopy

func (in *NodeSetCondition) DeepCopy() *NodeSetCondition

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

func (*NodeSetCondition) DeepCopyInto

func (in *NodeSetCondition) DeepCopyInto(out *NodeSetCondition)

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

type NodeSetConditionType

type NodeSetConditionType string
const (
	// This is added when the NodeSet controllers failed to create or delete a node during
	// reconciliation.
	NodeSetReplicaFailure NodeSetConditionType = "ReplicaFailure"
)

type NodeSetList

type NodeSetList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is the list of NodeSets
	Items []NodeSet `json:"items"`
}

NodeSetList is a collection of nodesets.

func (*NodeSetList) DeepCopy

func (in *NodeSetList) DeepCopy() *NodeSetList

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

func (*NodeSetList) DeepCopyInto

func (in *NodeSetList) DeepCopyInto(out *NodeSetList)

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

func (*NodeSetList) DeepCopyObject

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

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

type NodeSetSpec

type NodeSetSpec struct {
	// NodeSelector is a selector of node labels which a node must have to be in the NodeSet.
	// More info: http://kubernetes.io/docs/user-guide/node-selection/README
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// NodeClass specifies which NodeClass the nodes created by this NodeSet should
	// belong to
	NodeClass string `json:"nodeClass,omitempty"`

	// NodeSetController specifies a NodeSet controller to be in charge of this NodeSet
	// If not specified, the default one that comes with the NodeController in NodeClass
	// will be used.
	// +optional
	NodeSetController string `json:"nodeSetController,omitempty"`

	// Replicas is the number of desired replicas.
	Replicas int32 `json:"replicas,omitempty"`

	// The maximum number of Nodes that can be unavailable during update
	// This can be an absolute number (ex. 3) or a percentage of total replicas
	// The absolute number will be calculated from percentage by rounding down.
	// This can't be 0 if MaxSurge is 0.
	// By default, a value of 0 is used
	// +optional
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`

	// The maximum number of Nodes that can be created above the desired replicas.
	// This can be an absolute number (ex. 3) or a percentage of total replicas
	// The absolute number will be calculated from percentage by rounding up.
	// This can't be 0 if MaxUnavailble is 0.
	// A default of 1 is used if not set.
	// +optional
	MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"`

	// Config contains free form structural data that overrides those in NodeClass.
	// +optional
	Config runtime.RawExtension `json:"config,omitempty"`
}

NodeSetSpec is the spec of a node set.

func (*NodeSetSpec) DeepCopy

func (in *NodeSetSpec) DeepCopy() *NodeSetSpec

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

func (*NodeSetSpec) DeepCopyInto

func (in *NodeSetSpec) DeepCopyInto(out *NodeSetSpec)

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

type NodeSetStatus

type NodeSetStatus struct {
	// Replicas is the number of actual replicas.
	Replicas int32 `json:"replicas"`

	// The number of replicas with running status for this NodeSet.
	// +optional
	RunningReplicas int32 `json:"runningReplicas,omitempty"`

	// ObservedGeneration is the most recent generation observed by the controller.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Represents the latest available observations of the NodeSet's current state.
	// +optional
	Conditions []NodeSetCondition `json:"conditions,omitempty"`
}

NodeSetStatus is the status of a nodeset

func (*NodeSetStatus) DeepCopy

func (in *NodeSetStatus) DeepCopy() *NodeSetStatus

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

func (*NodeSetStatus) DeepCopyInto

func (in *NodeSetStatus) DeepCopyInto(out *NodeSetStatus)

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