builders

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServiceEnableApplicationPortsOnly = PortConfig{
	ExposeHTTP:    true,
	ExposeGRPC:    true,
	ExposeMetrics: true,
}
View Source
var ServiceEnableGRPCWithMetrics = PortConfig{
	ExposeGRPC:    true,
	ExposeMetrics: true,
}
View Source
var ServiceEnableHTTPWithMetrics = PortConfig{
	ExposeHTTP:    true,
	ExposeMetrics: true,
}
View Source
var ServiceEnableMetricsPortOnly = PortConfig{
	ExposeMetrics: true,
}
View Source
var ServiceEnableProfilingPortOnly = PortConfig{
	ExposeProfiling: true,
}

Functions

func ConvertRawExtensionToYaml

func ConvertRawExtensionToYaml(config runtime.RawExtension) (string, error)

ConvertRawExtensionToYaml converts a RawExtension input to Yaml

func CreateClusterRole

func CreateClusterRole(crdName string, crdNamespace string) *rbacv1.ClusterRole

func CreateSecret

func CreateSecret(appConfig runtime.RawExtension, secretName, secretNamespace, filename string) (*corev1.Secret, error)

func Ingress added in v0.4.1

func Ingress(
	name, namespace string,
	labels, annotations map[string]string,
	hostnames []string,
	serviceName, secret, path string,
	servicePort int32,
) (*networkingv1.Ingress, error)

func Service

func Service(
	name string,
	namespace string,
	labels, identityLabel map[string]string,
	appConfig *CommonApplicationConfig,
	portConfig PortConfig,
) *corev1.Service

func ServiceAccount added in v0.4.1

func ServiceAccount(name, namespace string, labels map[string]string, serviceAccountConfig *installv1alpha1.ServiceAccountConfig) *corev1.ServiceAccount

Types

type CommonApplicationConfig added in v0.4.1

type CommonApplicationConfig struct {
	HTTPPort     int32           `json:"httpPort"`
	HTTPNodePort int32           `json:"httpNodePort,omitempty"`
	GRPCPort     int32           `json:"grpcPort"`
	GRPCNodePort int32           `json:"grpcNodePort,omitempty"`
	MetricsPort  int32           `json:"metricsPort"`
	Profiling    ProfilingConfig `json:"profiling"`
	GRPC         GRPCConfig      `json:"grpc"`
}

func ParseCommonApplicationConfig added in v0.4.1

func ParseCommonApplicationConfig(rawAppConfig runtime.RawExtension) (*CommonApplicationConfig, error)

ParseCommonApplicationConfig parses the raw application config into a CommonApplicationConfig.

type GRPCConfig added in v0.4.1

type GRPCConfig struct {
	Enabled bool      `json:"enabled"`
	TLS     TLSConfig `json:"tls"`
}

type PortConfig added in v0.4.1

type PortConfig struct {
	ExposeHTTP      bool
	ExposeGRPC      bool
	ExposeMetrics   bool
	ExposeProfiling bool
}

PortConfig specifies which ports should be exposed by the service

type ProfilingConfig added in v0.4.1

type ProfilingConfig struct {
	Port int32 `json:"port"`
}

type TLSConfig added in v0.4.1

type TLSConfig struct {
	Enabled bool `json:"enabled"`
}

Jump to

Keyboard shortcuts

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