Documentation ¶
Index ¶
- func ChannelDnsSafeName(kafkaSecretName string) string
- func ChannelHostName(channelName, channelNamespace string) string
- func ChannelKey(channel *kafkav1alpha1.KafkaChannel) string
- func ChannelLogger(logger *zap.Logger, channel *kafkav1alpha1.KafkaChannel) *zap.Logger
- func DispatcherDnsSafeName(channel *kafkav1alpha1.KafkaChannel) string
- func GenerateValidDnsName(name string, length int, prefix bool, suffix bool) string
- func KubernetesResourceFinalizerName(finalizerSuffix string) string
- func NewChannelOwnerReference(channel *kafkav1alpha1.KafkaChannel) metav1.OwnerReference
- func NewSecretOwnerReference(secret *corev1.Secret) metav1.OwnerReference
- func NewSubscriptionControllerRef(subscription *messagingv1alpha1.Subscription) metav1.OwnerReference
- func NumPartitions(channel *kafkav1alpha1.KafkaChannel, environment *env.Environment, ...) int
- func ReplicationFactor(channel *kafkav1alpha1.KafkaChannel, environment *env.Environment, ...) int
- func RetentionMillis(channel *kafkav1alpha1.KafkaChannel, environment *env.Environment, ...) int64
- func SecretLogger(logger *zap.Logger, secret *corev1.Secret) *zap.Logger
- func SubscriptionLogger(logger *zap.Logger, subscription *messagingv1alpha1.Subscription) *zap.Logger
- func TopicName(channel *kafkav1alpha1.KafkaChannel) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChannelDnsSafeName ¶
Create A DNS Safe Name For The Channel Deployment Using The Specified Kafka Secret
Note - The current implementation creates a single Channel Deployment for each
Kafka Authentication (K8S Secrets) instance.
func ChannelHostName ¶
Channel Host Naming Utility
func ChannelKey ¶
func ChannelKey(channel *kafkav1alpha1.KafkaChannel) string
Create A Knative Reconciler "Key" Formatted Representation Of The Specified Channel
func ChannelLogger ¶
func ChannelLogger(logger *zap.Logger, channel *kafkav1alpha1.KafkaChannel) *zap.Logger
Get A Logger With Channel Info
func DispatcherDnsSafeName ¶
func DispatcherDnsSafeName(channel *kafkav1alpha1.KafkaChannel) string
Create A DNS Safe Name For The Specified KafkaChannel Suitable For Use With K8S Services
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 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 *kafkav1alpha1.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 *messagingv1alpha1.Subscription) metav1.OwnerReference
Create A New ControllerReference Model For The Specified Subscription
func NumPartitions ¶
func NumPartitions(channel *kafkav1alpha1.KafkaChannel, environment *env.Environment, logger *zap.Logger) int
Utility Function To Get The NumPartitions - First From Channel Spec And Then From Environment
func ReplicationFactor ¶
func ReplicationFactor(channel *kafkav1alpha1.KafkaChannel, environment *env.Environment, logger *zap.Logger) int
Utility Function To Get The ReplicationFactor - First From Channel Spec And Then From Environment
func RetentionMillis ¶
func RetentionMillis(channel *kafkav1alpha1.KafkaChannel, environment *env.Environment, logger *zap.Logger) int64
Utility Function To Get The RetentionMillis - First From Channel Spec And Then From Environment
func SecretLogger ¶
Get A Logger With Secret Info
func SubscriptionLogger ¶
func SubscriptionLogger(logger *zap.Logger, subscription *messagingv1alpha1.Subscription) *zap.Logger
Get A Logger With Subscription Info
func TopicName ¶
func TopicName(channel *kafkav1alpha1.KafkaChannel) string
Get The TopicName For Specified KafkaChannel (ChannelNamespace.ChannelName)
Types ¶
This section is empty.