eventing

package
v0.0.0-...-662e130 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PublisherName = "eventing-publisher-proxy"

	PublisherSecretClientIDKey      = "client-id"
	PublisherSecretClientSecretKey  = "client-secret"
	PublisherSecretTokenEndpointKey = "token-endpoint"

	PublisherSecretEMSURLKey       = "ems-publish-url" //nolint:gosec // no hardcoded secret, just a lookup key
	PublisherSecretBEBNamespaceKey = "beb-namespace"

	PriorityClassName             = "eventing-manager-priority-class"
	TerminationGracePeriodSeconds = int64(30)
)

Variables

View Source
var (
	ErrUnknownBackendType = errors.New("unknown backend type")
	ErrEPPDeployFailed    = errors.New("failed to apply Publisher Proxy deployment")
)

Functions

func GetPublisherClusterRoleBindingName

func GetPublisherClusterRoleBindingName(eventing v1alpha1.Eventing) string

func GetPublisherClusterRoleName

func GetPublisherClusterRoleName(eventing v1alpha1.Eventing) string

func GetPublisherDeploymentName

func GetPublisherDeploymentName(eventing v1alpha1.Eventing) string

func GetPublisherHealthServiceName

func GetPublisherHealthServiceName(eventing v1alpha1.Eventing) string

func GetPublisherMetricsServiceName

func GetPublisherMetricsServiceName(eventing v1alpha1.Eventing) string

func GetPublisherPublishServiceName

func GetPublisherPublishServiceName(eventing v1alpha1.Eventing) string

func GetPublisherServiceAccountName

func GetPublisherServiceAccountName(eventing v1alpha1.Eventing) string

Types

type DeployOpt

type DeployOpt func(deployment *kappsv1.Deployment)

func WithAffinity

func WithAffinity(publisherName string) DeployOpt

func WithBEBEnvVars

func WithBEBEnvVars(publisherName string, publisherConfig env.PublisherConfig,
	eventing *v1alpha1.Eventing,
) DeployOpt

func WithContainers

func WithContainers(publisherConfig env.PublisherConfig, eventing *v1alpha1.Eventing) DeployOpt

func WithLabels

func WithLabels(publisherName string, backendType v1alpha1.BackendType) DeployOpt

func WithLogEnvVars

func WithLogEnvVars(publisherConfig env.PublisherConfig, eventing *v1alpha1.Eventing) DeployOpt

func WithNATSEnvVars

func WithNATSEnvVars(natsConfig env.NATSConfig, publisherConfig env.PublisherConfig,
	eventing *v1alpha1.Eventing,
) DeployOpt

func WithPriorityClassName

func WithPriorityClassName(name string) DeployOpt

func WithSelector

func WithSelector(publisherName string) DeployOpt

type EventingManager

type EventingManager struct {
	client.Client
	// contains filtered or unexported fields
}

func (EventingManager) DeletePublisherProxyResources

func (em EventingManager) DeletePublisherProxyResources(ctx context.Context, eventing *v1alpha1.Eventing) error

func (EventingManager) DeployPublisherProxy

func (em EventingManager) DeployPublisherProxy(
	ctx context.Context,
	eventing *v1alpha1.Eventing,
	natsConfig *env.NATSConfig,
	backendType v1alpha1.BackendType,
) (*kappsv1.Deployment, error)

func (EventingManager) DeployPublisherProxyResources

func (em EventingManager) DeployPublisherProxyResources(
	ctx context.Context,
	eventing *v1alpha1.Eventing,
	publisherDeployment *kappsv1.Deployment,
) error

func (EventingManager) GetBackendConfig

func (em EventingManager) GetBackendConfig() *env.BackendConfig

func (EventingManager) IsNATSAvailable

func (em EventingManager) IsNATSAvailable(ctx context.Context, namespace string) (bool, error)

func (*EventingManager) SetBackendConfig

func (em *EventingManager) SetBackendConfig(config env.BackendConfig)

func (*EventingManager) SubscriptionExists

func (em *EventingManager) SubscriptionExists(ctx context.Context) (bool, error)

type Manager

type Manager interface {
	IsNATSAvailable(ctx context.Context, namespace string) (bool, error)
	DeployPublisherProxy(
		ctx context.Context,
		eventing *v1alpha1.Eventing,
		natsConfig *env.NATSConfig,
		backendType v1alpha1.BackendType) (*kappsv1.Deployment, error)
	DeployPublisherProxyResources(ctx context.Context, eventing *v1alpha1.Eventing, deploy *kappsv1.Deployment) error
	DeletePublisherProxyResources(ctx context.Context, eventing *v1alpha1.Eventing) error
	GetBackendConfig() *env.BackendConfig
	SetBackendConfig(config env.BackendConfig)
	SubscriptionExists(ctx context.Context) (bool, error)
}

func NewEventingManager

func NewEventingManager(
	ctx context.Context,
	client client.Client,
	kubeClient k8s.Client,
	backendConfig env.BackendConfig,
	logger *logger.Logger,
	recorder record.EventRecorder,
) Manager

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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