statefulset

package
v0.15.9 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client manages communication with the Kubernetes StatefulSet.

func NewClient

func NewClient(clientset kubernetes.Interface, l logging.Logger) *Client

NewClient constructs a new Client.

func (*Client) Delete added in v0.4.1

func (c *Client) Delete(ctx context.Context, name, namespace string) (err error)

Delete deletes StatefulSet

func (*Client) ReadyReplicas added in v0.4.2

func (c *Client) ReadyReplicas(ctx context.Context, name, namespace string) (ready int32, err error)

ReadyReplicas returns number of Pods created by the StatefulSet controller that have a Ready Condition

func (*Client) ReadyReplicasWatch added in v0.12.0

func (c *Client) ReadyReplicasWatch(ctx context.Context, name, namespace string) (ready int32, err error)

ReadyReplicasWatch returns number of Pods created by the StatefulSet controller that have a Ready Condition by watching events

func (*Client) RunningStatefulSets added in v0.4.7

func (c *Client) RunningStatefulSets(ctx context.Context, namespace string) (running []string, err error)

RunningStatefulSets returns names of running StatefulSets

func (*Client) Scale added in v0.4.2

func (c *Client) Scale(ctx context.Context, name, namespace string, replicas int32) (sc *v1.Scale, err error)

Scale scales StatefulSet

func (*Client) Set

func (c *Client) Set(ctx context.Context, name, namespace string, o Options) (statefulSet *appsv1.StatefulSet, err error)

Set updates StatefulSet or creates it if it does not exist

func (*Client) StoppedStatefulSets added in v0.4.2

func (c *Client) StoppedStatefulSets(ctx context.Context, namespace string) (stopped []string, err error)

StoppedStatefulSets returns names of stopped StatefulSets

type Options

type Options struct {
	Annotations map[string]string
	Labels      map[string]string
	Spec        StatefulSetSpec
}

Options holds optional parameters for the Client.

type StatefulSetSpec

type StatefulSetSpec struct {
	PodManagementPolicy  string
	Replicas             int32
	RevisionHistoryLimit int32
	Selector             map[string]string
	ServiceName          string
	Template             pod.PodTemplateSpec
	UpdateStrategy       UpdateStrategy
	VolumeClaimTemplates pvc.PersistentVolumeClaims
}

StatefulSetSpec represents Kubernetes StatefulSetSpec

func (*StatefulSetSpec) ToK8S

ToK8S converts StatefulSetSpec to Kuberntes client object

type UpdateStrategy

type UpdateStrategy struct {
	Type                   string
	RollingUpdatePartition int32
}

UpdateStrategy represents Kubernetes StatefulSetUpdateStrategy

Jump to

Keyboard shortcuts

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