utils

package
v0.0.0-...-11b31ba Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Domain               = "domain.com"
	NameFormat           = "name-%s"
	NamespaceFormat      = "namespace-%s"
	PublisherProxySuffix = "publisher-proxy"
)

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

func FindObjectByKind

func FindObjectByKind(kind string, objects []client.Object) (client.Object, error)

func FindServiceFromK8sObjects

func FindServiceFromK8sObjects(name string, objects []client.Object) (client.Object, error)

func GetRandString

func GetRandString(length int) string

func GetRandomName

func GetRandomName() string

func GetRandomNamespaceName

func GetRandomNamespaceName() string

func HasOwnerReference

func HasOwnerReference(object client.Object, eventingCR v1alpha1.Eventing) bool

func IsEPPClusterRoleBindingCorrect

func IsEPPClusterRoleBindingCorrect(clusterRoleBinding krbacv1.ClusterRoleBinding, eventingCR v1alpha1.Eventing) bool

func IsEPPClusterRoleCorrect

func IsEPPClusterRoleCorrect(clusterRole krbacv1.ClusterRole) bool

func IsEPPHealthServiceCorrect

func IsEPPHealthServiceCorrect(svc kcorev1.Service, eppDeployment kappsv1.Deployment) bool

func IsEPPMetricsServiceCorrect

func IsEPPMetricsServiceCorrect(svc kcorev1.Service, eppDeployment kappsv1.Deployment) bool

func IsEPPPublishServiceCorrect

func IsEPPPublishServiceCorrect(svc kcorev1.Service, eppDeployment kappsv1.Deployment) bool

func NewConfigMap

func NewConfigMap(name, namespace string) *kcorev1.ConfigMap

func NewDeployment

func NewDeployment(name, namespace string, annotations map[string]string) *kappsv1.Deployment

func NewEventMeshSecret

func NewEventMeshSecret(name, namespace string) *kcorev1.Secret

func NewEventingCR

func NewEventingCR(opts ...EventingOption) *v1alpha1.Eventing

func NewNamespace

func NewNamespace(name string) *kcorev1.Namespace

func NewOAuthSecret

func NewOAuthSecret(name, namespace string) *kcorev1.Secret

func NewSubscription

func NewSubscription(name, namespace string) *eventingv1alpha2.Subscription

Types

type EventingOption

type EventingOption func(*v1alpha1.Eventing) error

func WithEmptyBackend

func WithEmptyBackend() EventingOption

func WithEventMeshBackend

func WithEventMeshBackend(eventMeshSecretName string) EventingOption

func WithEventingCRFinalizer

func WithEventingCRFinalizer(finalizer string) EventingOption

func WithEventingCRMinimal

func WithEventingCRMinimal() EventingOption

func WithEventingCRName

func WithEventingCRName(name string) EventingOption

func WithEventingCRNamespace

func WithEventingCRNamespace(namespace string) EventingOption

func WithEventingDomain

func WithEventingDomain(domain string) EventingOption

func WithEventingEmptyBackend

func WithEventingEmptyBackend() EventingOption

func WithEventingEventTypePrefix

func WithEventingEventTypePrefix(eventTypePrefix string) EventingOption

func WithEventingInvalidBackend

func WithEventingInvalidBackend() EventingOption

func WithEventingLogLevel

func WithEventingLogLevel(logLevel string) EventingOption

func WithEventingPublisherData

func WithEventingPublisherData(minReplicas, maxReplicas int, requestCPU, requestMemory, limitCPU, limitMemory string) EventingOption

func WithEventingStreamData

func WithEventingStreamData(natsStorageType string, maxStreamSize string, natsStreamReplicas, maxMsgsPerTopic int) EventingOption

func WithNATSBackend

func WithNATSBackend() EventingOption

func WithStatusActiveBackend

func WithStatusActiveBackend(activeBackend v1alpha1.BackendType) EventingOption

func WithStatusConditions

func WithStatusConditions(conditions []kmetav1.Condition) EventingOption

func WithStatusState

func WithStatusState(state string) EventingOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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