controllers

package
v0.0.1-pre3 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceNotFoundReason = "ServiceNotFound"
	APINotFoundReason     = "APINotFound"
	InvalidSpecReason     = "InvalidSpec"
	UnknownReason         = "Unknown"
)
View Source
const (
	KuadrantAPILabelPrefix = "api.kuadrant.io/"
	KuadrantAPILabelValue  = "true"
)
View Source
const (
	KuadrantDiscoveryLabel                   = "discovery.kuadrant.io/enabled"
	KuadrantDiscoveryAnnotationScheme        = "discovery.kuadrant.io/scheme"
	KuadrantDiscoveryAnnotationAPIName       = "discovery.kuadrant.io/api-name"
	KuadrantDiscoveryAnnotationTag           = "discovery.kuadrant.io/tag"
	KuadrantDiscoveryAnnotationPort          = "discovery.kuadrant.io/port"
	KuadrantDiscoveryAnnotationOASConfigMap  = "discovery.kuadrant.io/oas-configmap"
	KuadrantDiscoveryAnnotationMatchPath     = "discovery.kuadrant.io/matchpath"
	KuadrantDiscoveryAnnotationMatchPathType = "discovery.kuadrant.io/matchpath-type"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIFactory

type APIFactory struct {
	Name                 string
	Namespace            string
	DestinationSchema    string
	DestinationName      string
	DestinationNamespace string
	DestinationPort      *int32
	OASContent           *string
	HTTPPathMatch        *gatewayapiv1alpha1.HTTPPathMatch
}

func (*APIFactory) API

func (a *APIFactory) API() *networkingv1beta1.API

type APIProductAPIEventMapper

type APIProductAPIEventMapper struct {
	K8sClient client.Client
	Logger    logr.Logger
}

APIProductAPIEventMapper is an EventHandler that maps API object events to APIProduct events.

func (*APIProductAPIEventMapper) Map

type APIProductReconciler

type APIProductReconciler struct {
	*reconcilers.BaseReconciler
	IngressProvider ingressproviders.IngressProvider
	AuthProvider    authproviders.AuthProvider
}

APIProductReconciler reconciles a APIProduct object

func (*APIProductReconciler) Reconcile

func (r *APIProductReconciler) 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.

func (*APIProductReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ServiceReconciler

type ServiceReconciler struct {
	*reconcilers.BaseReconciler
}

ServiceReconciler reconciles a Service object

func (*ServiceReconciler) APIFromAnnotations

func (r *ServiceReconciler) APIFromAnnotations(ctx context.Context, service *corev1.Service) (*networkingv1beta1.API, error)

func (*ServiceReconciler) Reconcile

func (r *ServiceReconciler) 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 Service 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://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.7.2/pkg/reconcile

func (*ServiceReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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