Documentation ¶
Index ¶
- func AddDefaults(scheme *runtime.Scheme)
- func AddExtraArgsOverrideDefaults(args []string, extraArgs map[string]string, dashes string) []string
- func AddStrictSecuritySettingsToContainers(p *vmv1beta1.SecurityContext, containers []corev1.Container, ...)
- func AddStrictSecuritySettingsToPod(p *vmv1beta1.SecurityContext, enableStrictSecurity bool) *corev1.PodSecurityContext
- func AdditionalServiceFromDefault(defaultSvc *corev1.Service, svcSpec *vmv1beta1.AdditionalServiceSpec) *corev1.Service
- func AddsPortProbesToConfigReloaderContainer(useCustomConfigReloader bool, crContainer *corev1.Container)
- func AppendArgsForInsertPorts(args []string, ip *vmv1beta1.InsertPorts) []string
- func AppendInsertPorts(ports []corev1.ContainerPort, ip *vmv1beta1.InsertPorts) []corev1.ContainerPort
- func AppendInsertPortsToService(ip *vmv1beta1.InsertPorts, svc *corev1.Service)
- func DeploymentAddCommonParams(dst *appsv1.Deployment, useStrictSecurity bool, ...)
- func HPA(opts builderOpts, targetRef autoscalingv2.CrossVersionObjectReference, ...) *autoscalingv2.HorizontalPodAutoscaler
- func PodDNSAddress(baseName string, podIndex int32, namespace string, portName string, ...) string
- func PodDisruptionBudget(cr builderOpts, spec *vmv1beta1.EmbeddedPodDisruptionBudgetSpec) *policyv1.PodDisruptionBudget
- func Probe(container corev1.Container, cr probeCRD) corev1.Container
- func Resources(crdResources corev1.ResourceRequirements, defaultResources config.Resource, ...) corev1.ResourceRequirements
- func Service(cr builderOpts, defaultPort string, setOptions func(svc *corev1.Service)) *corev1.Service
- func ServiceAccount(cr objectForServiceAccountBuilder) *v1.ServiceAccount
- func StatefulSetAddCommonParams(dst *appsv1.StatefulSet, useStrictSecurity bool, ...)
- func VMBackupManager(ctx context.Context, cr *vmv1beta1.VMBackup, port string, ...) (*corev1.Container, error)
- func VMRestore(cr *vmv1beta1.VMBackup, storagePath, dataVolumeName string) (*corev1.Container, error)
- func VMServiceScrapeForAlertmanager(service *v1.Service, amCR *vmv1beta1.VMAlertmanager) *vmv1beta1.VMServiceScrape
- func VMServiceScrapeForServiceWithSpec(service *v1.Service, builder serviceScrapeBuilder, filterPortNames ...string) *vmv1beta1.VMServiceScrape
- type TLSConfigBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDefaults ¶ added in v0.48.0
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 ¶
func HPA(opts builderOpts, targetRef autoscalingv2.CrossVersionObjectReference, spec *vmv1beta1.EmbeddedHPA) *autoscalingv2.HorizontalPodAutoscaler
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 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