cluster

package
v0.0.0-...-c1738d7 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Copyright 2017 The Archon 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.

Copyright 2016 The Archon 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 (
	// TODO: Populate defaults when a new resource is created. So we don't have use
	// "" as a meaningful and the default state
	InstancePending      InstancePhase = "Pending"
	InstanceInitializing InstancePhase = "Initializing"
	InstanceRunning      InstancePhase = "Running"
	InstanceFailed       InstancePhase = "Failed"
	InstanceUnknown      InstancePhase = "Unknown"

	InstanceReclaimRecycle InstanceReclaimPolicy = "Recycle"
	InstanceReclaimDelete  InstanceReclaimPolicy = "Delete"

	InstanceOSCoreOS string = "CoreOS"
	InstanceOSUbuntu string = "Ubuntu"
	InstanceOSCentOS string = "CentOS"

	// Instance with this annotation will be removed first if InstanceGroup controller
	// is scaling down an InstanceGroup
	InstanceToBeRemovedAnnotation string = AnnotationPrefix + "to-be-removed"
)
View Source
const AnnotationPrefix = "archon.kubeup.com/"
View Source
const GroupName = "archon.kubeup.com"

GroupName is the group name use in this package

View Source
const GroupVersion = "v1"
View Source
const InitializerKey = "initializers"

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 InstanceStatusEqual

func InstanceStatusEqual(l, r InstanceStatus) bool

func IsInstanceAvailable

func IsInstanceAvailable(instance *Instance, minReadySeconds int32, now metav1.Time) bool

IsInstanceAvailable returns true if a instance is available; false otherwise. Precondition for an available instance is that it must be ready. On top of that, there are two cases when a instance can be considered available: 1. minReadySeconds == 0, or 2. LastTransitionTime (is set) + minReadySeconds < current time

func IsInstanceReady

func IsInstanceReady(instance *Instance) bool

IsInstanceReady returns true if a instance is ready; false otherwise.

func IsInstanceReadyConditionTrue

func IsInstanceReadyConditionTrue(status InstanceStatus) bool

IsInstanceReady retruns true if a instance is ready; false otherwise.

func IsInstanceToBeRemoved

func IsInstanceToBeRemoved(instance *Instance) bool

IsInstanceToBeRemoved returns true if ToBeRemove annotation is there

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 ReservedInstanceToInstance

func ReservedInstanceToInstance(ri *ReservedInstance, i *Instance)

func SetDefaults_Instance

func SetDefaults_Instance(obj *Instance)

func SetDefaults_InstanceGroup

func SetDefaults_InstanceGroup(obj *InstanceGroup)

func SetDefaults_Network

func SetDefaults_Network(obj *Network)

func SetDefaults_ReservedInstance

func SetDefaults_ReservedInstance(obj *ReservedInstance)

func SetObjectDefaults_Instance

func SetObjectDefaults_Instance(in *Instance)

func SetObjectDefaults_InstanceGroup

func SetObjectDefaults_InstanceGroup(in *InstanceGroup)

func SetObjectDefaults_InstanceGroupList

func SetObjectDefaults_InstanceGroupList(in *InstanceGroupList)

func SetObjectDefaults_InstanceList

func SetObjectDefaults_InstanceList(in *InstanceList)

func SetObjectDefaults_Network

func SetObjectDefaults_Network(in *Network)

func SetObjectDefaults_NetworkList

func SetObjectDefaults_NetworkList(in *NetworkList)

func SetObjectDefaults_ReservedInstance

func SetObjectDefaults_ReservedInstance(in *ReservedInstance)

func SetObjectDefaults_ReservedInstanceList

func SetObjectDefaults_ReservedInstanceList(in *ReservedInstanceList)

Types

type ConfigSpec

type ConfigSpec struct {
	Name string            `json:"name,omitempty"`
	Data map[string]string `json:"data,omitempty"`
}

func (*ConfigSpec) CodecDecodeSelf

func (x *ConfigSpec) CodecDecodeSelf(d *codec1978.Decoder)

func (*ConfigSpec) CodecEncodeSelf

func (x *ConfigSpec) CodecEncodeSelf(e *codec1978.Encoder)

type FileSpec

