generation

package
v1.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL