Documentation ¶
Index ¶
- type Client
- func (c *Client) Delete(ctx context.Context, name, namespace string) (err error)
- func (c *Client) ReadyReplicas(ctx context.Context, name, namespace string) (ready int32, err error)
- func (c *Client) RunningStatefulSets(ctx context.Context, namespace string) (running []string, err error)
- func (c *Client) Scale(ctx context.Context, name, namespace string, replicas int32) (err error)
- func (c *Client) Set(ctx context.Context, name, namespace string, o Options) (err error)
- func (c *Client) StoppedStatefulSets(ctx context.Context, namespace string) (stopped []string, err error)
- type Options
- type StatefulSetSpec
- type UpdateStrategy
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.Clientset) *Client
NewClient constructs a new Client.
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) 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
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 ¶
func (s *StatefulSetSpec) ToK8S() appsv1.StatefulSetSpec
ToK8S converts StatefulSetSpec to Kuberntes client object
type UpdateStrategy ¶
UpdateStrategy represents Kubernetes StatefulSetUpdateStrategy
Click to show internal directories.
Click to hide internal directories.