type FileSpec struct {
	Name               string `json:"name,omitempty" yaml:"name,omitempty"`
	Encoding           string `` /* 128-byte string literal not displayed */
	Content            string `json:"content,omitempty" yaml:"content,omitempty"`
	Template           string `json:"template,omitempty" yaml:"template,omitempty"`
	Owner              string `json:"owner,omitempty" yaml:"owner,omitempty"`
	UserID             int    `json:"userID,omitempty" yaml:"userID,omitempty"`
	GroupID            int    `json:"groupID,omitempty" yaml:"groupID,omitempty"`
	Filesystem         string `json:"filesystem,omitempty" yaml:"filesystem,omitempty"`
	Path               string `json:"path,omitempty" yaml:"path,omitempty"`
	RawFilePermissions string `json:"permissions,omitempty" yaml:"permissions,omitempty" valid:"^0?[0-7]{3,4}$"`
}

func (*FileSpec) CodecDecodeSelf

func (x *FileSpec) CodecDecodeSelf(d *codec1978.Decoder)

func (*FileSpec) CodecEncodeSelf

func (x *FileSpec) CodecEncodeSelf(e *codec1978.Encoder)

type Instance

type Instance struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              InstanceSpec       `json:"spec,omitempty"`
	Status            InstanceStatus     `json:"status,omitempty"`
	Dependency        InstanceDependency `json:"-"`
}

func (*Instance) CodecDecodeSelf

func (x *Instance) CodecDecodeSelf(d *codec1978.Decoder)

func (*Instance) CodecEncodeSelf

func (x *Instance) CodecEncodeSelf(e *codec1978.Encoder)

func (Instance) Get

func (i Instance) Get() schema.ObjectKind

func (*Instance) GetInitializersInAnnotations

func (i *Instance) GetInitializersInAnnotations() []string

Just a substitute when native initializer/finalizer for tpr is not ready

func (Instance) GetObjectMeta

func (i Instance) GetObjectMeta() metav1.Object

func (*Instance) SetInitializersInAnnotations

func (i *Instance) SetInitializersInAnnotations(is []string)

type InstanceCondition

type InstanceCondition struct {
	Type   InstanceConditionType `json:"type"`
	Status api.ConditionStatus   `json:"status"`
	// +optional
	LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// +optional
	Reason string `json:"reason,omitempty"`
	// +optional
	Message string `json:"message,omitempty"`
}

func GetInstanceCondition

func GetInstanceCondition(status *InstanceStatus, conditionType InstanceConditionType) (int, *InstanceCondition)

GetInstanceCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.

func GetInstanceReadyCondition

func GetInstanceReadyCondition(status InstanceStatus) *InstanceCondition

Extracts the instance ready condition from the given status and returns that. Returns nil if the condition is not present.

func (*InstanceCondition) CodecDecodeSelf

func (x *InstanceCondition) CodecDecodeSelf(d *codec1978.Decoder)

func (*InstanceCondition) CodecEncodeSelf

func (x *InstanceCondition) CodecEncodeSelf(e *codec1978.Encoder)

type InstanceConditionType

type InstanceConditionType string
const (
	// InstanceScheduled represents status of the scheduling process for this instance.
	InstanceScheduled InstanceConditionType = "InstanceScheduled"
	// InstanceReady means the instance is able to service requests and should be added to the
	// load balancing pools of all matching services.
	InstanceReady InstanceConditionType = "Ready"
	// InstanceInitialized means that all init containers in the instance have started successfully.
	InstanceInitialized InstanceConditionType = "Initialized"
	// InstanceReasonUnschedulable reason in InstanceScheduled InstanceCondition means that the scheduler
	// can't schedule the instance right now, for example due to insufficient resources in the cluster.
	InstanceReasonUnschedulable = "Unschedulable"
)

These are valid conditions of instance.

func (*InstanceConditionType) CodecDecodeSelf

func (x *InstanceConditionType) CodecDecodeSelf(d *codec1978.Decoder)

func (InstanceConditionType) CodecEncodeSelf

func (x InstanceConditionType) CodecEncodeSelf(e *codec1978.Encoder)

type InstanceDependency

type InstanceDependency struct {
	Network          Network          `json:"network,omitempty"`
	Secrets          []v1.Secret      `json:"secrets,omitempty"`
	Users            []User           `json:"users,omitempty"`
	ReservedInstance ReservedInstance `json:"reservedInstance,omitempty"`
}

func (*InstanceDependency) CodecDecodeSelf

func (x *InstanceDependency) CodecDecodeSelf(d *codec1978.Decoder)

