Documentation ¶
Index ¶
- func GetGVR() schema.GroupVersionResource
- type AdditionalOptions
- type Builder
- func List(apiClient *clients.Settings, nsname string, options ...metav1.ListOptions) ([]*Builder, error)
- func ListInAllNamespaces(apiClient *clients.Settings, options ...metav1.ListOptions) ([]*Builder, error)
- func NewBuilder(apiClient *clients.Settings, name string, nsname string, ...) *Builder
- func Pull(apiClient *clients.Settings, name, nsname string) (*Builder, error)
- func (builder *Builder) Create() (*Builder, error)
- func (builder *Builder) Delete() error
- func (builder *Builder) Exists() bool
- func (builder *Builder) IsReady(timeout time.Duration) bool
- func (builder *Builder) WithAdditionalContainerSpecs(specs []corev1.Container) *Builder
- func (builder *Builder) WithOptions(options ...AdditionalOptions) *Builder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGVR ¶
func GetGVR() schema.GroupVersionResource
GetGVR returns pod's GroupVersionResource which could be used for Clean function.
Types ¶
type AdditionalOptions ¶
AdditionalOptions additional options for StatefulSet object.
type Builder ¶
type Builder struct { // StatefulSet definition. Used to create the statefulset object. Definition *appsv1.StatefulSet // Created statefulset object Object *appsv1.StatefulSet // contains filtered or unexported fields }
Builder provides struct for statefulset object containing connection to the cluster and the statefulset definitions.
func List ¶
func List(apiClient *clients.Settings, nsname string, options ...metav1.ListOptions) ([]*Builder, error)
List returns statefulset inventory in the given namespace.
func ListInAllNamespaces ¶
func ListInAllNamespaces(apiClient *clients.Settings, options ...metav1.ListOptions) ([]*Builder, error)
ListInAllNamespaces returns statefulset inventory in all namespaces.
func NewBuilder ¶
func NewBuilder( apiClient *clients.Settings, name string, nsname string, labels map[string]string, containerSpec *corev1.Container) *Builder
NewBuilder creates a new instance of Builder.
func (*Builder) Create ¶
Create generates a statefulset in cluster and stores the created object in struct.
func (*Builder) WithAdditionalContainerSpecs ¶
WithAdditionalContainerSpecs appends a list of container specs to the statefulset definition.
func (*Builder) WithOptions ¶
func (builder *Builder) WithOptions(options ...AdditionalOptions) *Builder
WithOptions creates StatefulSet with generic mutation options.