Documentation ¶
Index ¶
- func GetGVR() schema.GroupVersionResource
- type AdditionalOptions
- type Builder
- func (builder *Builder) Create() (*Builder, error)
- func (builder *Builder) CreateAndWaitUntilReady(timeout time.Duration) (*Builder, error)
- func (builder *Builder) Delete() error
- func (builder *Builder) DeleteAndWait(timeout time.Duration) error
- func (builder *Builder) Exists() bool
- func (builder *Builder) IsReady(timeout time.Duration) bool
- func (builder *Builder) Update() (*Builder, error)
- func (builder *Builder) WithAdditionalContainerSpecs(specs []corev1.Container) *Builder
- func (builder *Builder) WithLabel(labels map[string]string) *Builder
- func (builder *Builder) WithNodeSelector(nodeSelector map[string]string) *Builder
- func (builder *Builder) WithVolume(rsVolume corev1.Volume) *Builder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGVR ¶
func GetGVR() schema.GroupVersionResource
GetGVR returns the GroupVersionResource for replicaset.
Types ¶
type AdditionalOptions ¶
AdditionalOptions additional options for replicaset object.
type Builder ¶
type Builder struct { // Replicaset definition. Used to create a replicaset object. Definition *appsv1.ReplicaSet // Created replicaset object. Object *appsv1.ReplicaSet // contains filtered or unexported fields }
Builder provides struct for replicaset object containing connection to the cluster and the replicaset definitions.
func NewBuilder ¶
func NewBuilder( apiClient *clients.Settings, name, nsname string, labels map[string]string, containerSpec []corev1.Container) *Builder
NewBuilder creates a new instance of Builder.
func (*Builder) Create ¶
Create builds replicaset in the cluster and stores the created object in struct.
func (*Builder) CreateAndWaitUntilReady ¶
CreateAndWaitUntilReady creates a replicaset in the cluster and waits until the replicaset is available.
func (*Builder) DeleteAndWait ¶
DeleteAndWait deletes a replicaset and waits until it is removed from the cluster.
func (*Builder) IsReady ¶
IsReady waits for the replicaset to reach expected number of pods in Ready state.
func (*Builder) Update ¶
Update renovates the existing replicaset object with replicaset definition in builder.
func (*Builder) WithAdditionalContainerSpecs ¶
WithAdditionalContainerSpecs appends a list of container specs to the replicaset definition.
func (*Builder) WithNodeSelector ¶
WithNodeSelector applies nodeSelector to the replicaset definition.