func (*InstanceDependency) CodecEncodeSelf

func (x *InstanceDependency) CodecEncodeSelf(e *codec1978.Encoder)

type InstanceGroup

type InstanceGroup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              InstanceGroupSpec   `json:"spec,omitempty"`
	Status            InstanceGroupStatus `json:"status,omitempty"`
}

func (*InstanceGroup) CodecDecodeSelf

func (x *InstanceGroup) CodecDecodeSelf(d *codec1978.Decoder)

func (*InstanceGroup) CodecEncodeSelf

func (x *InstanceGroup) CodecEncodeSelf(e *codec1978.Encoder)

func (InstanceGroup) Get

func (InstanceGroup) GetObjectMeta

func (i InstanceGroup) GetObjectMeta() metav1.Object

type InstanceGroupCondition

type InstanceGroupCondition struct {
	// Type of replica set condition.
	Type InstanceGroupConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status api.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"`
}

InstanceGroupCondition describes the state of a replica set at a certain point.

func (*InstanceGroupCondition) CodecDecodeSelf

func (x *InstanceGroupCondition) CodecDecodeSelf(d *codec1978.Decoder)

func (*InstanceGroupCondition) CodecEncodeSelf

func (x *InstanceGroupCondition) CodecEncodeSelf(e *codec1978.Encoder)

type InstanceGroupConditionType

type InstanceGroupConditionType string
const (
	// InstanceGroupReplicaFailure is added in a replica set when one of its instances fails to be created
	// due to insufficient quota, limit ranges, instance security policy, node selectors, etc. or deleted
	// due to kubelet being down or finalizers are failing.
	InstanceGroupReplicaFailure InstanceGroupConditionType = "ReplicaFailure"
)

These are valid conditions of a replica set.

func (*InstanceGroupConditionType) CodecDecodeSelf

func (x *InstanceGroupConditionType) CodecDecodeSelf(d *codec1978.Decoder)

func (InstanceGroupConditionType) CodecEncodeSelf

func (x InstanceGroupConditionType) CodecEncodeSelf(e *codec1978.Encoder)

type InstanceGroupList

type InstanceGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

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

func (*InstanceGroupList) CodecDecodeSelf

func (x *InstanceGroupList) CodecDecodeSelf(d *codec1978.Decoder)

func (*InstanceGroupList) CodecEncodeSelf

func (x *InstanceGroupList) CodecEncodeSelf(e *codec1978.Encoder)

func (InstanceGroupList) Get

func (InstanceGroupList) GetObjectMeta

func (il InstanceGroupList) GetObjectMeta() metav1.List

type InstanceGroupProvisionPolicy

type InstanceGroupProvisionPolicy string
const (
	InstanceGroupProvisionReservedOnly  InstanceGroupProvisionPolicy = "ReservedOnly"
	InstanceGroupProvisionDynamicOnly   InstanceGroupProvisionPolicy = "DynamicOnly"
	InstanceGroupProvisionReservedFirst InstanceGroupProvisionPolicy = "ReservedFirst"
)

func (*InstanceGroupProvisionPolicy) CodecDecodeSelf

func (x *InstanceGroupProvisionPolicy) CodecDecodeSelf(d *codec1978.Decoder)

func (InstanceGroupProvisionPolicy) CodecEncodeSelf

func (x InstanceGroupProvisionPolicy) CodecEncodeSelf(e *codec1978.Encoder)

type InstanceGroupSpec

type InstanceGroupSpec struct {
	Replicas        int32                        `json:"replicas,omitempty"`
	ProvisionPolicy InstanceGroupProvisionPolicy `json:"provisionPolicy,omitempty"`

	// Minimum number of seconds for which a newly created instance should be ready
	// without any of its container crashing, for it to be considered available.
	// Defaults to 0 (instance will be considered available as soon as it is ready)
	// +optional
	MinReadySeconds          int32                 `json:"minReadySeconds,omitempty"`
	Selector                 *metav1.LabelSelector `json:"selector,omitempty"`
	ReservedInstanceSelector *metav1.LabelSelector `json:"reservedInstaceSelector,omitempty"`
	Template                 InstanceTemplateSpec  `json:"template,omitempty"`
}

func (*InstanceGroupSpec) CodecDecodeSelf

func (x *InstanceGroupSpec) CodecDecodeSelf(d *codec1978.Decoder)

func (*InstanceGroupSpec) CodecEncodeSelf

