controllers

package
v1.11.8 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CI_VARIABLE_API_URL                     = "COMMODORE_API_URL"
	CI_VARIABLE_API_TOKEN                   = "COMMODORE_API_TOKEN"
	CI_VARIABLE_CLUSTERS                    = "CLUSTERS"
	CI_VARIABLE_PREFIX_CLUSTER_ACCESS_TOKEN = "ACCESS_TOKEN_"
	SECRET_KEY_API_TOKEN                    = "token"
	SECRET_KEY_GITLAB_TOKEN                 = "token"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterReconciler

type ClusterReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	CreateSATokenSecret   bool
	DefaultCreationPolicy synv1alpha1.CreationPolicy
	DefaultDeletionPolicy synv1alpha1.DeletionPolicy
	UseVault              bool
	DeleteProtection      bool
}

ClusterReconciler reconciles a Cluster object

func (*ClusterReconciler) Reconcile

func (r *ClusterReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

func (*ClusterReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type GitRepoReconciler

type GitRepoReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	DefaultCreationPolicy synv1alpha1.CreationPolicy

	// MaxReconcileInterval is the maximum time between two reconciliations.
	MaxReconcileInterval time.Duration

	DeleteProtection bool
}

GitRepoReconciler reconciles a GitRepo object

func (*GitRepoReconciler) Reconcile

func (r *GitRepoReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

Reconcile will create or delete a git repository based on the event. The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue. ATTENTION: do not manipulate the spec here, this will lead to loops, as the specs are defined in the gitrepotemplates of the other CRDs (tenant, cluster).

func (*GitRepoReconciler) SetupWithManager

func (r *GitRepoReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type TenantCompilePipelineReconciler added in v1.11.0

type TenantCompilePipelineReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	ApiUrl string
}

TenantCompilePipelineReconciler reconciles a Tenant object, specifically the `Spec.CompilePipeline` field, updating the corresponding tenant's git repo accordingly.

func (*TenantCompilePipelineReconciler) Reconcile added in v1.11.0

func (*TenantCompilePipelineReconciler) SetupWithManager added in v1.11.0

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

SetupWithManager sets up the controller with the Manager.

type TenantReconciler

type TenantReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	CreateSATokenSecret   bool
	DefaultCreationPolicy synv1alpha1.CreationPolicy
	DefaultDeletionPolicy synv1alpha1.DeletionPolicy

	DefaultGlobalGitRepoUrl string
	DeleteProtection        bool
}

TenantReconciler reconciles a Tenant object

func (*TenantReconciler) Reconcile

func (r *TenantReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

Reconcile The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

func (*TenantReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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