resources

package
v0.0.0-...-d19fc40 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IngressName is the name used for the ingress container.
	IngressName = "ingress"
	// FanoutName is the name used for the fanout container.
	FanoutName = "fanout"
	// RetryName is the name used for the retry container.
	RetryName          = "retry"
	BrokerCellLabelKey = "brokerCell"
)

Variables

This section is empty.

Functions

func CommonLabels

func CommonLabels(brokerCellName string) map[string]string

func Labels

func Labels(brokerCellName, componentName string) map[string]string

Labels generates the labels present on all resources representing the component of the given BrokerCell.

func MakeFanoutDeployment

func MakeFanoutDeployment(args FanoutArgs) *appsv1.Deployment

MakeFanoutDeployment creates the fanout Deployment object.

func MakeHorizontalPodAutoscaler

func MakeHorizontalPodAutoscaler(deployment *appsv1.Deployment, args AutoscalingArgs) *hpav2beta2.HorizontalPodAutoscaler

MakeHorizontalPodAutoscaler makes an HPA for the given arguments.

func MakeIngressDeployment

func MakeIngressDeployment(args IngressArgs) *appsv1.Deployment

MakeIngressDeployment creates the ingress Deployment object.

func MakeIngressService

func MakeIngressService(args IngressArgs) *corev1.Service

MakeIngressService creates the ingress Service.

func MakeRetryDeployment

func MakeRetryDeployment(args RetryArgs) *appsv1.Deployment

MakeRetryDeployment creates the retry Deployment object.

func MakeTargetsConfig

func MakeTargetsConfig(bc *intv1alpha1.BrokerCell, brokerTargets config.Targets) (*corev1.ConfigMap, error)

func Name

func Name(brokerCellName, componentName string) string

Name creates a name for the component (ingress/fanout/retry).

func TargetsConfigMapEqual

func TargetsConfigMapEqual(cm1, cm2 *corev1.ConfigMap) bool

TargetsConfigMapEqual compares the binary data contained in two TargetsConfig ConfigMaps and returns true if and only if the inputs are valid and the unmarshaled binary data are equal.

Types

type Args

type Args struct {
	ComponentName      string
	BrokerCell         *intv1alpha1.BrokerCell
	Image              string
	ServiceAccountName string
	MetricsPort        int
	AllowIstioSidecar  bool
	CPURequest         string
	CPULimit           string
	MemoryRequest      string
	MemoryLimit        string
}

Args are the common arguments to create a Broker's data plane Deployment.

type AutoscalingArgs

type AutoscalingArgs struct {
	ComponentName     string
	BrokerCell        *intv1alpha1.BrokerCell
	AvgCPUUtilization *int32
	AvgMemoryUsage    *string
	MaxReplicas       int32
	MinReplicas       int32
}

AutoscalingArgs are the arguments to create HPA for deployments.

type FanoutArgs

type FanoutArgs struct {
	Args
}

FanoutArgs are the arguments to create a Broker's fanout Deployment.

type IngressArgs

type IngressArgs struct {
	Args
	Port int
}

IngressArgs are the arguments to create a Broker's ingress Deployment.

type RetryArgs

type RetryArgs struct {
	Args
}

RetryArgs are the arguments to create a Broker's retry Deployment.

Jump to

Keyboard shortcuts

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