resources

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 18 Imported by: 3

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"

	// the annotation key of the time to trigger rollout restart of the deployments
	IngressRestartTimeAnnotationKey = "events.cloud.google.com/ingressRestartRequestedAt"
	FanoutRestartTimeAnnotationKey  = "events.cloud.google.com/fanoutRestartRequestedAt"
	RetryRestartTimeAnnotationKey   = "events.cloud.google.com/retryRestartRequestedAt"
	RolloutRestartTimeAnnotationKey = "events.cloud.google.com/RestartRequestedAt"
	// IngressFilteringEnabledAnnotationKey is the annotation key for enabling ingress filtering.
	// TODO(#1804): remove this constant when enabling the feature by default.
	IngressFilteringEnabledAnnotationKey = "events.cloud.google.com/ingressFilteringEnabled"
)

Variables

This section is empty.

Functions

func CommonLabels added in v0.16.0

func CommonLabels(brokerCellName string) map[string]string

func GetLabelSelector added in v0.20.0

func GetLabelSelector(brokerCellName, componentName string) labels.Selector

GetLabelSelector get a label selector with brokercell's common labels.

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 added in v0.16.0

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 added in v0.16.0

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 added in v0.16.2

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
	RolloutRestartTime string
	AuthType           authcheck.AuthType
}

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

type AutoscalingArgs added in v0.16.0

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
	// TODO(#1804): remove this field when enabling the feature by default.
	EnableIngressFilter bool
}

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