registration

package
v0.0.0-...-053215c Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConditionSynced       = "Synced"
	ConditionRegistered   = "Registered"
	ConditionDeregistered = "Deregistered"
	ConditionACLsUpdated  = "ACLsUpdated"
)

Conditions.

View Source
const (
	SyncError                 = "SyncError"
	ConsulErrorRegistration   = "ConsulErrorRegistration"
	ConsulErrorDeregistration = "ConsulErrorDeregistration"
	ConsulErrorACL            = "ConsulErrorACL"
	ConsulDeregistration      = "ConsulDeregistration"
)

Status Reasons.

View Source
const NotInServiceMeshFilter = "ServiceMeta[\"managed-by\"] != \"consul-k8s-endpoints-controller\""
View Source
const (
	RegistrationFinalizer = "registration.finalizers.consul.hashicorp.com"
)

Variables

View Source
var (
	ErrRegisteringService   = fmt.Errorf("error registering service")
	ErrDeregisteringService = fmt.Errorf("error deregistering service")
	ErrUpdatingACLRoles     = fmt.Errorf("error updating ACL roles")
	ErrRemovingACLRoles     = fmt.Errorf("error removing ACL roles")
)

Functions

This section is empty.

Types

type RegistrationCache

type RegistrationCache struct {
	ConsulClientConfig  *consul.Config
	ConsulServerConnMgr consul.ServerConnectionManager

	Services map[string]*v1alpha1.Registration

	UpdateChan chan string
	// contains filtered or unexported fields
}

func NewRegistrationCache

func NewRegistrationCache(consulClientConfig *consul.Config, consulServerConnMgr consul.ServerConnectionManager) *RegistrationCache

type RegistrationsController

type RegistrationsController struct {
	client.Client
	configentries.FinalizerPatcher
	Scheme *runtime.Scheme
	Cache  *RegistrationCache
	Log    logr.Logger
}

RegistrationsController is the controller for Registrations resources.

func (*RegistrationsController) Logger

func (*RegistrationsController) Reconcile

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

func (*RegistrationsController) SetupWithManager

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

func (*RegistrationsController) UpdateStatus

func (r *RegistrationsController) UpdateStatus(ctx context.Context, log logr.Logger, registration *v1alpha1.Registration, result Result) error

type Result

type Result struct {
	Registering        bool
	ConsulDeregistered bool
	Sync               error
	Registration       error
	Deregistration     error
	ACLUpdate          error
	Finalizer          error
}

Jump to

Keyboard shortcuts

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