v1alpha1

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=gravity.mobike.io

Index

Constants

View Source
const (
	GroupName           = "gravity.mobike.io"
	ClusterResourceKind = "Cluster"
)

Variables

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

Functions

func Kind

func Kind(kind string) schema.GroupKind

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

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Cluster

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

	Spec   ClusterSpec   `json:"spec"`
	Status ClusterStatus `json:"status"`
}

Cluster is a specification for a Cluster resource

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

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

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

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

func (*Cluster) DeepCopyObject

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

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

func (*Cluster) FindDeploymentRule

func (dc *Cluster) FindDeploymentRule(pipelineName string) *DeploymentRule

type ClusterCondition

type ClusterCondition struct {
	// Type of Cluster condition.
	Type ClusterConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// LastUpdateTime is the last time this condition was updated.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// LastTransitionTime is the last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// Reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// Message which is human readable indicating details about the transition.
	Message string `json:"message,omitempty"`
}

func (*ClusterCondition) DeepCopy

func (in *ClusterCondition) DeepCopy() *ClusterCondition

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

func (*ClusterCondition) DeepCopyInto

func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition)

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

type ClusterConditionType

type ClusterConditionType string
const (
	// Available means the deployment is available, ie. at least the minimum available
	// replicas required are up and running for at least minReadySeconds.
	ClusterAvailable ClusterConditionType = "Available"

	// UpToDate means every pipeline in cluster has been updated.
	ClusterUpToDate ClusterConditionType = "UpToDate"
)

type ClusterList

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

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

PipelineList is a list of Pipeline resources

func (*ClusterList) DeepCopy

func (in *ClusterList) DeepCopy() *ClusterList

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

func (*ClusterList) DeepCopyInto

func (in *ClusterList) DeepCopyInto(out *ClusterList)

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

func (*ClusterList) DeepCopyObject

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

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

type ClusterSpec

type ClusterSpec struct {
	// The maximum number of pipelines that can be upgraded.
	// Value can be an absolute number (ex: 5) or a percentage of pipelines (ex: 10%).
	// Absolute number is calculated from percentage by rounding up.
	// Defaults to 25%.
	Rolling *intstr.IntOrString `json:"rolling"`

	DeploymentRules []DeploymentRule `json:"deploymentRules"`
}

ClusterSpec is the spec for a cluster resource

func (*ClusterSpec) DeepCopy

func (in *ClusterSpec) DeepCopy() *ClusterSpec

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

func (*ClusterSpec) DeepCopyInto

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

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

type ClusterStatus

type ClusterStatus struct {
	ObservedGeneration int64 `json:"observedGeneration"`

	// Total number of pipelines.
	// +optional
	Pipelines int32 `json:"pipelines"`

	// Total number of pipelines which version match current deployment rule.
	// +optional
	UpdatedPipelines int32 `json:"updatedPipelines"`

	// Total number of available pipelines (ready for at least minReadySeconds).
	// +optional
	AvailablePipelines int32 `json:"availablePipelines"`

	// Total number of unavailable pipelines. They may
	// either be pipelines that are running but not yet available or pipelines that still have not been created.
	// +optional
	UnavailablePipelines int32 `json:"unavailablePipelines"`

	Conditions []ClusterCondition `json:"conditions,omitempty"`
}

ClusterStatus is the status for a cluster resource

func (ClusterStatus) Condition

func (t ClusterStatus) Condition(condType ClusterConditionType) *ClusterCondition

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

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

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

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

type DeploymentRule

type DeploymentRule struct {
	Group     string   `json:"group" yaml:"group"`
	Pipelines []string `json:"pipelines" yaml:"pipelines"`
	Image     string   `json:"image" yaml:"image"`
	Command   []string `json:"command" yaml:"command"`
}

func (*DeploymentRule) DeepCopy

func (in *DeploymentRule) DeepCopy() *DeploymentRule

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

func (*DeploymentRule) DeepCopyInto

func (in *DeploymentRule) DeepCopyInto(out *DeploymentRule)

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