resources

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessagingRoleLabel = "messaging.knative.dev/role"
	MessagingRole      = "kafka-channel"
)
View Source
const (
	DispatcherContainerName = "dispatcher"
)

Variables

This section is empty.

Functions

func MakeChannelServiceName

func MakeChannelServiceName(name string) string

func MakeDispatcherService

func MakeDispatcherService(namespace string) *corev1.Service

MakeDispatcherService creates the Kafka dispatcher service

func MakeK8sService

func MakeK8sService(kc *v1beta1.KafkaChannel, opts ...ServiceOption) (*corev1.Service, error)

MakeK8sService creates a new K8s Service for a Channel resource. It also sets the appropriate OwnerReferences on the resource so handleObject can discover the Channel resource that 'owns' it. As well as being garbage collected when the Channel is deleted.

func MakeRoleBinding

func MakeRoleBinding(ns, name string, sa *corev1.ServiceAccount, roleName string) *rbacv1.RoleBinding

MakeRoleBinding creates a RoleBinding object for the Kafka dispatcher service account 'sa' in the Namespace 'ns'.

func MakeServiceAccount

func MakeServiceAccount(namespace, name string) *corev1.ServiceAccount

MakeServiceAccount creates a ServiceAccount object for the Namespace 'ns'.

Types

type DispatcherArgs

type DispatcherArgs struct {
	DispatcherScope     string
	DispatcherNamespace string
	Image               string
	Replicas            int32
	ServiceAccount      string
	ConfigMapHash       string
	OwnerRef            metav1.OwnerReference
}

type DispatcherBuilder added in v0.23.6

type DispatcherBuilder struct {
	// contains filtered or unexported fields
}

func NewDispatcherBuilder added in v0.23.6

func NewDispatcherBuilder() *DispatcherBuilder

NewDispatcherBuilder returns a builder which builds from scratch a dispatcher deployment. Intended to be used when creating the dispatcher deployment for the first time.

func NewDispatcherBuilderFromDeployment added in v0.23.6

func NewDispatcherBuilderFromDeployment(d *v1.Deployment) *DispatcherBuilder

NewDispatcherBuilderFromDeployment returns a builder which builds a dispatcher deployment from the given deployment. Intended to be used when updating an existing dispatcher deployment.

func (*DispatcherBuilder) Build added in v0.23.6

func (b *DispatcherBuilder) Build() *v1.Deployment

func (*DispatcherBuilder) WithArgs added in v0.23.6

type ServiceOption

type ServiceOption func(*corev1.Service) error

ServiceOption can be used to optionally modify the K8s service in MakeK8sService.

func ExternalService

func ExternalService(namespace, service string) ServiceOption

ExternalService is a functional option for MakeK8sService to create a K8s service of type ExternalName pointing to the specified service in a namespace.

Jump to

Keyboard shortcuts

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