key

package
v2.4.1-0...-301bce2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MonitoringNamespace = "monitoring"

	DefaultServicePriority string = "highest"

	ClusterLabel                 string = "giantswarm.io/cluster"
	MonitoringLabel              string = "giantswarm.io/monitoring"
	ServicePriorityLabel         string = "giantswarm.io/service-priority"
	TeamLabel                    string = "application.giantswarm.io/team"
	OpsGenieApiKey               string = "opsGenieApiKey" // #nosec G101
	AlertmanagerGlobalSecretName string = "alertmanager-global"

	// PrometheusCPULimitCoefficient is the number used to compute the CPU limit from the CPU request.
	// It is used when computing VPA settings, to set `max requests` so that `max limits` respects MaxCPU factor.
	PrometheusCPULimitCoefficient float64 = 1.5
	// PrometheusMemoryLimitCoefficient is the number used to compute the memory limit from the memory request.
	// It is used when computing VPA settings, to set `max request` so that `max limits` respect MaxMemory factor.
	PrometheusMemoryLimitCoefficient      float64 = 1
	PrometheusMetaOperatorRemoteWriteName string  = "prometheus-meta-operator"
	PrometheusServiceName                         = "prometheus-operated"
	// RemoteWriteAPIEndpointConfigSecretNameKey is the secret name used by a Prometheus client to access the Prometheus remote write endpoint. It is used at https://github.com/giantswarm/observability-bundle/blob/main/helm/observability-bundle/templates/apps.yaml
	RemoteWriteAPIEndpointConfigSecretNameKey string = "remote-write-api-endpoint-config"
	// RemoteWriteIngressAuthSecretName is the secret name referenced in the ingress to enable authentication against the Prometheus remote write endpoint.
	RemoteWriteIngressAuthSecretName string = "remote-write-ingress-auth"
	// PrometheusVolumeSizeAnnotation is the annotation referenced in the Cluster CR to define the size of Prometheus Volume.
	PrometheusVolumeSizeAnnotation string = "monitoring.giantswarm.io/prometheus-volume-size"
	// We apply a ratio to the volume storage size to compute the RetentionSize property (RetentionSize = 90% volume storage size)
	PrometheusVolumeStorageLimitRatio = 0.85

	ClusterIDKey       string = "cluster_id"
	ClusterTypeKey     string = "cluster_type"
	CustomerKey        string = "customer"
	InstallationKey    string = "installation"
	OrganizationKey    string = "organization"
	PipelineKey        string = "pipeline"
	ProviderKey        string = "provider"
	RegionKey          string = "region"
	ServicePriorityKey string = "service_priority"
	TypeKey            string = "type"

	IngressClassName string = "nginx"

	BearerTokenPath string = "/var/run/secrets/kubernetes.io/serviceaccount/token" // nolint:gosec
	CAFilePath      string = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"

	EtcdSecretSourceName      string = "etcd-certs"
	EtcdSecretSourceNamespace string = "giantswarm"

	APIServerCertificatesSecretName string = "cluster-certificates" // nolint:gosec
)

Variables

This section is empty.

Functions

func APIUrl

func APIUrl(obj interface{}) string

func AlertmanagerDefaultCPU

func AlertmanagerDefaultCPU() *resource.Quantity

func AlertmanagerDefaultMemory

func AlertmanagerDefaultMemory() *resource.Quantity

func AlertmanagerKey

func AlertmanagerKey() string

func AlertmanagerLabels

func AlertmanagerLabels() map[string]string

func AlertmanagerSecretName

func AlertmanagerSecretName() string

func ApiServerAuthenticationType

func ApiServerAuthenticationType(ctx context.Context, k8sClient k8sclient.Interface, clusterNamespace string) (string, error)

func CAPICertificateName

func CAPICertificateName(cluster metav1.Object) string

func ClusterID

func ClusterID(cluster metav1.Object) string

func ClusterNamespace

func ClusterNamespace(cluster metav1.Object) string

func ClusterProvider

func ClusterProvider(obj metav1.Object, provider cluster.Provider) (string, error)

func ClusterType

func ClusterType(installation string, obj interface{}) string

func EtcdSecret

func EtcdSecret(installation string, obj interface{}) string

func GetClusterAppsNamespace

func GetClusterAppsNamespace(cluster metav1.Object, installation string, provider cluster.Provider) string

func GetClusterShardingStrategy

func GetClusterShardingStrategy(cluster metav1.Object) (*agent.ShardingStrategy, error)

func GetServicePriority

func GetServicePriority(cluster metav1.Object) string

func Heartbeat

func Heartbeat() string

func HeartbeatAPI

func HeartbeatAPI(cluster metav1.Object, installation string) string

func HeartbeatName

func HeartbeatName(cluster metav1.Object, installation string) string

func HeartbeatReceiverName

func HeartbeatReceiverName(cluster metav1.Object, installation string) string

func IsCAPIManagementCluster

func IsCAPIManagementCluster(provider cluster.Provider) bool

func IsEKSCluster

func IsEKSCluster(obj interface{}) bool

func IsInfrastructureRefNotFoundError

func IsInfrastructureRefNotFoundError(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsManagementCluster

func IsManagementCluster(installation string, obj interface{}) bool

func IsMonitoringDisabled

func IsMonitoringDisabled(cluster metav1.Object) bool

func IsWrongType

func IsWrongType(err error) bool

IsWrongType asserts wrongTypeError.

func Namespace

func Namespace(cluster metav1.Object) string

func NamespaceDefault

func NamespaceDefault(cluster metav1.Object) string

func PrometheusAdditionalScrapeConfigsName

func PrometheusAdditionalScrapeConfigsName() string

func PrometheusAdditionalScrapeConfigsSecretName

func PrometheusAdditionalScrapeConfigsSecretName() string

func PrometheusContainerName

func PrometheusContainerName() string

func PrometheusDefaultCPU

func PrometheusDefaultCPU() *resource.Quantity

func PrometheusDefaultCPULimit

func PrometheusDefaultCPULimit() *resource.Quantity

func PrometheusDefaultMemory

func PrometheusDefaultMemory() *resource.Quantity

func PrometheusDefaultMemoryLimit

func PrometheusDefaultMemoryLimit() *resource.Quantity

func PrometheusLabels

func PrometheusLabels(cluster metav1.Object) map[string]string

func PrometheusPort

func PrometheusPort() int32

func PrometheusSTSName

func PrometheusSTSName(cluster metav1.Object) string

func RemoteWriteAPIEndpointConfigSecretName

func RemoteWriteAPIEndpointConfigSecretName(cluster metav1.Object, provider cluster.Provider) string

func RemoteWriteAuthenticationAnnotations

func RemoteWriteAuthenticationAnnotations(baseDomain string, externalDNS bool) map[string]string

func RemoteWriteConfigName

func RemoteWriteConfigName(cluster metav1.Object) string

func RemoteWriteSecretName

func RemoteWriteSecretName(cluster metav1.Object) string

func ToCluster

func ToCluster(obj interface{}) (metav1.Object, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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