controllers

package
v0.0.0-...-162ddea Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FinalizerStr = "finalizer.instancegroups.keikoproj.io"

	ErrorReasonGetFailed               = "GetRequest"
	ErrorReasonDefaultsUnmarshalFailed = "UnmarshalDefaults"
	ErrorReasonDefaultsApplyFailed     = "ApplyDefaults"
	ErrorReasonValidationFailed        = "ResourceValidation"
	ErrorReasonReconcileFailed         = "HandleReconcile"
)
View Source
const (
	ConfigMapName = "instance-manager"
)

Variables

This section is empty.

Functions

func HandleReconcileRequest

func HandleReconcileRequest(d CloudDeployer) error

Types

type CloudDeployer

type CloudDeployer interface {
	CloudDiscovery() error            // Discover cloud resources
	StateDiscovery()                  // Derive state
	Create() error                    // CREATE Operation
	Update() error                    // UPDATE Operation
	Delete() error                    // DELETE Operation
	UpgradeNodes() error              // Process upgrade strategy
	BootstrapNodes() error            // Bootstrap Provisioned Resources
	GetState() v1alpha.ReconcileState // Gets the current state type of the instance group
	SetState(v1alpha.ReconcileState)  // Sets the current state of the instance group
	IsReady() bool                    // Returns true if state is Ready
	Locked() bool                     // Returns true if instanceGroup is locked
}

CloudDeployer is a common interface that should be fulfilled by each provisioner

type InstanceGroupAuthenticator

type InstanceGroupAuthenticator struct {
	Aws        awsprovider.AwsWorker
	Kubernetes kubeprovider.KubernetesClientSet
}

type InstanceGroupReconciler

type InstanceGroupReconciler struct {
	client.Client
	SpotRecommendationTime      float64
	ConfigNamespace             string
	NodeRelabel                 bool
	Log                         logr.Logger
	MaxParallel                 int
	Auth                        *InstanceGroupAuthenticator
	ConfigMap                   *corev1.ConfigMap
	Namespaces                  map[string]corev1.Namespace
	NamespacesLock              *sync.RWMutex
	ConfigRetention             int
	Metrics                     *common.MetricsCollector
	DisableWinClusterInjection  bool
	DefaultScalingConfiguration *v1alpha1.ScalingConfigurationType
}

InstanceGroupReconciler reconciles an InstanceGroup object

func (*InstanceGroupReconciler) Finalize

func (r *InstanceGroupReconciler) Finalize(instanceGroup *v1alpha1.InstanceGroup)

func (*InstanceGroupReconciler) IsNamespaceAnnotated

func (r *InstanceGroupReconciler) IsNamespaceAnnotated(namespace, key, value string) bool

func (*InstanceGroupReconciler) PatchStatus

func (r *InstanceGroupReconciler) PatchStatus(instanceGroup *v1alpha1.InstanceGroup, patch client.Patch)

func (*InstanceGroupReconciler) Reconcile

func (r *InstanceGroupReconciler) Reconcile(ctxt context.Context, req ctrl.Request) (ctrl.Result, error)

func (*InstanceGroupReconciler) SetFinalizer

func (r *InstanceGroupReconciler) SetFinalizer(instanceGroup *v1alpha1.InstanceGroup)

func (*InstanceGroupReconciler) SetupWithManager

func (r *InstanceGroupReconciler) SetupWithManager(mgr ctrl.Manager) error

type LabelPatch

type LabelPatch struct {
	Metadata *NodeLabels `json:"metadata,omitempty"`
}

type NodeLabels

type NodeLabels struct {
	Labels map[string]string `json:"labels,omitempty"`
}

Directories

Path Synopsis
providers
aws
eks

Jump to

Keyboard shortcuts

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