func (x *InstanceGroupSpec) CodecEncodeSelf(e *codec1978.Encoder)

type InstanceGroupStatus

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

	// The number of instances that have labels matching the labels of the instance template of the instancegroup.
	// +optional
	FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"`

	// The number of ready replicas for this replica set.
	// +optional
	ReadyReplicas int32 `json:"readyReplicas,omitempty"`

	// The number of available replicas (ready for at least minReadySeconds) for this replica set.
	// +optional
	AvailableReplicas int32 `json:"availableReplicas,omitempty"`

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

	Conditions []InstanceGroupCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

func (*InstanceGroupStatus) CodecDecodeSelf

func (x *InstanceGroupStatus) CodecDecodeSelf(d *codec1978.Decoder)

func (*InstanceGroupStatus) CodecEncodeSelf

func (x *InstanceGroupStatus) CodecEncodeSelf(e *codec1978.Encoder)

type InstanceList

type InstanceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

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

func (*InstanceList) CodecDecodeSelf

func (x *InstanceList) CodecDecodeSelf(d *codec1978.Decoder)

func (*InstanceList) CodecEncodeSelf

func (x *InstanceList) CodecEncodeSelf(e *codec1978.Encoder)

func (InstanceList) Get

func (il InstanceList) Get() schema.ObjectKind

func (InstanceList) GetObjectMeta

func (il InstanceList) GetObjectMeta() metav1.List

type InstanceOptions

type InstanceOptions struct {
	UseInstanceID string `k8s:"use-instance-id"`
	UsePrivateIP  string `k8s:"use-private-ip"`
}

func (*InstanceOptions) CodecDecodeSelf

func (x *InstanceOptions) CodecDecodeSelf(d *codec1978.Decoder)

func (*InstanceOptions) CodecEncodeSelf

func (x *InstanceOptions) CodecEncodeSelf(e *codec1978.Encoder)

type InstancePhase

type InstancePhase string

func (*InstancePhase) CodecDecodeSelf

func (x *InstancePhase) CodecDecodeSelf(d *codec1978.Decoder)

func (InstancePhase) CodecEncodeSelf

func (x InstancePhase) CodecEncodeSelf(e *codec1978.Encoder)

type InstanceReclaimPolicy

type InstanceReclaimPolicy string

func (*InstanceReclaimPolicy) CodecDecodeSelf

func (x *InstanceReclaimPolicy) CodecDecodeSelf(d *codec1978.Decoder)

func (InstanceReclaimPolicy) CodecEncodeSelf

func (x InstanceReclaimPolicy) CodecEncodeSelf(e *codec1978.Encoder)

type InstanceSpec

type InstanceSpec struct {
	OS                  string                 `json:"os,omitempty"`
	Image               string                 `json:"image,omitempty"`
	InstanceType        string                 `json:"instanceType,omitempty"`
	NetworkName         string                 `json:"networkName,omitempty"`
	ReclaimPolicy       InstanceReclaimPolicy  `json:"reclaimPolicy,omitempty"`
	Files               []FileSpec             `json:"files,omitempty"`
	Secrets             []LocalObjectReference `json:"secrets,omitempty"`
	Configs             []ConfigSpec           `json:"configs,omitempty"`
	Users               []LocalObjectReference `json:"users,omitempty"`
	Hostname            string                 `json:"hostname,omitempty"`
	ReservedInstanceRef *LocalObjectReference  `json:"reservedInstanceRef,omitempty"`
}

func (*InstanceSpec) CodecDecodeSelf

func (x *InstanceSpec) CodecDecodeSelf(d *codec1978.Decoder)

func (*InstanceSpec) CodecEncodeSelf

func (x *InstanceSpec) CodecEncodeSelf(e *codec1978.Encoder)

type InstanceStatus

type InstanceStatus struct {
	Phase      InstancePhase       `json:"phase,omitempty"`
	Conditions []InstanceCondition `json:"conditions,omitempty"`
	// TODO: allow multiple ips
	PrivateIP         string      `json:"privateIP,omitempty"`
	PublicIP          string      `json:"publicIP,omitempty"`
	InstanceID        string      `json:"instanceID,omitempty"`
	CreationTimestamp metav1.Time `json:"creationTimestamp,omitempty" protobuf:"bytes,8,opt,name=creationTimestamp"`
}

func InstanceStatusDeepCopy

