controlplane

package
v0.15.0-alpha-rc8 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 56 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetASGByName

GetASGByName returns the existing ASG or nothing if it doesn't exist.

func GetClusterStatus

func GetClusterStatus(kopsCluster *kopsapi.Cluster, cloud fi.Cloud) (*kopsapi.ClusterStatus, error)

func PopulateClusterSpec

func PopulateClusterSpec(ctx context.Context, kopsCluster *kopsapi.Cluster, kopsClientset simple.Clientset, cloud fi.Cloud) (*kopsapi.Cluster, error)

PopulateClusterSpec populates the full cluster spec with some values it fetchs from provider

func PrepareKopsCloudResources

func PrepareKopsCloudResources(ctx context.Context, kopsClientset simple.Clientset, kopsCluster *kopsapi.Cluster, terraformOutputDir string, cloud fi.Cloud) error

PrepareCloudResources renders the terraform files and effectively apply them in the cloud provider

func RegionBySubnet

func RegionBySubnet(kopsControlPlane *controlplanev1alpha1.KopsControlPlane) (string, error)

Types

type KopsControlPlaneReconciler

type KopsControlPlaneReconciler struct {
	client.Client
	Scheme                           *runtime.Scheme
	Mux                              *sync.Mutex
	ControllerClass                  string
	Recorder                         record.EventRecorder
	TfExecPath                       string
	GetKopsClientSetFactory          func(configBase string) (simple.Clientset, error)
	BuildCloudFactory                func(*kopsapi.Cluster) (fi.Cloud, error)
	PopulateClusterSpecFactory       func(ctx context.Context, kopsCluster *kopsapi.Cluster, kopsClientset simple.Clientset, cloud fi.Cloud) (*kopsapi.Cluster, error)
	PrepareKopsCloudResourcesFactory func(ctx context.Context, kopsClientset simple.Clientset, kopsCluster *kopsapi.Cluster, terraformOutputDir string, cloud fi.Cloud) error
	ApplyTerraformFactory            func(ctx context.Context, terraformDir, tfExecPath string, credentials aws.Credentials) error
	DestroyTerraformFactory          func(ctx context.Context, terraformDir, tfExecPath string, credentials aws.Credentials) error
	KopsDeleteResourcesFactory       func(ctx context.Context, cloud fi.Cloud, kopsClientset simple.Clientset, kopsCluster *kopsapi.Cluster) error
	ValidateKopsClusterFactory       func(kubeConfig *rest.Config, kopsCluster *kopsapi.Cluster, cloud fi.Cloud, igs *kopsapi.InstanceGroupList) (*validation.ValidationCluster, error)
	GetClusterStatusFactory          func(kopsCluster *kopsapi.Cluster, cloud fi.Cloud) (*kopsapi.ClusterStatus, error)
	GetASGByNameFactory              func(kopsMachinePool *infrastructurev1alpha1.KopsMachinePool, kopsControlPlane *controlplanev1alpha1.KopsControlPlane, credentials *aws.Credentials) (*asgTypes.AutoScalingGroup, error)
}

KopsControlPlaneReconciler reconciles a KopsControlPlane object

func (*KopsControlPlaneReconciler) PrepareCustomCloudResources

func (r *KopsControlPlaneReconciler) PrepareCustomCloudResources(ctx context.Context, kopsCluster *kopsapi.Cluster, kopsControlPlane *controlplanev1alpha1.KopsControlPlane, kmps []infrastructurev1alpha1.KopsMachinePool, shouldEnableKarpenter bool, configBase, terraformOutputDir string, shouldIgnoreSG bool) error

func (*KopsControlPlaneReconciler) Reconcile

func (r *KopsControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reconciliationErr error)

func (*KopsControlPlaneReconciler) SetupWithManager

func (r *KopsControlPlaneReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, workerCount int) error

SetupWithManager sets up the controller with the Manager.

type KopsControlPlaneReconciliation

type KopsControlPlaneReconciliation struct {
	KopsControlPlaneReconciler
	// contains filtered or unexported fields
}

func (*KopsControlPlaneReconciliation) ReconcileKopsSecrets

func (r *KopsControlPlaneReconciliation) ReconcileKopsSecrets(ctx context.Context, kopsClientset simple.Clientset, kopsCluster *kopsapi.Cluster) error

this needs to be better named

Jump to

Keyboard shortcuts

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