v1alpha1

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 License: Apache-2.0 Imports: 8 Imported by: 44

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Index

Constants

View Source
const (
	// DefaultRolloutUniqueLabelKey is the default key of the selector that is added
	// to existing ReplicaSets (and label key that is added to its pods) to prevent the existing ReplicaSets
	// to select new pods (and old pods being select by new ReplicaSet).
	DefaultRolloutUniqueLabelKey string = "rollouts-pod-template-hash"
)

Variables

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

SchemeGroupVersion is group version used to register these objects

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 BlueGreenStatus added in v0.2.0

type BlueGreenStatus struct {
	// PreviewSelector indicates which replicas set the preview service is serving traffic to
	// +optional
	PreviewSelector string `json:"previewSelector,omitempty"`
	// ActiveSelector indicates which replicas set the active service is serving traffic to
	// +optional
	ActiveSelector string `json:"activeSelector,omitempty"`
}

BlueGreenStatus status fields that only pertain to the blueGreen rollout

func (*BlueGreenStatus) DeepCopy added in v0.2.0

func (in *BlueGreenStatus) DeepCopy() *BlueGreenStatus

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

func (*BlueGreenStatus) DeepCopyInto added in v0.2.0

func (in *BlueGreenStatus) DeepCopyInto(out *BlueGreenStatus)

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

type BlueGreenStrategy

type BlueGreenStrategy struct {
	// Name of the service that the rollout modifies as the active service.
	ActiveService string `json:"activeService,omitempty"`
	// Name of the service that the rollout modifies as the preview service.
	// +optional
	PreviewService string `json:"previewService,omitempty"`
}

BlueGreenStrategy defines parameters for Blue Green deployment

func (*BlueGreenStrategy) DeepCopy

func (in *BlueGreenStrategy) DeepCopy() *BlueGreenStrategy

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

func (*BlueGreenStrategy) DeepCopyInto

func (in *BlueGreenStrategy) DeepCopyInto(out *BlueGreenStrategy)

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

type CanaryStatus added in v0.2.0

type CanaryStatus struct {
	// StableRS indicates the last replicaset that walked through all the canary steps or was the only replicaset
	// +optional
	StableRS string `json:"stableRS,omitempty"`
	//WaitStartTime this field is set when the rollout is in a wait step and indicates the time the wait started at
	// +optional
	PauseStartTime *metav1.Time `json:"pauseStartTime,omitempty"`
}

CanaryStatus status fields that only pertain to the canary rollout

func (*CanaryStatus) DeepCopy added in v0.2.0

func (in *CanaryStatus) DeepCopy() *CanaryStatus

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

func (*CanaryStatus) DeepCopyInto added in v0.2.0

func (in *CanaryStatus) DeepCopyInto(out *CanaryStatus)

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

type CanaryStep added in v0.2.0

type CanaryStep struct {
	// SetWeight sets what percentage of the newRS should receive
	SetWeight *int32 `json:"setWeight,omitempty"`
	// Pause freezes the rollout. If an empty struct is provided, it will freeze until a user sets the spec.Pause to false
	// +optional
	Pause *RolloutPause `json:"pause,omitempty"`
}

CanaryStep defines a step of a canary deployment.

func (*CanaryStep) DeepCopy added in v0.2.0

func (in *CanaryStep) DeepCopy() *CanaryStep

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

func (*CanaryStep) DeepCopyInto added in v0.2.0

func (in *CanaryStep) DeepCopyInto(out *CanaryStep)

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

type CanaryStrategy added in v0.2.0

