values

package
v0.0.0-...-e5f8ed5 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FluentdGCPProjectEnv Fluentd environment variable to modify GCP Project name
	FluentdGCPProjectEnv = "FLUENTD_GCP_PROJECT"
	// FluentdBQDatasetEnv Fluentd environment variable to modify BQ dataset name to write into
	FluentdBQDatasetEnv = "FLUENTD_BQ_DATASET"
	// FluentdBQTableEnv Fluentd environment variable to modify BQ table name to write into
	FluentdBQTableEnv = "FLUENTD_BQ_TABLE"

	// FluentdKafkaBrokerEnv Fluentd environment variable to source kafka broker
	FluentdKafkaBrokerEnv = "FLUENTD_KAFKA_BROKER"
	// FluentdKafkaTopicEnv Fluentd environment variable to modify source kafka topic
	FluentdKafkaTopicEnv = "FLUENTD_KAFKA_TOPIC"
	// FluentdProtoClassNameEnv Fluentd environment variable to modify protobuf name for parsing kafka payload
	FluentdProtoClassNameEnv = "FLUENTD_KAFKA_PROTO_CLASS_NAME"
	// FluentdTagEnv Fluentd environment variable to modify tag name
	FluentdTagEnv = "FLUENTD_TAG"
)

Variables

This section is empty.

Functions

func ToRaw

func ToRaw(val any) (map[string]any, error)

ToRaw converts struct value to map[string]any

Types

type AutoscalingConfig

type AutoscalingConfig struct {
	// Enable/disable autoscaling flag
	Enabled bool `json:"enabled,omitempty"`
	// Minimum number of replicas for the deployment
	MinReplicas int `json:"minReplicas,omitempty"`
	// Maximum number of replicas for the deployment
	MaxReplicas int `json:"maxReplicas,omitempty"`
	// CPU utilization target in percentage
	TargetCPUUtilizationPercentage int `json:"targetCPUUtilizationPercentage,omitempty"`
	// Memory utilization target in percentage
	TargetMemoryUtilizationPercentage int `json:"targetMemoryUtilizationPercentage,omitempty"`
}

AutoscalingConfig Autoscaling configuration

type Credentials

type Credentials struct {
	// Name of secret
	Name string `json:"name,omitempty"`
	// Key of secret
	Key string `json:"key,omitempty"`
}

Credentials existing secret

type Env

type Env struct {
	// Environment variable name
	Name string `json:"name,omitempty"`
	// Environment variable value
	Value string `json:"value,omitempty"`
}

Env environment variable

func MergeEnvs

func MergeEnvs(left []Env, right []Env) []Env

MergeEnvs merge 2 slices of Env and give priority for right slice

type FluentdHelmValues

type FluentdHelmValues struct {
	// Full name override
	NameOverride string `json:"nameOverride,omitempty"`
	// FluentD image to be deployed
	Image ImageConfig `json:"image,omitempty"`
	// Annotations to be added to the deployment
	Annotations map[string]string `json:"annotations,omitempty"`
	// Additional labels to be added to the deployment
	ExtraLabels map[string]string `json:"extraLabels,omitempty"`
	// Number of replica
	ReplicaCount int `json:"replicaCount,omitempty"`
	// Resource configuration (i.e. CPU & Memory requests and limits)
	Resources ResourcesConfig `json:"resources,omitempty"`
	// kubernetes service account to be mounted to the pod created by the deployment
	KubernetesServiceAccount string `json:"kubernetesServiceAccount,omitempty"`
	// Google Service account to be mounted on the pod created by the deployment
	// The service account is used as the identity when flushing logs to BQ
	GCPServiceAccount GCPServiceAccount `json:"gcpServiceAccount,omitempty"`
	// Persistent volume claim configuration
	PVCConfig PVCConfig `json:"pvcConfig,omitempty"`
	// Additional environment variables to be added to fluentd deployment
	ExtraEnvs []Env `json:"extraEnvs,omitempty"`
	// Autoscaling configuration of the deployment
	Autoscaling AutoscalingConfig `json:"autoscaling,omitempty"`
	// FluentdHelmValues config
	FluentdConfig string `json:"fluentdConfig,omitempty"`
	// FluentdHelmValues enable flag is used when deploying observation service
	Enabled bool `json:"enabled,omitempty"`
}

FluentdHelmValues Fluentd helm values

type GCPServiceAccount

type GCPServiceAccount struct {
	// String containing base64 of the GCP service account json
	CredentialsData string `json:"credentialsData,omitempty"`
	// Credentials allow mounting an existing secret
	Credentials Credentials `json:"credentials,omitempty"`
}

GCPServiceAccount configuration for setting the GCP service account to use

type ImageConfig

type ImageConfig struct {
	// docker registry
	Registry string `json:"registry,omitempty"`
	// docker repository
	Repository string `json:"repository,omitempty"`
	// docker tag
	Tag string `json:"tag,omitempty"`
	// image pull policy
	PullPolicy string `json:"pullPolicy,omitempty"`
}

ImageConfig Docker image configuration

type ObservationService

type ObservationService struct {
	// Observation service image to be deployed
	Image ImageConfig `json:"image,omitempty"`
	// Annotations to be added to the deployment
	Annotations map[string]string `json:"annotations,omitempty"`
	// Additional labels to be added to the deployment
	ExtraLabels map[string]string `json:"extraLabels,omitempty"`
	// Number of replica
	ReplicaCount int `json:"replicaCount,omitempty"`
	// Resource configuration (i.e. CPU & Memory requests and limits)
	Resources ResourcesConfig `json:"resources,omitempty"`
	// Autoscaling configuration of the deployment
	Autoscaling AutoscalingConfig `json:"autoscaling,omitempty"`
	// Additional environment variables to be added to fluentd deployment
	ExtraEnvs []Env `json:"extraEnvs,omitempty"`
	// Observation service configuration
	APIConfig obsconfig.Config `json:"apiConfig,omitempty"`
	// Service k8s service configuration
	Service Service `json:"service,omitempty"`
}

ObservationService Observation service deployment configurations

type ObservationServiceHelmValues

type ObservationServiceHelmValues struct {
	// Full name override
	FullNameOverride string `json:"fullNameOverride,omitempty"`
	// Observation service deployment configurations
	ObservationService ObservationService `json:"observationService,omitempty"`
	// Fluentd deployment configuration
	Fluentd FluentdHelmValues `json:"fluentd,omitempty"`
}

ObservationServiceHelmValues Observation service helm values

type PVCConfig

type PVCConfig struct {
	// Name of pvc
	Name string `json:"name,omitempty"`
	// PVC mount path
	MountPath string `json:"mountPath,omitempty"`
	// Storage type
	Storage string `json:"storage,omitempty"`
}

PVCConfig Persistent volume claim configuration

type Resource

type Resource struct {
	// CPU resource
	CPU string `json:"cpu,omitempty"`
	// Memory resource
	Memory string `json:"memory,omitempty"`
}

Resource CPU and Memory resource configuration

type ResourcesConfig

type ResourcesConfig struct {
	// Resource requests
	Requests Resource `json:"requests,omitempty"`
	// Resource limits
	Limits Resource `json:"limits,omitempty"`
}

ResourcesConfig resource configurations for controlling requests/limits

type Service

type Service struct {
	// Type of the service
	Type string `json:"type,omitempty"`
	// Port exposed by the service
	ExternalPort string `json:"externalPort,omitempty"`
	// Pod's port being mapped to the external port
	InternalPort string `json:"internalPort,omitempty"`
}

Service K8S service configuration

Jump to

Keyboard shortcuts

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