Documentation
¶
Index ¶
- type DeleteInstanceGroup
- type RollingUpdateCluster
- type RollingUpdateInstanceGroup
- func (r *RollingUpdateInstanceGroup) Delete() error
- func (r *RollingUpdateInstanceGroup) DeleteInstance(u *cloudinstances.CloudInstanceGroupMember) error
- func (r *RollingUpdateInstanceGroup) DrainNode(u *cloudinstances.CloudInstanceGroupMember, ...) error
- func (r *RollingUpdateInstanceGroup) RollingUpdate(rollingUpdateData *RollingUpdateCluster, cluster *api.Cluster, ...) (err error)
- func (r *RollingUpdateInstanceGroup) ValidateCluster(rollingUpdateData *RollingUpdateCluster, cluster *api.Cluster, ...) error
- func (r *RollingUpdateInstanceGroup) ValidateClusterWithDuration(rollingUpdateData *RollingUpdateCluster, cluster *api.Cluster, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteInstanceGroup ¶
type DeleteInstanceGroup struct {
Cluster *api.Cluster
Cloud fi.Cloud
Clientset simple.Clientset
}
DeleteInstanceGroup removes the cloud resources for an InstanceGroup
func (*DeleteInstanceGroup) DeleteInstanceGroup ¶
func (d *DeleteInstanceGroup) DeleteInstanceGroup(group *api.InstanceGroup) error
DeleteInstanceGroup deletes a cloud instance group
type RollingUpdateCluster ¶
type RollingUpdateCluster struct {
Cloud fi.Cloud
// MasterInterval is the amount of time to wait after stopping a master instance
MasterInterval time.Duration
// NodeInterval is the amount of time to wait after stopping a non-master instance
NodeInterval time.Duration
// BastionInterval is the amount of time to wait after stopping a bastion instance
BastionInterval time.Duration
// Interactive prompts user to continue after each instance is updated
Interactive bool
Force bool
K8sClient kubernetes.Interface
ClientConfig clientcmd.ClientConfig
FailOnDrainError bool
FailOnValidate bool
CloudOnly bool
ClusterName string
// PostDrainDelay is the duration we wait after draining each node
PostDrainDelay time.Duration
// ValidationTimeout is the maximum time to wait for the cluster to validate, once we start validation
ValidationTimeout time.Duration
}
RollingUpdateCluster is a struct containing cluster information for a rolling update.
func (*RollingUpdateCluster) RollingUpdate ¶
func (c *RollingUpdateCluster) RollingUpdate(groups map[string]*cloudinstances.CloudInstanceGroup, cluster *api.Cluster, instanceGroups *api.InstanceGroupList) error
RollingUpdate performs a rolling update on a K8s Cluster.
type RollingUpdateInstanceGroup ¶
type RollingUpdateInstanceGroup struct {
// Cloud is the kops cloud provider
Cloud fi.Cloud
// CloudGroup is the kops cloud provider groups
CloudGroup *cloudinstances.CloudInstanceGroup
}
RollingUpdateInstanceGroup is the AWS ASG backing an InstanceGroup.
func NewRollingUpdateInstanceGroup ¶
func NewRollingUpdateInstanceGroup(cloud fi.Cloud, cloudGroup *cloudinstances.CloudInstanceGroup) (*RollingUpdateInstanceGroup, error)
NewRollingUpdateInstanceGroup creates a new struct
func (*RollingUpdateInstanceGroup) Delete ¶
func (r *RollingUpdateInstanceGroup) Delete() error
Delete a CloudInstanceGroups
func (*RollingUpdateInstanceGroup) DeleteInstance ¶
func (r *RollingUpdateInstanceGroup) DeleteInstance(u *cloudinstances.CloudInstanceGroupMember) error
DeleteInstance deletes an Cloud Instance.
func (*RollingUpdateInstanceGroup) DrainNode ¶
func (r *RollingUpdateInstanceGroup) DrainNode(u *cloudinstances.CloudInstanceGroupMember, rollingUpdateData *RollingUpdateCluster) error
DrainNode drains a K8s node.
func (*RollingUpdateInstanceGroup) RollingUpdate ¶
func (r *RollingUpdateInstanceGroup) RollingUpdate(rollingUpdateData *RollingUpdateCluster, cluster *api.Cluster, instanceGroupList *api.InstanceGroupList, isBastion bool, sleepAfterTerminate time.Duration, validationTimeout time.Duration) (err error)
RollingUpdate performs a rolling update on a list of ec2 instances.
func (*RollingUpdateInstanceGroup) ValidateCluster ¶
func (r *RollingUpdateInstanceGroup) ValidateCluster(rollingUpdateData *RollingUpdateCluster, cluster *api.Cluster, instanceGroupList *api.InstanceGroupList) error
ValidateCluster runs our validation methods on the K8s Cluster.
func (*RollingUpdateInstanceGroup) ValidateClusterWithDuration ¶
func (r *RollingUpdateInstanceGroup) ValidateClusterWithDuration(rollingUpdateData *RollingUpdateCluster, cluster *api.Cluster, instanceGroupList *api.InstanceGroupList, duration time.Duration) error
ValidateClusterWithDuration runs validation.ValidateCluster until either we get positive result or the timeout expires