Documentation ¶
Index ¶
- func ChannelHostName(channelName, channelNamespace string) string
- func ChannelKey(channel *kafkav1beta1.KafkaChannel) string
- func ChannelLogger(logger *zap.Logger, channel *kafkav1beta1.KafkaChannel) *zap.Logger
- func DispatcherDnsSafeName(channel *kafkav1beta1.KafkaChannel) string
- func GenerateHash(stringToHash string, length int) string
- func GenerateValidDnsName(name string, length int, prefix bool, suffix bool) string
- func HasFinalizer(finalizer string, objectMeta *metav1.ObjectMeta) bool
- func KubernetesResourceFinalizerName(finalizerSuffix string) string
- func NewChannelOwnerReference(channel *kafkav1beta1.KafkaChannel) metav1.OwnerReference
- func NewSecretOwnerReference(secret *corev1.Secret) metav1.OwnerReference
- func NewSubscriptionControllerRef(subscription *messagingv1.Subscription) metav1.OwnerReference
- func NumPartitions(channel *kafkav1beta1.KafkaChannel, configuration *config.EventingKafkaConfig, ...) int32
- func ReceiverDnsSafeName(kafkaSecretName string) string
- func RemoveFinalizer(finalizer string, objectMeta *metav1.ObjectMeta)
- func ReplicationFactor(channel *kafkav1beta1.KafkaChannel, configuration *config.EventingKafkaConfig, ...) int16
- func RetentionMillis(channel *kafkav1beta1.KafkaChannel, configuration *config.EventingKafkaConfig, ...) int64
- func SecretLogger(logger *zap.Logger, secret *corev1.Secret) *zap.Logger
- func SubscriptionLogger(logger *zap.Logger, subscription *messagingv1.Subscription) *zap.Logger
- func TopicName(channel *kafkav1beta1.KafkaChannel) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChannelHostName ¶
Channel Host Naming Utility
func ChannelKey ¶
func ChannelKey(channel *kafkav1beta1.KafkaChannel) string
Create A Knative Reconciler "Key" Formatted Representation Of The Specified Channel
func ChannelLogger ¶
func ChannelLogger(logger *zap.Logger, channel *kafkav1beta1.KafkaChannel) *zap.Logger
Get A Logger With Channel Info
func DispatcherDnsSafeName ¶
func DispatcherDnsSafeName(channel *kafkav1beta1.KafkaChannel) string
Create A DNS Safe Name For The Specified KafkaChannel Suitable For Use With K8S Services
func GenerateHash ¶
Generate An MD5 Hash Of A String And Return Desired Number Of Characters
func GenerateValidDnsName ¶
Return A Valid DNS Name Which Is As Close To The Specified Name As Possible & Truncated To The Smaller Of Specified Length / 63
func HasFinalizer ¶
func HasFinalizer(finalizer string, objectMeta *metav1.ObjectMeta) bool
Determine Whether ObjectMeta Contains Specified Finalizer
func KubernetesResourceFinalizerName ¶
Get A Kubernetes "Qualified" Finalizer Name With The Specified Suffix
When adding finalizers to Kubernetes built-in components (Secrets, ConfigMaps, Services, etc...) it is necessary to "qualify" the finalizer name by including a "/". Kubernetes performs validation on the finalizer names and only accepts the following values if NOT qualified ...
FinalizerOrphanDependents string = "orphan" FinalizerDeleteDependents string = "foregroundDeletion" FinalizerKubernetes FinalizerName = "kubernetes"
... and will produce the following error message ...
metadata.finalizers[0]: Invalid value: \"externaltarget-controller\": name is neither a standard finalizer name nor is it fully qualified
This is in contrast with Finalizers on a Custom Resource which can just be any arbitrary string. There was little to no documentation on this and it required tracing the Kubernetes pkg/apis/core source code to decipher what a "qualified" name format would be.
func NewChannelOwnerReference ¶
func NewChannelOwnerReference(channel *kafkav1beta1.KafkaChannel) metav1.OwnerReference
Create A New OwnerReference For The Specified KafkaChannel (Controller)
func NewSecretOwnerReference ¶
func NewSecretOwnerReference(secret *corev1.Secret) metav1.OwnerReference
Create A New OwnerReference For The Specified K8S Secret (Controller)
func NewSubscriptionControllerRef ¶
func NewSubscriptionControllerRef(subscription *messagingv1.Subscription) metav1.OwnerReference
Create A New ControllerReference Model For The Specified Subscription
func NumPartitions ¶
func NumPartitions(channel *kafkav1beta1.KafkaChannel, configuration *config.EventingKafkaConfig, logger *zap.Logger) int32
Utility Function To Get The NumPartitions - First From Channel Spec And Then From ConfigMap-Provided Settings
func ReceiverDnsSafeName ¶
Create A DNS Safe Name For The Receiver Deployment Using The Specified Kafka Secret
Note - The current implementation creates a single Receiver Deployment for each
Kafka Authentication (K8S Secrets) instance.
func RemoveFinalizer ¶
func RemoveFinalizer(finalizer string, objectMeta *metav1.ObjectMeta)
Remove The Specified Finalizer From The Object
func ReplicationFactor ¶
func ReplicationFactor(channel *kafkav1beta1.KafkaChannel, configuration *config.EventingKafkaConfig, logger *zap.Logger) int16
Utility Function To Get The ReplicationFactor - First From Channel Spec And Then From ConfigMap-Provided Settings
func RetentionMillis ¶
func RetentionMillis(channel *kafkav1beta1.KafkaChannel, configuration *config.EventingKafkaConfig, logger *zap.Logger) int64
Utility Function To Get The RetentionMillis - First From Channel Spec And Then From ConfigMap-Provided Settings
func SecretLogger ¶
Get A Logger With Secret Info
func SubscriptionLogger ¶
func SubscriptionLogger(logger *zap.Logger, subscription *messagingv1.Subscription) *zap.Logger
Get A Logger With Subscription Info
func TopicName ¶
func TopicName(channel *kafkav1beta1.KafkaChannel) string
Get The TopicName For Specified KafkaChannel (ChannelNamespace.ChannelName)
Types ¶
This section is empty.