func InstanceStatusDeepCopy(s *InstanceStatus) *InstanceStatus

func (*InstanceStatus) CodecDecodeSelf

func (x *InstanceStatus) CodecDecodeSelf(d *codec1978.Decoder)

func (*InstanceStatus) CodecEncodeSelf

func (x *InstanceStatus) CodecEncodeSelf(e *codec1978.Encoder)

type InstanceTemplateSpec

type InstanceTemplateSpec struct {
	metav1.ObjectMeta `json:"metadata"`
	Spec              InstanceSpec `json:"spec,omitempty"`
	Secrets           []v1.Secret  `json:"secrets,omitempty"`
}

func (*InstanceTemplateSpec) CodecDecodeSelf

func (x *InstanceTemplateSpec) CodecDecodeSelf(d *codec1978.Decoder)

func (*InstanceTemplateSpec) CodecEncodeSelf

func (x *InstanceTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder)

type LocalObjectReference

type LocalObjectReference struct {
	//TODO: Add other useful fields.  apiVersion, kind, uid?
	Name string `json:"name,omitempty"`
}

LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.

func (*LocalObjectReference) CodecDecodeSelf

func (x *LocalObjectReference) CodecDecodeSelf(d *codec1978.Decoder)

func (*LocalObjectReference) CodecEncodeSelf

func (x *LocalObjectReference) CodecEncodeSelf(e *codec1978.Encoder)

type Network

type Network struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              NetworkSpec   `json:"spec,omitempty"`
	Status            NetworkStatus `json:"status,omitempty"`
}

func (*Network) CodecDecodeSelf

func (x *Network) CodecDecodeSelf(d *codec1978.Decoder)

func (*Network) CodecEncodeSelf

func (x *Network) CodecEncodeSelf(e *codec1978.Encoder)

func (Network) Get

func (i Network) Get() schema.ObjectKind

func (Network) GetObjectMeta

func (i Network) GetObjectMeta() metav1.Object

type NetworkList

type NetworkList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

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

func (*NetworkList) CodecDecodeSelf

func (x *NetworkList) CodecDecodeSelf(d *codec1978.Decoder)

func (*NetworkList) CodecEncodeSelf

func (x *NetworkList) CodecEncodeSelf(e *codec1978.Encoder)

func (NetworkList) Get

func (il NetworkList) Get() schema.ObjectKind

func (NetworkList) GetObjectMeta

func (il NetworkList) GetObjectMeta() metav1.List

type NetworkPhase

type NetworkPhase string
const (
	NetworkPending NetworkPhase = "Pending"
	NetworkRunning NetworkPhase = "Running"
	NetworkFailed  NetworkPhase = "Failed"
	NetworkUnknown NetworkPhase = "Unknown"
)

func (*NetworkPhase) CodecDecodeSelf

func (x *NetworkPhase) CodecDecodeSelf(d *codec1978.Decoder)

func (NetworkPhase) CodecEncodeSelf

func (x NetworkPhase) CodecEncodeSelf(e *codec1978.Encoder)

type NetworkSpec

type NetworkSpec struct {
	Region string `k8s:"region" json:"region,omitempty"`
	Zone   string `k8s:"zone" json:"zone,omitempty"`
	Subnet string `k8s:"subnet" json:"subnet,omitempty"`
}

func (*NetworkSpec) CodecDecodeSelf

func (x *NetworkSpec) CodecDecodeSelf(d *codec1978.Decoder)

func (*NetworkSpec) CodecEncodeSelf

func (x *NetworkSpec) CodecEncodeSelf(e *codec1978.Encoder)

type NetworkStatus

type NetworkStatus struct {
	Phase NetworkPhase `json:"phase,omitempty"`
}

func NetworkStatusDeepCopy

func NetworkStatusDeepCopy(s *NetworkStatus) *NetworkStatus

func (*NetworkStatus) CodecDecodeSelf

func (x *NetworkStatus) CodecDecodeSelf(d *codec1978.Decoder)

func (*NetworkStatus) CodecEncodeSelf

func (x *NetworkStatus) CodecEncodeSelf(e *codec1978.Encoder)

type ReservedInstance

type ReservedInstance struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              ReservedInstanceSpec   `json:"spec,omitempty"`
	Status            ReservedInstanceStatus `json:"status,omitempty"`
}

func (*ReservedInstance) CodecDecodeSelf

