Documentation ¶
Index ¶
- func ApplyCNR(c client.Client, drymode bool, cnr atlassianv1.CycleNodeRequest) error
- func GenerateCNR(nodeGroup atlassianv1.NodeGroup, nodes []string, name, namespace string) atlassianv1.CycleNodeRequest
- func GetName(meta metav1.ObjectMeta) string
- func GetNameExample(meta metav1.ObjectMeta) (string, string)
- func GetNodeGroups(c client.Client, names ...string) (*atlassianv1.NodeGroupList, error)
- func GiveReason(cnr *atlassianv1.CycleNodeRequest, reason string)
- func ListCNRs(c client.Client, options *client.ListOptions) (*atlassianv1.CycleNodeRequestList, error)
- func ListNodeGroups(c client.Client, options *client.ListOptions) (*atlassianv1.NodeGroupList, error)
- func NewOneShotNodeLister(c client.Client) k8s.NodeLister
- func SetAPIVersion(cnr *atlassianv1.CycleNodeRequest, clientVersion string)
- func UseGenerateNameCNR(cnr *atlassianv1.CycleNodeRequest)
- func ValidateCNR(nodeLister k8s.NodeLister, cnr atlassianv1.CycleNodeRequest) (bool, string)
- func ValidateNodeGroup(nodeLister k8s.NodeLister, nodegroup atlassianv1.NodeGroup) (bool, string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyCNR ¶
func ApplyCNR(c client.Client, drymode bool, cnr atlassianv1.CycleNodeRequest) error
ApplyCNR takes a cnr and optionally uses dry mode in the create request
func GenerateCNR ¶
func GenerateCNR(nodeGroup atlassianv1.NodeGroup, nodes []string, name, namespace string) atlassianv1.CycleNodeRequest
GenerateCNR creates a setup CNR from a NodeGroup with the specified params
func GetName ¶
func GetName(meta metav1.ObjectMeta) string
GetName returns the Name or GenerateName of the object Meta
func GetNameExample ¶
func GetNameExample(meta metav1.ObjectMeta) (string, string)
GetNameExample returns the Name or GenerateName of the object Meta with an "xxxx" if using GeneratedName
func GetNodeGroups ¶
func GetNodeGroups(c client.Client, names ...string) (*atlassianv1.NodeGroupList, error)
GetNodeGroups gets individual node groups and returns the as a list
func GiveReason ¶
func GiveReason(cnr *atlassianv1.CycleNodeRequest, reason string)
GiveReason adds a reason annotation to the cnr
func ListCNRs ¶
func ListCNRs(c client.Client, options *client.ListOptions) (*atlassianv1.CycleNodeRequestList, error)
ListCNRs list CNRs from ListOptions
func ListNodeGroups ¶
func ListNodeGroups(c client.Client, options *client.ListOptions) (*atlassianv1.NodeGroupList, error)
ListNodeGroups list NodeGroupList from ListOptions
func NewOneShotNodeLister ¶
func NewOneShotNodeLister(c client.Client) k8s.NodeLister
NewOneShotNodeLister creates a new onceShotNodeLister
func SetAPIVersion ¶ added in v1.8.1
func SetAPIVersion(cnr *atlassianv1.CycleNodeRequest, clientVersion string)
SetAPIVersion adds apiVersion annotation to the cnr
func UseGenerateNameCNR ¶
func UseGenerateNameCNR(cnr *atlassianv1.CycleNodeRequest)
UseGenerateNameCNR swaps name with generate name appending the "-" and blanks out Name
func ValidateCNR ¶
func ValidateCNR(nodeLister k8s.NodeLister, cnr atlassianv1.CycleNodeRequest) (bool, string)
ValidateCNR determines if a cnr should be applied to the cluster or not, and if so why not
func ValidateNodeGroup ¶
func ValidateNodeGroup(nodeLister k8s.NodeLister, nodegroup atlassianv1.NodeGroup) (bool, string)
ValidateNodeGroup determines if a nodegroup should be considered for rotation to or not, and if so why not
Types ¶
This section is empty.