statefulset

package
v0.0.0-...-1dfee00 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteCollectionStatefulSet

func DeleteCollectionStatefulSet(client *kubernetes.Clientset, statefulSetList []k8s.StatefulSetData) (err error)

func DeleteStatefulSet

func DeleteStatefulSet(client *kubernetes.Clientset, ns string, name string) (err error)

func RestartStatefulSet

func RestartStatefulSet(client *kubernetes.Clientset, name string, namespace string) (err error)

func ScaleStatefulSet

func ScaleStatefulSet(client *kubernetes.Clientset, ns string, name string, scaleNumber int32) (err error)

Types

type PodList

type PodList struct {
	ListMeta k8s.ListMeta `json:"listMeta"`

	// Basic information about resources status on the list.
	Status k8scommon.ResourceStatus `json:"status"`

	// Unordered list of Pods.
	Pods []pods.Pod `json:"pods"`
}

type StatefulSet

type StatefulSet struct {
	ObjectMeta k8s.ObjectMeta    `json:"objectMeta"`
	TypeMeta   k8s.TypeMeta      `json:"typeMeta"`
	Pods       k8scommon.PodInfo `json:"podInfo"`

	// Status information on the statefulSet
	StatusInfo `json:"statusInfo"`

	// Label selector
	Selector *metav1.LabelSelector `json:"selector"`
	// The statefulset strategy to use to replace existing pods with new ones.
	// Valid options: Recreate, RollingUpdate
	Strategy apps.StatefulSetUpdateStrategy `json:"strategy"`

	ContainerImages []string `json:"containerImages"`

	InitContainerImages []string `json:"initContainerImages"`
}

StatefulSet is a presentation layer view of Kubernetes Stateful Set resource.

type StatefulSetCell

type StatefulSetCell apps.StatefulSet

func (StatefulSetCell) GetProperty

type StatefulSetDetail

type StatefulSetDetail struct {
	// Extends list item structure.
	StatefulSet `json:",inline"`

	Events *k8scommon.EventList `json:"events"`

	PodList *PodList `json:"podList"`

	SvcList *service.ServiceList `json:"svcList"`
}

StatefulSetDetail is a presentation layer view of Kubernetes Stateful Set resource. This means it is Stateful

func GetStatefulSetDetail

func GetStatefulSetDetail(client *kubernetes.Clientset, dsQuery *dataselect.DataSelectQuery, namespace, name string) (*StatefulSetDetail, error)

GetStatefulSetDetail gets Stateful Set details.

type StatefulSetList

type StatefulSetList struct {
	ListMeta     k8s.ListMeta             `json:"listMeta"`
	Status       k8scommon.ResourceStatus `json:"status"`
	StatefulSets []StatefulSet            `json:"statefulSets"`
}

StatefulSetList contains a list of Stateful Sets in the cluster.

func GetStatefulSetList

func GetStatefulSetList(client *kubernetes.Clientset, nsQuery *k8scommon.NamespaceQuery, dsQuery *dataselect.DataSelectQuery) (*StatefulSetList, error)

GetStatefulSetList returns a list of all Stateful Sets in the cluster.

func GetStatefulSetListFromChannels

func GetStatefulSetListFromChannels(channels *k8scommon.ResourceChannels, dsQuery *dataselect.DataSelectQuery) (*StatefulSetList, error)

GetStatefulSetListFromChannels returns a list of all Stateful Sets in the cluster reading required resource list once from the channels.

type StatusInfo

type StatusInfo struct {
	// replicas is the number of Pods created by the StatefulSet controller.
	Replicas int32 `json:"replicas"`

	// Number of non-terminated pods that have the desired template spec
	Updated int32 `json:"updated"`

	// readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
	ReadyReplicas int32 `json:"readyReplicas,omitempty"`

	// currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
	// indicated by currentRevision.
	CurrentReplicas int32 `json:"currentReplicas,omitempty"`

	// updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
	// indicated by updateRevision.
	UpdatedReplicas int32 `json:"updatedReplicas,omitempty"`
	// Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset.
	// This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.
	// Remove omitempty when graduating to beta
	// +optional
	AvailableReplicas int32 `json:"availableReplicas,omitempty"`
}

StatusInfo is the status information of the statefulSet

func GetStatusInfo

func GetStatusInfo(statefulSetStatus *apps.StatefulSetStatus) StatusInfo

GetStatusInfo is used to get the status information from the *apps.StatefulSetStatus

Jump to

Keyboard shortcuts

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