func (x *ReservedInstance) CodecDecodeSelf(d *codec1978.Decoder)

func (*ReservedInstance) CodecEncodeSelf

func (x *ReservedInstance) CodecEncodeSelf(e *codec1978.Encoder)

func (ReservedInstance) Get

func (ReservedInstance) GetObjectMeta

func (i ReservedInstance) GetObjectMeta() metav1.Object

type ReservedInstanceList

type ReservedInstanceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

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

func (*ReservedInstanceList) CodecDecodeSelf

func (x *ReservedInstanceList) CodecDecodeSelf(d *codec1978.Decoder)

func (*ReservedInstanceList) CodecEncodeSelf

func (x *ReservedInstanceList) CodecEncodeSelf(e *codec1978.Encoder)

func (ReservedInstanceList) Get

func (ReservedInstanceList) GetObjectMeta

func (il ReservedInstanceList) GetObjectMeta() metav1.List

type ReservedInstancePhase

type ReservedInstancePhase string
const (
	ReservedInstanceBound     ReservedInstancePhase = "Bound"
	ReservedInstanceAvailable ReservedInstancePhase = "Available"
)

func (*ReservedInstancePhase) CodecDecodeSelf

func (x *ReservedInstancePhase) CodecDecodeSelf(d *codec1978.Decoder)

func (ReservedInstancePhase) CodecEncodeSelf

func (x ReservedInstancePhase) CodecEncodeSelf(e *codec1978.Encoder)

type ReservedInstanceSpec

type ReservedInstanceSpec struct {
	OS           string       `json:"os,omitempty"`
	Image        string       `json:"image,omitempty"`
	InstanceType string       `json:"instanceType,omitempty"`
	NetworkName  string       `json:"networkName,omitempty"`
	Hostname     string       `json:"hostname,omitempty"`
	InstanceID   string       `json:"instanceID,omitempty"`
	Configs      []ConfigSpec `json:"configs,omitempty"`
}

func (*ReservedInstanceSpec) CodecDecodeSelf

func (x *ReservedInstanceSpec) CodecDecodeSelf(d *codec1978.Decoder)

func (*ReservedInstanceSpec) CodecEncodeSelf

func (x *ReservedInstanceSpec) CodecEncodeSelf(e *codec1978.Encoder)

type ReservedInstanceStatus

type ReservedInstanceStatus struct {
	Phase ReservedInstancePhase `json:"phase,omitempty"`
	// Binding reference to the instance
	InstanceName string `json:"instanceName,omitempty"`
}

func (*ReservedInstanceStatus) CodecDecodeSelf

func (x *ReservedInstanceStatus) CodecDecodeSelf(d *codec1978.Decoder)

func (*ReservedInstanceStatus) CodecEncodeSelf

func (x *ReservedInstanceStatus) CodecEncodeSelf(e *codec1978.Encoder)

type User

type User struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              UserSpec `json:"spec"`
}

func (*User) CodecDecodeSelf

func (x *User) CodecDecodeSelf(d *codec1978.Decoder)

func (*User) CodecEncodeSelf

func (x *User) CodecEncodeSelf(e *codec1978.Encoder)

func (User) Get

func (i User) Get() schema.ObjectKind

func (User) GetObjectMeta

func (i User) GetObjectMeta() metav1.Object

type UserList

type UserList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

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

func (*UserList) CodecDecodeSelf

func (x *UserList) CodecDecodeSelf(d *codec1978.Decoder)

func (*UserList) CodecEncodeSelf

func (x *UserList) CodecEncodeSelf(e *codec1978.Encoder)

func (UserList) Get

func (il UserList) Get() schema.ObjectKind

func (UserList) GetObjectMeta

func (il UserList) GetObjectMeta() metav1.List

type UserSpec

type UserSpec struct {
	Name              string   `json:"name,omitempty"`
	PasswordHash      string   `json:"passwordHash,omitempty"`
	SSHAuthorizedKeys []string `json:"sshAuthorizedKeys,omitempty"`
	Sudo              string   `json:"sudo,omitempty"`
	Shell             string   `json:"shell,omitempty"`
}

func (*UserSpec) CodecDecodeSelf

func (x *UserSpec) CodecDecodeSelf(d *codec1978.Decoder)

func (*UserSpec) CodecEncodeSelf

func (x *UserSpec) CodecEncodeSelf(e *codec1978.Encoder)

Jump to

Keyboard shortcuts

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