build

package
v0.51.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDefaults added in v0.48.0

func AddDefaults(scheme *runtime.Scheme)

AddDefaults adds defaulting functions to the runtimeScheme

func AddExtraArgsOverrideDefaults

func AddExtraArgsOverrideDefaults(args []string, extraArgs map[string]string, dashes string) []string

AddExtraArgsOverrideDefaults adds extraArgs for given source args it trims in-place args if it was set via extraArgs no need to check for extraEnvs, it has priority over args at VictoriaMetrics apps dashes is either "-" or "--", depending on the process. altermanager needs two dashes.

func AddStrictSecuritySettingsToContainers

func AddStrictSecuritySettingsToContainers(p *vmv1beta1.SecurityContext, containers []corev1.Container, enableStrictSecurity bool)

AddStrictSecuritySettingsToContainers conditionally adds Security settings to given containers

func AddStrictSecuritySettingsToPod

func AddStrictSecuritySettingsToPod(p *vmv1beta1.SecurityContext, enableStrictSecurity bool) *corev1.PodSecurityContext

AddStrictSecuritySettingsToPod conditionally creates security context for pod or returns predefined one

func AdditionalServiceFromDefault

func AdditionalServiceFromDefault(defaultSvc *corev1.Service, svcSpec *vmv1beta1.AdditionalServiceSpec) *corev1.Service

AdditionalServiceFromDefault builds service from given exist service and overrides params if needed

func AddsPortProbesToConfigReloaderContainer

func AddsPortProbesToConfigReloaderContainer(useCustomConfigReloader bool, crContainer *corev1.Container)

AddsPortProbesToConfigReloaderContainer conditionally adds readiness and liveness probes to the custom config-reloader image exposes reloader-http port for container

func AppendArgsForInsertPorts

func AppendArgsForInsertPorts(args []string, ip *vmv1beta1.InsertPorts) []string

AppendArgsForInsertPorts conditionally appends insert ports as flags to the given args

func AppendInsertPorts

func AppendInsertPorts(ports []corev1.ContainerPort, ip *vmv1beta1.InsertPorts) []corev1.ContainerPort

AppendInsertPorts conditionally adds ingestPorts to the given ports slice

func AppendInsertPortsToService

func AppendInsertPortsToService(ip *vmv1beta1.InsertPorts, svc *corev1.Service)

AppendInsertPortsToService conditionally appends insert ports to the given service definition

func DeploymentAddCommonParams added in v0.48.0

func DeploymentAddCommonParams(dst *appsv1.Deployment, useStrictSecurity bool, params *vmv1beta1.CommonApplicationDeploymentParams)

DeploymentAddCommonParams adds common params for all deployments

func HPA

HPA creates HorizontalPodAutoscaler object

func PodDNSAddress added in v0.51.0

func PodDNSAddress(baseName string, podIndex int32, namespace string, portName string, domain string) string

PodDNSAddress formats pod dns address with optional domain name

func PodDisruptionBudget

func PodDisruptionBudget(cr builderOpts, spec *vmv1beta1.EmbeddedPodDisruptionBudgetSpec) *policyv1.PodDisruptionBudget

PodDisruptionBudget creates object for given CRD

func Probe

func Probe(container corev1.Container, cr probeCRD) corev1.Container

Probe builds probe for container with possible custom values with

func Resources

func Resources(crdResources corev1.ResourceRequirements, defaultResources config.Resource, useDefault bool) corev1.ResourceRequirements

Resources creates containter resources with conditional defaults values

func Service

func Service(cr builderOpts, defaultPort string, setOptions func(svc *corev1.Service)) *corev1.Service

Service builds service for the given args and applies optional callback for it

func ServiceAccount

func ServiceAccount(cr objectForServiceAccountBuilder) *v1.ServiceAccount

ServiceAccount builds service account for CRD

func StatefulSetAddCommonParams added in v0.48.0

func StatefulSetAddCommonParams(dst *appsv1.StatefulSet, useStrictSecurity bool, params *vmv1beta1.CommonApplicationDeploymentParams)

StatefulSetAddCommonParams adds common params to given statefulset

func VMBackupManager

func VMBackupManager(
	ctx context.Context,
	cr *vmv1beta1.VMBackup,
	port string,
	storagePath, dataVolumeName string,
	extraArgs map[string]string,
	isCluster bool,
	license *vmv1beta1.License,
) (*corev1.Container, error)

VMBackupManager conditionally creates vmbackupmanager container

func VMRestore

func VMRestore(
	cr *vmv1beta1.VMBackup,
	storagePath, dataVolumeName string,
) (*corev1.Container, error)

VMRestore conditionally creates vmrestore container

func VMServiceScrapeForAlertmanager added in v0.47.0

func VMServiceScrapeForAlertmanager(service *v1.Service, amCR *vmv1beta1.VMAlertmanager) *vmv1beta1.VMServiceScrape

VMServiceScrapeForServiceWithSpec build VMServiceScrape for VMAlertmanager

func VMServiceScrapeForServiceWithSpec

func VMServiceScrapeForServiceWithSpec(service *v1.Service, builder serviceScrapeBuilder, filterPortNames ...string) *vmv1beta1.VMServiceScrape

Types

type TLSConfigBuilder

type TLSConfigBuilder struct {
	client.Client
	Ctx                context.Context
	CurrentCRName      string
	CurrentCRNamespace string
	SecretCache        map[string]*corev1.Secret
	ConfigmapCache     map[string]*corev1.ConfigMap
	TLSAssets          map[string]string
}

TLSConfigBuilder help cache and build tls config

func (*TLSConfigBuilder) BuildTLSConfig

func (cb *TLSConfigBuilder) BuildTLSConfig(tlsCfg *vmv1beta1.TLSConfig, tlsAssetsDir string) (map[string]interface{}, error)

BuildTLSConfig return map with paths to tls config keys let caller to use their own json tag

Jump to

Keyboard shortcuts

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