controller

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseKimupImage = "ghcr.io/orange-cloudavenue/"

	KimupName = "kimup"

	KimupOperator      = "operator"
	KimupOperatorName  = KimupName + "-" + KimupOperator
	KimupOperatorImage = BaseKimupImage + KimupOperatorName

	KimupController      = "controller"
	KimupControllerName  = KimupName + "-" + KimupController
	KimupControllerImage = BaseKimupImage + KimupControllerName
)
View Source
const (
	StateResourcesCreated string = "resources-created"

	StateReady string = "ready"
)
View Source
const (
	// Recommended Kubernetes Application Labels
	// KubernetesAppNameLabel is the name of the application
	KubernetesAppNameLabelKey = "app.kubernetes.io/name"

	// KubernetesAppVersionLabel is the version of the application
	KubernetesAppVersionLabelKey = "app.kubernetes.io/version"

	// KubernetesAppComponentLabel is the component of the application
	KubernetesAppComponentLabelKey = "app.kubernetes.io/component"

	KubernetesAppInstanceNameLabel = "app.kubernetes.io/instance"

	// KubernetesManagedByLabel is the tool being used to manage the operation of an application
	KubernetesManagedByLabelKey = "app.kubernetes.io/managed-by"

	// KubernetesPartOfLabel is the name of a higher level application this one is part of
	KubernetesPartOfLabelKey = "app.kubernetes.io/part-of"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageEvent

type ImageEvent string
const (
	ImageUpdate ImageEvent = "ImageUpdate"
)

type ImageReconciler

type ImageReconciler struct {
	client.Client
	KubeAPIClient *kubeclient.Client
	Scheme        *runtime.Scheme
	Recorder      record.EventRecorder
}

ImageReconciler reconciles a Image object

func (*ImageReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Image object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkgo.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*ImageReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ImageTagMutator added in v0.1.0

type ImageTagMutator struct {
	client.Client
	KubeAPIClient *kubeclient.Client
	Scheme        *runtime.Scheme
	// contains filtered or unexported fields
}

podAnnotator annotates Pods

func (*ImageTagMutator) Handle added in v0.1.0

func (*ImageTagMutator) SetupHandler added in v0.1.0

func (i *ImageTagMutator) SetupHandler() admission.Handler

func (*ImageTagMutator) SetupWebhookWithManager added in v0.1.0

func (i *ImageTagMutator) SetupWebhookWithManager(mgr ctrl.Manager) error

type KimupReconciler

type KimupReconciler struct {
	client.Client
	KubeAPIClient *kubeclient.Client
	Scheme        *runtime.Scheme
	Recorder      record.EventRecorder
}

KimupReconciler reconciles a Image object

func (*KimupReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkgo.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*KimupReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NamespaceReconciler added in v0.1.0

type NamespaceReconciler struct {
	client.Client
	KubeAPIClient *kubeclient.Client
	Scheme        *runtime.Scheme
	Recorder      record.EventRecorder
}

NamespaceReconciler reconciles a Namespace object

func (*NamespaceReconciler) Reconcile added in v0.1.0

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. the Image object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkgo.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*NamespaceReconciler) SetupWithManager added in v0.1.0

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

SetupWithManager sets up the controller with the Manager.

type Object

type Object struct {
	// contains filtered or unexported fields
}

func GetKimupControllerResources

func GetKimupControllerResources(ctx context.Context, ki v1alpha1.Kimup) []Object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