v1

package
v0.0.0-...-2c88aa7 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the atlassian v1 API group +k8s:deepcopy-gen=package,register +groupName=atlassian.com

Package v1 contains API Schema definitions for the atlassian v1 API group +k8s:deepcopy-gen=package,register +groupName=atlassian.com

Index

Constants

View Source
const (
	// CycleNodeRequestMethodDrain actively drains pods off the node before terminating it.
	// This is the default method.
	CycleNodeRequestMethodDrain = "Drain"

	// CycleNodeRequestMethodWait waits for pods to leave the node before terminating it.
	// It will ignore DaemonSets and select pods. These can be configured in the CRD spec.
	CycleNodeRequestMethodWait = "Wait"
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "atlassian.com", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)

Functions

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

Types

type CycleNodeRequest

type CycleNodeRequest struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	ClusterName string                 `json:"clusterName,omitempty"`
	Spec        CycleNodeRequestSpec   `json:"spec,omitempty"`
	Status      CycleNodeRequestStatus `json:"status,omitempty"`
}

CycleNodeRequest is the Schema for the cyclenoderequests API +k8s:openapi-gen=true +kubebuilder:resource:path=cyclenoderequests,shortName=cnr,scope=Namespaced +kubebuilder:printcolumn:name="Node Group Name",type="string",JSONPath=".spec.nodeGroupName",description="The node group being cycled" +kubebuilder:printcolumn:name="Method",type="string",JSONPath=".spec.cycleSettings.method",description="The method being used for the cycle operation" +kubebuilder:printcolumn:name="Concurrency",type="integer",JSONPath=".spec.cycleSettings.concurrency",description="Max nodes the request is cycling at once" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase",description="The status of the request" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Age of the request"

func (*CycleNodeRequest) DeepCopy

func (in *CycleNodeRequest) DeepCopy() *CycleNodeRequest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CycleNodeRequest.

func (*CycleNodeRequest) DeepCopyInto

func (in *CycleNodeRequest) DeepCopyInto(out *CycleNodeRequest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CycleNodeRequest) DeepCopyObject

func (in *CycleNodeRequest) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*CycleNodeRequest) GetNodeGroupNames

func (in *CycleNodeRequest) GetNodeGroupNames() []string

GetNodeGroupNames gets a union of cloud provider node group names based on CycleNodeRequestSpec `NodeGroupName` and `NodeGroupsList`

func (*CycleNodeRequest) IsFromNodeGroup

func (in *CycleNodeRequest) IsFromNodeGroup(nodegroup NodeGroup) bool

IsPartOfNodeGroup returns whether the CycleNodeRequest is part of the provided NodeGroup by comparing the list of named cloud provider nodegroups defined in each one. Ordering does not affect equality.

func (*CycleNodeRequest) IsFromSameNodeGroup

func (in *CycleNodeRequest) IsFromSameNodeGroup(cnr CycleNodeRequest) bool

IsFromSameNodeGroup returns whether the CycleNodeRequest is part of the same Nodegroup provided as the provided CycleNodeRequest by comparing the list of named cloud provider nodegroups defined in each one. Ordering does not affect equality.

func (*CycleNodeRequest) NodeLabelSelector

func (in *CycleNodeRequest) NodeLabelSelector() (labels.Selector, error)

NodeLabelSelector converts a metav1.LabelSelector to a labels.Selector

type CycleNodeRequestList

type CycleNodeRequestList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CycleNodeRequest `json:"items"`
}

CycleNodeRequestList contains a list of CycleNodeRequest

