replicaset

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Realistic value of the burstReplica field for the replica set manager based off
	// performance requirements for kubernetes 1.0.
	BurstReplicas = 500
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new ReplicaSet Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

func GetCondition

func GetCondition(status v1.ReplicaSetStatus, condType v1.ReplicaSetConditionType) *v1.ReplicaSetCondition

GetCondition returns a replicaset condition with the provided type if it exists.

func NewReplicaSetCondition

func NewReplicaSetCondition(condType v1.ReplicaSetConditionType, status corev1.ConditionStatus, reason, msg string) v1.ReplicaSetCondition

NewReplicaSetCondition creates a new replicaset condition.

func RemoveCondition

func RemoveCondition(status *v1.ReplicaSetStatus, condType v1.ReplicaSetConditionType)

RemoveCondition removes the condition with the provided type from the replicaset status.

func SetCondition

func SetCondition(status *v1.ReplicaSetStatus, condition v1.ReplicaSetCondition)

SetCondition adds/replaces the given condition in the replicaset status. If the condition that we are about to add already exists and has the same status and reason then we are not going to update.

Types

type ReconcileReplicaSet

type ReconcileReplicaSet struct {
	schema.GroupVersionKind
	// contains filtered or unexported fields
}

ReconcileReplicaSet reconciles a ReplicaSet object

func (*ReconcileReplicaSet) Reconcile

func (r *ReconcileReplicaSet) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a ReplicaSet object and makes changes based on the state read and what is in the ReplicaSet.Spec TODO(user): Modify this Reconcile function to implement your Controller logic. This example creates a Pod as an example Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

Jump to

Keyboard shortcuts

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