type CanaryStrategy struct {
	// Steps define the order of phases to execute the canary deployment
	// +optional
	Steps []CanaryStep `json:"steps,omitempty"`
	// MaxUnavailable The maximum number of pods that can be unavailable during the update.
	// Value can be an absolute number (ex: 5) or a percentage of total pods at the start of update (ex: 10%).
	// Absolute number is calculated from percentage by rounding down.
	// This can not be 0 if MaxSurge is 0.
	// By default, a fixed value of 1 is used.
	// Example: when this is set to 30%, the old RC can be scaled down by 30%
	// immediately when the rolling update starts. Once new pods are ready, old RC
	// can be scaled down further, followed by scaling up the new RC, ensuring
	// that at least 70% of original number of pods are available at all times
	// during the update.
	// +optional
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`

	// MaxSurge The maximum number of pods that can be scheduled above the original number of
	// pods.
	// Value can be an absolute number (ex: 5) or a percentage of total pods at
	// the start of the update (ex: 10%). This can not be 0 if MaxUnavailable is 0.
	// Absolute number is calculated from percentage by rounding up.
	// By default, a value of 1 is used.
	// Example: when this is set to 30%, the new RC can be scaled up by 30%
	// immediately when the rolling update starts. Once old pods have been killed,
	// new RC can be scaled up further, ensuring that total number of pods running
	// at any time during the update is atmost 130% of original pods.
	// +optional
	MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"`
}

ReplicaBasedCanaryStrategy defines parameters for a Replica Based Canary

func (*CanaryStrategy) DeepCopy added in v0.2.0

func (in *CanaryStrategy) DeepCopy() *CanaryStrategy

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

func (*CanaryStrategy) DeepCopyInto added in v0.2.0

func (in *CanaryStrategy) DeepCopyInto(out *CanaryStrategy)

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

type Rollout

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

	Spec   RolloutSpec   `json:"spec"`
	Status RolloutStatus `json:"status"`
}

Rollout is a specification for a Rollout resource

func (*Rollout) DeepCopy

func (in *Rollout) DeepCopy() *Rollout

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

func (*Rollout) DeepCopyInto

func (in *Rollout) DeepCopyInto(out *Rollout)

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

func (*Rollout) DeepCopyObject

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

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

type RolloutCondition

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

RolloutCondition describes the state of a rollout at a certain point.

func (*RolloutCondition) DeepCopy

func (in *RolloutCondition) DeepCopy() *RolloutCondition

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

func (*RolloutCondition) DeepCopyInto

func (in *RolloutCondition) DeepCopyInto(out *RolloutCondition)

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

type RolloutConditionType

type RolloutConditionType string

RolloutConditionType defines the conditions of Rollout

const (
	// InvalidSpec means the rollout has an invalid spec and will not progress until
	// the spec is fixed.
	InvalidSpec RolloutConditionType = "InvalidSpec"
	// Available means the rollout is available, ie. the active service is pointing at a
	// replicaset with the required replicas up and running for at least minReadySeconds.
	RolloutAvailable RolloutConditionType = "Available"
)

These are valid conditions of a rollout.

type RolloutList

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

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

RolloutList is a list of Rollout resources

func (*RolloutList) DeepCopy

func (in *RolloutList) DeepCopy() *RolloutList

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

func (*RolloutList) DeepCopyInto

func (in *RolloutList) DeepCopyInto(out *RolloutList)

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

func (*RolloutList) DeepCopyObject

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

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

type RolloutPause added in v0.2.0

type RolloutPause struct {
	// Duration the amount of time to wait before moving to the next step.
	// +optional
	Duration *int32 `json:"duration,omitempty"`
}

func (*RolloutPause) DeepCopy added in v0.2.0

func (in *RolloutPause) DeepCopy() *RolloutPause

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

func (*RolloutPause) DeepCopyInto added in v0.2.0

func (in *RolloutPause) DeepCopyInto(out *RolloutPause)

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

type RolloutSpec