func (*CycleNodeRequestList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CycleNodeRequestList.

func (*CycleNodeRequestList) DeepCopyInto

func (in *CycleNodeRequestList) DeepCopyInto(out *CycleNodeRequestList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CycleNodeRequestList) DeepCopyObject

func (in *CycleNodeRequestList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CycleNodeRequestMethod

type CycleNodeRequestMethod string

CycleNodeRequestMethod is the method to use when cycling nodes.

type CycleNodeRequestNode

type CycleNodeRequestNode struct {
	// Name of the node
	Name string `json:"name"`

	// Cloud Provider ID of the node
	ProviderID string `json:"providerId"`

	// NodeGroupName stores current cloud provider node group name
	// which this node belongs to
	NodeGroupName string `json:"nodeGroupName"`

	// Private ip of the instance
	PrivateIP string `json:"privateIp,omitempty"`
}

CycleNodeRequestNode stores a current node that is being worked on

func (*CycleNodeRequestNode) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CycleNodeRequestNode.

func (*CycleNodeRequestNode) DeepCopyInto

func (in *CycleNodeRequestNode) DeepCopyInto(out *CycleNodeRequestNode)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CycleNodeRequestPhase

type CycleNodeRequestPhase string

CycleNodeRequestPhase is the phase that the cycleNodeRequest is in

const (
	// CycleNodeRequestUndefined is for cycleNodeRequests that aren't in any phase
	CycleNodeRequestUndefined CycleNodeRequestPhase = ""

	// CycleNodeRequestPending is for pending cycleNodeRequests
	CycleNodeRequestPending CycleNodeRequestPhase = "Pending"

	// CycleNodeRequestFailed is for failed cycleNodeRequests
	CycleNodeRequestFailed CycleNodeRequestPhase = "Failed"

	// CycleNodeRequestInitialised is for initialised cycleNodeRequests
	CycleNodeRequestInitialised CycleNodeRequestPhase = "Initialised"

	// CycleNodeRequestScalingUp is for cycleNodeRequests that are scaling up
	CycleNodeRequestScalingUp CycleNodeRequestPhase = "ScalingUp"

	// CycleNodeRequestCordoningNode is for cycleNodeRequests that are cordoning the current node
	CycleNodeRequestCordoningNode CycleNodeRequestPhase = "CordoningNode"

	// CycleNodeRequestWaitingTermination is for cycleNodeRequests that are waiting for a current batch of nodes to terminate
	CycleNodeRequestWaitingTermination CycleNodeRequestPhase = "WaitingTermination"

	// CycleNodeRequestSuccessful is for successful cycleNodeRequests
	CycleNodeRequestSuccessful CycleNodeRequestPhase = "Successful"

	// CycleNodeRequestHealing is for the state before Failing where cyclops will try to put the cluster back in a consistent state
	CycleNodeRequestHealing CycleNodeRequestPhase = "Healing"
)

type CycleNodeRequestSpec

type CycleNodeRequestSpec struct {
	// NodeGroupName is the name of the node group in the cloud provider that will be increased to bring
	// up replacement nodes.
	NodeGroupName string `json:"nodeGroupName"`

	// NodeGroupsList is a list of node groups in the cloud provider which includes target nodes
	// selected by node selector
	NodeGroupsList []string `json:"nodeGroupsList,omitempty"`

	// Selector is the label selector used to select the nodes that are to be terminated
	Selector metav1.LabelSelector `json:"selector"`

	// NodeNames is an optional list of the names of nodes to rotate. This is used to only
	// rotate specific nodes belonging to the NodeGroup, rather than every node in the group.
	// If no node names are provided in NodeNames then the entire node group will be rotated.
	NodeNames []string `json:"nodeNames,omitempty"`

	// CycleSettings stores the settings to use for cycling the nodes.
	CycleSettings CycleSettings `json:"cycleSettings"`

	// ValidationOptions stores the settings to use for validating state of nodegroups
	// in kube and the cloud provider for cycling the nodes.
	ValidationOptions ValidationOptions `json:"validationOptions,omitempty"`

	// HealthChecks stores the settings to configure instance custom health checks
	HealthChecks []HealthCheck `json:"healthChecks,omitempty"`

	// PreTerminationChecks stores the settings to configure instance pre-termination checks
	PreTerminationChecks []PreTerminationCheck `json:"preTerminationChecks,omitempty"`

	// SkipInitialHealthChecks is an optional flag to skip the initial set of node health checks before cycling begins
	// This does not affect the health checks performed as part of the pre-termination checks.
	SkipInitialHealthChecks bool `json:"skipInitialHealthChecks,omitempty"`

	// SkipPreTerminationChecks is an optional flag to skip pre-termination checks during cycling
	SkipPreTerminationChecks bool `json:"skipPreTerminationChecks,omitempty"`
}

CycleNodeRequestSpec defines the desired state of CycleNodeRequest +k8s:openapi-gen=true

func (*CycleNodeRequestSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CycleNodeRequestSpec.

func (*CycleNodeRequestSpec) DeepCopyInto

func (in *CycleNodeRequestSpec) DeepCopyInto(out *CycleNodeRequestSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CycleNodeRequestStatus

type CycleNodeRequestStatus struct {
	// Phase stores the current phase of the CycleNodeRequest
	Phase CycleNodeRequestPhase `json:"phase"`

	// A human readable message indicating details about why the CycleNodeRequest is in this condition.
	Message string `json:"message"`

	// CurrentNodes stores the current nodes that are being "worked on". Used to batch operations
	// against the node group in the cloud provider. Once a node is passed off to a CycleNodeStatus
	// CRD, it is no longer listed here.
	CurrentNodes []CycleNodeRequestNode `json:"currentNodes,omitempty"`

	// NodesToTerminate stores the old nodes that will be terminated.
	// The cycling of nodes is considered successful when all of these nodes no longer exist in the cluster.
	NodesToTerminate []CycleNodeRequestNode `json:"nodesToTerminate,omitempty"`

	// ScaleUpStarted stores the time when the scale up started
	// This is used to track the time limit of the scale up. If we breach the time limit
	// we fail the request.
	ScaleUpStarted *metav1.Time `json:"scaleUpStarted,omitempty"`

	// EquilibriumWaitStarted stores the time when we started waiting for equilibrium of Kube nodes and node group instances.
	// This is used to give some leeway if we start a request at the same time as a cluster scaling event.
	// If we breach the time limit we fail the request.
	EquilibriumWaitStarted *metav1.Time `json:"equilibriumWaitStarted,omitempty"`

	// ActiveChildren is the active number of CycleNodeStatuses that this CycleNodeRequest was aware of
	// when it last checked for progress in the cycle operation.
	ActiveChildren int64 `json:"activeChildren,omitempty"`

	// ThreadTimestamp is the timestamp of the thread in the messaging provider
	ThreadTimestamp string `json:"threadTimestamp,omitempty"`

	// SelectedNodes stores all selected nodes so that new nodes which are selected are only posted in a notification once
	SelectedNodes map[string]bool `json:"selectedNodes,omitempty"`

	// NumNodesCycled counts how many nodes have finished being cycled
	NumNodesCycled int `json:"numNodesCycled,omitempty"`

	// NodesAvailable stores the nodes still available to pick up for cycling from the list of nodes to terminate
	NodesAvailable []CycleNodeRequestNode `json:"nodesAvailable,omitempty"`

	// HealthChecks keeps track of instance health check information
	HealthChecks map[string]HealthCheckStatus `json:"healthChecks,omitempty"`

	// PreTerminationChecks keeps track of the instance pre termination check information
	PreTerminationChecks map[string]PreTerminationCheckStatusList `json:"preTerminationChecks,omitempty"`
}

CycleNodeRequestStatus defines the observed state of CycleNodeRequest +k8s:openapi-gen=true

func (*CycleNodeRequestStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CycleNodeRequestStatus.

func (*CycleNodeRequestStatus) DeepCopyInto

func (in *CycleNodeRequestStatus) DeepCopyInto(out *CycleNodeRequestStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CycleNodeStatus

type CycleNodeStatus struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CycleNodeStatusSpec   `json:"spec,omitempty"`
	Status CycleNodeStatusStatus `json:"status,omitempty"`
}

CycleNodeStatus is the Schema for the cyclenodestatus API +k8s:openapi-gen=true +kubebuilder:resource:path=cyclenodestatuses,shortName=cns,scope=Namespaced +kubebuilder:printcolumn:name="Node",type="string",JSONPath=".status.currentNode.name",description="The name of the node" +kubebuilder:printcolumn:name="Provider ID",type="string",JSONPath=".status.currentNode.providerId",description="The provider ID of the node" +kubebuilder:printcolumn:name="Method",type="string",JSONPath=".spec.cycleSettings.method",description="The method being used for the cycle operation" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase",description="The status of the request" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Age of the request"

func (*CycleNodeStatus) DeepCopy

func (in *CycleNodeStatus) DeepCopy() *CycleNodeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CycleNodeStatus.

func (*CycleNodeStatus) DeepCopyInto

func (in *CycleNodeStatus) DeepCopyInto(out *CycleNodeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CycleNodeStatus) DeepCopyObject

func (in *CycleNodeStatus) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CycleNodeStatusList

type CycleNodeStatusList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CycleNodeStatus `json:"items"`
}

CycleNodeStatusList contains a list of CycleNodeStatus

func (*CycleNodeStatusList) DeepCopy

func (in *CycleNodeStatusList) DeepCopy() *CycleNodeStatusList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CycleNodeStatusList.

func (*CycleNodeStatusList) DeepCopyInto

func (in *CycleNodeStatusList) DeepCopyInto(out *CycleNodeStatusList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CycleNodeStatusList) DeepCopyObject

func (in *CycleNodeStatusList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CycleNodeStatusPhase

type CycleNodeStatusPhase string

CycleNodeStatusPhase is the phase that the cycleNodeStatus is in

const (
	// CycleNodeStatusUndefined is for cycleNodeStatuses that aren't in any phase
	CycleNodeStatusUndefined CycleNodeStatusPhase = ""

	// CycleNodeStatusPending is for pending cycleNodeStatus
	CycleNodeStatusPending CycleNodeStatusPhase = "Pending"

	// CycleNodeStatusFailed is for failed cycleNodeStatuses
	CycleNodeStatusFailed CycleNodeStatusPhase = "Failed"

	// CycleNodeStatusRemovingLabelsFromPods is for cycleNodeStatuses that are removing labels from pods on the node
	CycleNodeStatusRemovingLabelsFromPods CycleNodeStatusPhase = "RemovingLabelsFromPods"

	// CycleNodeStatusWaitingPods is for cycleNodeStatuses that are waiting for pods to finish on the node
	CycleNodeStatusWaitingPods CycleNodeStatusPhase = "WaitingPods"

	// CycleNodeStatusDrainingPods is for cycleNodeStatuses that are draining pods from the node
	CycleNodeStatusDrainingPods CycleNodeStatusPhase = "DrainingPods"

	// CycleNodeStatusDeletingNode is for cycleNodeStatuses that are deleting the node out of the Kubernetes API
	CycleNodeStatusDeletingNode CycleNodeStatusPhase = "DeletingNode"

	// CycleNodeStatusTerminatingNode is for cyclenodeStatuses that are terminating the node from AWS
	CycleNodeStatusTerminatingNode CycleNodeStatusPhase = "TerminatingNode"

	// CycleNodeStatusSuccessful is for successful cycleNodeStatuses
	CycleNodeStatusSuccessful CycleNodeStatusPhase = "Successful"
)

type CycleNodeStatusSpec

type CycleNodeStatusSpec struct {
	// NodeName is the name of the node object in Kubernetes that will be drained and terminated.
	NodeName string `json:"nodeName"`

	// CycleSettings stores the settings to use for cycling the node.
	CycleSettings CycleSettings `json:"cycleSettings"`
}

CycleNodeStatusSpec defines the desired state of CycleNodeStatus +k8s:openapi-gen=true

func (*CycleNodeStatusSpec) DeepCopy

func (in *CycleNodeStatusSpec) DeepCopy() *CycleNodeStatusSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CycleNodeStatusSpec.

func (*CycleNodeStatusSpec) DeepCopyInto

func (in *CycleNodeStatusSpec) DeepCopyInto(out *CycleNodeStatusSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CycleNodeStatusStatus

type CycleNodeStatusStatus struct {
	// Phase stores the current phase of the CycleNodeStatus
	Phase CycleNodeStatusPhase `json:"phase"`

	// A human readable message indicating details about why the CycleNodeStatus is in this condition
	Message string `json:"message"`

	// CurrentNode stores this node that is being "worked on"
	CurrentNode CycleNodeRequestNode `json:"currentNode"`

	// StartedTimestamp stores the timestamp that work on this node began
	StartedTimestamp *metav1.Time `json:"startedTimestamp,omitempty"`

	// TimeoutTimestamp stores the timestamp of when this CNS will timeout
	TimeoutTimestamp *metav1.Time `json:"timeoutTimestamp,omitempty"`
}

CycleNodeStatusStatus defines the observed state of a node being cycled by a CycleNodeRequest +k8s:openapi-gen=true

func (*CycleNodeStatusStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CycleNodeStatusStatus.

func (*CycleNodeStatusStatus) DeepCopyInto

func (in *CycleNodeStatusStatus) DeepCopyInto(out *CycleNodeStatusStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CycleSettings

type CycleSettings struct {
	// Method describes the type of cycle operation to use.
	// +kubebuilder:validation:Enum=Drain;Wait
	Method CycleNodeRequestMethod `json:"method"`

	// Concurrency is the number of nodes that one CycleNodeRequest will work on in parallel.
	// Defaults to the size of the node group.
	Concurrency int64 `json:"concurrency,omitempty"`

	// LabelsToRemove is an array of labels to remove off of the pods running on the node
	// This can be used to remove a pod from a service/endpoint before evicting/deleting
	// it to prevent traffic being sent to it.
	LabelsToRemove []string `json:"labelsToRemove,omitempty"`

	// IgnorePodLabels is a map of values for labels that describes which pods should be ignored when
	// deciding whether a node has no more pods running. This map defines a union: any pod that
	// matches any of the values for a given label name will be ignored.
	IgnorePodsLabels map[string][]string `json:"ignorePodsLabels,omitempty"`

	// IgnoreNamespaces is a list of namespace names in which running pods should be ignored
	// when deciding whether a node has no more pods running.
	IgnoreNamespaces []string `json:"ignoreNamespaces,omitempty"`

	// CyclingTimeout is a string in time duration format that defines how long a until an
	// in-progress CNS request timeout from the time it's worked on by the controller.
	// If no cyclingTimeout is provided, CNS will use the default controller CNS cyclingTimeout.
	CyclingTimeout *metav1.Duration `json:"cyclingTimeout,omitempty"`
}

CycleSettings are configuration options to control how nodes are cycled +k8s:openapi-gen=true

func (*CycleSettings) DeepCopy

func (in *CycleSettings) DeepCopy() *CycleSettings

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CycleSettings.

func (*CycleSettings) DeepCopyInto

func (in *CycleSettings) DeepCopyInto(out *CycleSettings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CycleSettings) HasValidMethod

func (in *CycleSettings) HasValidMethod() bool

HasValidMethod returns true if the Method of the CycleSettings is a valid value.

type HealthCheck

type HealthCheck struct {
	// Endpoint url of the health check. Optional: {{ .NodeIP }} gets replaced by the private IP of the node being scaled up.
	Endpoint string `json:"endpoint"`

	// WaitPeriod is the time allowed for the health check to pass before considering the
	// service unhealthy and failing the CycleNodeRequest.
	WaitPeriod *metav1.Duration `json:"waitPeriod"`

	// ValidStatusCodes keeps track of the list of possible status codes returned by
	// the endpoint denoting the service as healthy. Defaults to [200].
	ValidStatusCodes []uint `json:"validStatusCodes,omitempty"`

	// RegexMatch specifies a regex string the body of the http result to should. By default no matching is done.
	RegexMatch string `json:"regexMatch,omitempty"`

	// TLS configuration for the http client to make requests. Can either make standard https requests
	// or optionally forward certs signed by the root CA for mTLS.
	TLSConfig `json:"tls,omitempty"`
}

HealthCheck defines the health check configuration for the NodeGroup +k8s:openapi-gen=true

func (*HealthCheck) DeepCopy

func (in *HealthCheck) DeepCopy() *HealthCheck

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheck.

func (*HealthCheck) DeepCopyInto

func (in *HealthCheck) DeepCopyInto(out *HealthCheck)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HealthCheckStatus

type HealthCheckStatus struct {
	// Ready keeps track of the first timestamp at which the node status was reported as "ready"
	NodeReady *metav1.Time `json:"ready,omitempty"`

	// Checks keeps track of the list of health checks performed on the node and which have already passed
	Checks []bool `json:"checks,omitempty"`

	// Skip denotes whether a node is part of a nodegroup before cycling has begun. If this is the case,
	// health checks on the instance are skipped, like this only new instances are checked.
	Skip bool `json:"skip,omitempty"`
}

HealthCheckStatus groups all health checks status information for a node

func (*HealthCheckStatus) DeepCopy

func (in *HealthCheckStatus) DeepCopy() *HealthCheckStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheckStatus.

func (*HealthCheckStatus) DeepCopyInto

func (in *HealthCheckStatus) DeepCopyInto(out *HealthCheckStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeGroup

type NodeGroup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   NodeGroupSpec   `json:"spec,omitempty"`
	Status NodeGroupStatus `json:"status,omitempty"`
}

NodeGroup is the Schema for the nodegroups API +k8s:openapi-gen=true +genclient:nonNamespaced +kubebuilder:resource:path=nodegroups,shortName=ng,scope=Cluster +kubebuilder:printcolumn:name="Node Group Name",type="string",JSONPath=".spec.nodeGroupName",description="The name of the node group in the cloud provider" +kubebuilder:printcolumn:name="Method",type="string",JSONPath=".spec.cycleSettings.method",description="The method to use when cycling nodes" +kubebuilder:printcolumn:name="Concurrency",type="integer",JSONPath=".spec.cycleSettings.concurrency",description="The number of nodes to cycle in parallel"

func (*NodeGroup) DeepCopy

func (in *NodeGroup) DeepCopy() *NodeGroup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroup.

func (*NodeGroup) DeepCopyInto

func (in *NodeGroup) DeepCopyInto(out *NodeGroup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeGroup) DeepCopyObject

func (in *NodeGroup) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*NodeGroup) GetNodeGroupNames

func (in *NodeGroup) GetNodeGroupNames() []string

GetNodeGroupNames gets a list of cloud provider node group names based on NodeGroupSpec `NodeGroupName` and `NodeGroupsList`

type NodeGroupList

type NodeGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NodeGroup `json:"items"`
}

NodeGroupList contains a list of NodeGroup

func (*NodeGroupList) DeepCopy

func (in *NodeGroupList) DeepCopy() *NodeGroupList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroupList.

func (*NodeGroupList) DeepCopyInto

func (in *NodeGroupList) DeepCopyInto(out *NodeGroupList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeGroupList) DeepCopyObject

func (in *NodeGroupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeGroupSpec

type NodeGroupSpec struct {
	// NodeGroupName is the name of the node group in the cloud provider that corresponds to this NodeGroup resource.
	NodeGroupName string `json:"nodeGroupName"`

	// NodeGroupsList is a list of cloud provider node groups that corresponds to this NodeGroup resource.
	NodeGroupsList []string `json:"nodeGroupsList,omitempty"`

	// NodeSelector is the label selector used to select nodes that belong to this NodeGroup.
	NodeSelector metav1.LabelSelector `json:"nodeSelector"`

	// CycleSettings stores the settings to use for cycling the nodes.
	CycleSettings CycleSettings `json:"cycleSettings"`

	// MaxFailedCycleNodeRequests defines the maximum number of allowed failed CNRs for a nodegroup before the observer
	// stops generating them.
	MaxFailedCycleNodeRequests uint `json:"maxFailedCycleNodeRequests,omitempty"`

	// ValidationOptions stores the settings to use for validating state of nodegroups
	// in kube and the cloud provider for cycling the nodes.
	ValidationOptions ValidationOptions `json:"validationOptions,omitempty"`

	// Healthchecks stores the settings to configure instance custom health checks
	HealthChecks []HealthCheck `json:"healthChecks,omitempty"`

	// PreTerminationChecks stores the settings to configure instance pre-termination checks
	PreTerminationChecks []PreTerminationCheck `json:"preTerminationChecks,omitempty"`

	// SkipInitialHealthChecks is an optional flag to skip the initial set of node health checks before cycling begins
	// This does not affect the health checks performed as part of the pre-termination checks.
	SkipInitialHealthChecks bool `json:"skipInitialHealthChecks,omitempty"`

	// SkipPreTerminationChecks is an optional flag to skip pre-termination checks during cycling
	SkipPreTerminationChecks bool `json:"skipPreTerminationChecks,omitempty"`
}

NodeGroupSpec defines the desired state of NodeGroup +k8s:openapi-gen=true

func (*NodeGroupSpec) DeepCopy

func (in *NodeGroupSpec) DeepCopy() *NodeGroupSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroupSpec.

func (*NodeGroupSpec) DeepCopyInto

func (in *NodeGroupSpec) DeepCopyInto(out *NodeGroupSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeGroupStatus

type NodeGroupStatus struct {
}

NodeGroupStatus defines the observed state of NodeGroup +k8s:openapi-gen=true

func (*NodeGroupStatus) DeepCopy

func (in *NodeGroupStatus) DeepCopy() *NodeGroupStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroupStatus.

func (*NodeGroupStatus) DeepCopyInto

func (in *NodeGroupStatus) DeepCopyInto(out *NodeGroupStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PreTerminationCheck

type PreTerminationCheck struct {
	// Endpoint url of the health check. Optional: {{ .NodeIP }} gets replaced by the private IP of the node being scaled up.
	Endpoint string `json:"triggerEndpoint"`

	// ValidStatusCodes keeps track of the list of possible status codes returned by
	// the endpoint denoting the service as healthy. Defaults to [200].
	ValidStatusCodes []uint `json:"validStatusCodes,omitempty"`

	// HealthCheck denotes the configuration for performing health checks after the trigger has been sent. This works the
	// exact same way as health check on new nodes.
	HealthCheck `json:"healthCheck"`

	// TLS configuration for the http client to make requests. Can either make standard https requests
	// or optionally forward certs signed by the root CA for mTLS.
	TLSConfig `json:"tls,omitempty"`
}

PreTerminationCheck defines the configuration for the check done before terminating an instance. The trigger can be considered a http sigterm and the subsequent check to know when the process has completed it's triggered action. +k8s:openapi-gen=true

func (*PreTerminationCheck) DeepCopy

func (in *PreTerminationCheck) DeepCopy() *PreTerminationCheck

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreTerminationCheck.

func (*PreTerminationCheck) DeepCopyInto

func (in *PreTerminationCheck) DeepCopyInto(out *PreTerminationCheck)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PreTerminationCheckStatus

type PreTerminationCheckStatus struct {
	// Trigger marks the timestamp at which the trigger is sent.
	Trigger *metav1.Time `json:"trigger,omitempty"`

	// Check keeps track of health check result performed on the node
	Check bool `json:"check,omitempty"`
}

PreTerminationCheckStatus groups all status information for the pre-termination trigger and ensuing heath checks

func (*PreTerminationCheckStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreTerminationCheckStatus.

func (*PreTerminationCheckStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PreTerminationCheckStatusList

type PreTerminationCheckStatusList struct {
	Checks []PreTerminationCheckStatus `json:"checks,omitempty"`
}

PreTerminationCheckStatusList groups all the PreTerminationCheckStatus for a node

func (*PreTerminationCheckStatusList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreTerminationCheckStatusList.

func (*PreTerminationCheckStatusList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TLSConfig

type TLSConfig struct {
	// RootCA is the root CA shared between Cyclops and the upstream host.
	RootCA string `json:"rootCA,omitempty"`

	// Certificate is the crt given to Cyclops for mTLS. It is sent as part
	// of the request to the upstream host.
	Certificate string `json:"crt,omitempty"`

	// Key is the private key which forms a pair with the certificate. It is
	// sent as part of the request to the upstream host for mTLS.
	Key string `json:"key,omitempty"`
}

TLSConfig defined the tls configuration for the http client to make a request. +k8s:openapi-gen=true

func (*TLSConfig) DeepCopy

func (in *TLSConfig) DeepCopy() *TLSConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfig.

func (*TLSConfig) DeepCopyInto

func (in *TLSConfig) DeepCopyInto(out *TLSConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ValidationOptions

type ValidationOptions struct {
	// SkipMissingNodeNames is a boolean which determines whether named nodes selected in a CNR must
	// exist and be valid nodes before cycling can begin. If set to true named nodes which don't exist
	// will be ignored rather than transitioning the CNR to the failed phase.
	SkipMissingNamedNodes bool `json:"skipMissingNamedNodes,omitempty"`
}

ValidationOptions stores the settings to use for validating state of nodegroups in kube and the cloud provider for cycling the nodes.

func (*ValidationOptions) DeepCopy

func (in *ValidationOptions) DeepCopy() *ValidationOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationOptions.

func (*ValidationOptions) DeepCopyInto

func (in *ValidationOptions) DeepCopyInto(out *ValidationOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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