Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewID ¶
func NewID() string
NewID is a globally unique identifier. It is a [A-Z0-9] string 26 characters long. It is a UUID version 4 Guid that is zbased32 encoded with the padding stripped off.
func StringWithCharset ¶
StringWithCharset is returning a random string based on a given string.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the programmatic interface to the provisioning server API.
func (*Client) RotateCluster ¶
func (c *Client) RotateCluster(request *RotateClusterRequest) (*Cluster, error)
RotateCluster requests the rotation of a K8s cluster from the rotator server.
type Cluster ¶
type Cluster struct { ClusterID string MaxScaling int RotateMasters bool RotateWorkers bool MaxDrainRetries int EvictGracePeriod int WaitBetweenRotations int WaitBetweenDrains int WaitBetweenPodEvictions int ClientSet *kubernetes.Clientset }
Cluster represents a K8s cluster.
type RotateClusterRequest ¶
type RotateClusterRequest struct { ClusterID string `json:"clusterID,omitempty"` MaxScaling int `json:"maxScaling,omitempty"` RotateMasters bool `json:"rotateMasters,omitempty"` RotateWorkers bool `json:"rotateWorkers,omitempty"` MaxDrainRetries int `json:"maxDrainRetries,omitempty"` EvictGracePeriod int `json:"evictGracePeriod,omitempty"` WaitBetweenRotations int `json:"waitBetweenRotations,omitempty"` WaitBetweenDrains int `json:"waitBetweenDrains,omitempty"` WaitBetweenPodEvictions int `json:"waitBetweenPodEvictions,omitempty"` }
RotateClusterRequest specifies the parameters for a new cluster rotation.
func NewRotateClusterRequestFromReader ¶
func NewRotateClusterRequestFromReader(reader io.Reader) (*RotateClusterRequest, error)
NewRotateClusterRequestFromReader decodes the request and returns after validation and setting the defaults.
func (*RotateClusterRequest) SetDefaults ¶
func (request *RotateClusterRequest) SetDefaults()
SetDefaults sets the default values for a cluster provision request.
func (*RotateClusterRequest) Validate ¶
func (request *RotateClusterRequest) Validate() error
Validate validates the values of a cluster rotate request.