type RolloutSpec struct {
	// Number of desired pods. This is a pointer to distinguish between explicit
	// zero and not specified. Defaults to 1.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`
	// Label selector for pods. Existing ReplicaSets whose pods are
	// selected by this will be the ones affected by this rollout.
	// It must match the pod template's labels.
	Selector *metav1.LabelSelector `json:"selector"`
	// Template describes the pods that will be created.
	Template corev1.PodTemplateSpec `json:"template"`
	// Minimum number of seconds for which a newly created pod should be ready
	// without any of its container crashing, for it to be considered available.
	// Defaults to 0 (pod will be considered available as soon as it is ready)
	// +optional
	MinReadySeconds int32 `json:"minReadySeconds"`
	// The deployment strategy to use to replace existing pods with new ones.
	// +optional
	Strategy RolloutStrategy `json:"strategy"`
	// The number of old ReplicaSets to retain.
	// This is a pointer to distinguish between explicit zero and not specified.
	// This is set to the max value of int32 (i.e. 2147483647) by default, which means
	// "retaining all old ReplicaSets".
	RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
	// Paused pauses the rollout at its current step.
	Paused bool `json:"paused,omitempty"`
}

RolloutSpec is the spec for a Rollout resource

func (*RolloutSpec) DeepCopy

func (in *RolloutSpec) DeepCopy() *RolloutSpec

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

func (*RolloutSpec) DeepCopyInto

func (in *RolloutSpec) DeepCopyInto(out *RolloutSpec)

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

type RolloutStatus

type RolloutStatus struct {
	// CurrentPodHash the hash of the current pod template
	// +optional
	CurrentPodHash string `json:"currentPodHash"`
	// CurrentStepHash the hash of the current list of steps for the current strategy. This is used to detect when the
	// list of current steps change
	CurrentStepHash string `json:"currentStepHash,omitempty"`
	// VerifyingPreview indicates the rollout is verifying the replicas set being served
	// traffic from the preview service. User will need to edit this field to continue the rollout.
	// +optional
	VerifyingPreview *bool `json:"verifyingPreview,omitempty"`
	// Total number of non-terminated pods targeted by this rollout (their labels match the selector).
	// +optional
	Replicas int32 `json:"replicas"`
	// Total number of non-terminated pods targeted by this rollout that have the desired template spec.
	// +optional
	UpdatedReplicas int32 `json:"updatedReplicas"`
	// Total number of ready pods targeted by this rollout.
	// +optional
	ReadyReplicas int32 `json:"readyReplicas"`
	// Total number of available pods (ready for at least minReadySeconds) targeted by this rollout.
	// +optional
	AvailableReplicas int32 `json:"availableReplicas"`
	// CurrentStepIndex defines the current step of the rollout is on. If the current step index is null, the
	// controller will execute the rollout.
	// +optional
	CurrentStepIndex *int32 `json:"currentStepIndex,omitempty"`
	// Count of hash collisions for the Rollout. The Rollout controller uses this
	// field as a collision avoidance mechanism when it needs to create the name for the
	// newest ReplicaSet.
	// +optional
	CollisionCount *int32 `json:"collisionCount,omitempty"`
	// The generation observed by the rollout controller by taking a hash of the spec.
	// +optional
	ObservedGeneration string `json:"observedGeneration,omitempty"`
	// Conditions a list of conditions a rollout can have.
	// +optional
	Conditions []RolloutCondition `json:"conditions,omitempty"`
	// Canary describes the state of the canary rollout
	// +optional
	Canary CanaryStatus `json:"canary,omitempty"`
	// BlueGreen describes the state of the bluegreen rollout
	// +optional
	BlueGreen BlueGreenStatus `json:"blueGreen,omitempty"`
}

RolloutStatus is the status for a Rollout resource

func (*RolloutStatus) DeepCopy

func (in *RolloutStatus) DeepCopy() *RolloutStatus

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

func (*RolloutStatus) DeepCopyInto

func (in *RolloutStatus) DeepCopyInto(out *RolloutStatus)

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

type RolloutStrategy

type RolloutStrategy struct {
	// +optional
	BlueGreenStrategy *BlueGreenStrategy `json:"blueGreen,omitempty"`
	// +optional
	CanaryStrategy *CanaryStrategy `json:"canary,omitempty"`
}

RolloutStrategy defines strategy to apply during next rollout

func (*RolloutStrategy) DeepCopy

func (in *RolloutStrategy) DeepCopy() *RolloutStrategy

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

func (*RolloutStrategy) DeepCopyInto

func (in *RolloutStrategy) DeepCopyInto(out *RolloutStrategy)

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