converter

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(name, namespace string, values any) (any, error)

Convert converts helm values to corresponding CRD

func FetchChartDefaults

func FetchChartDefaults(chart string) ([]byte, error)

FetchChartDefaults fetches the default values.yaml for the given chart at its latest released version from the VictoriaMetrics helm-charts repository.

func MergeValues

func MergeValues(base, override []byte) ([]byte, error)

MergeValues deep-merges base and override YAML, with override taking precedence.

func UnmarshalValues

func UnmarshalValues(data []byte, chart string) (any, error)

Types

type GlobalValues

type GlobalValues struct {
	ImagePullSecrets []corev1.LocalObjectReference `yaml:"imagePullSecrets,omitempty"`
	Image            ImageValues                   `yaml:"image,omitempty"`
}

type ImageValues

type ImageValues struct {
	Registry   string `yaml:"registry,omitempty"`
	Repository string `yaml:"repository"`
	Tag        string `yaml:"tag"`
	Variant    string `yaml:"variant,omitempty"`
	PullPolicy string `yaml:"pullPolicy,omitempty"`
}

type PersistentVolumeValues

type PersistentVolumeValues struct {
	Enabled      bool              `yaml:"enabled"`
	StorageClass string            `yaml:"storageClass,omitempty"`
	Size         string            `yaml:"size,omitempty"`
	MountPath    string            `yaml:"mountPath,omitempty"`
	Annotations  map[string]string `yaml:"annotations,omitempty"`
}

type ServerValues

type ServerValues struct {
	Enabled            *bool                               `yaml:"enabled,omitempty"`
	Name               string                              `yaml:"name,omitempty"`
	Image              ImageValues                         `yaml:"image"`
	ImagePullSecrets   []corev1.LocalObjectReference       `yaml:"imagePullSecrets,omitempty"`
	ReplicaCount       *int32                              `yaml:"replicaCount,omitempty"`
	RetentionPeriod    interface{}                         `yaml:"retentionPeriod,omitempty"`
	ExtraArgs          map[string]interface{}              `yaml:"extraArgs,omitempty"`
	ExtraEnvs          []corev1.EnvVar                     `yaml:"extraEnvs,omitempty"`
	Resources          *corev1.ResourceRequirements        `yaml:"resources,omitempty"`
	NodeSelector       map[string]string                   `yaml:"nodeSelector,omitempty"`
	Tolerations        []corev1.Toleration                 `yaml:"tolerations,omitempty"`
	Affinity           *corev1.Affinity                    `yaml:"affinity,omitempty"`
	PodAnnotations     map[string]string                   `yaml:"podAnnotations,omitempty"`
	Labels             map[string]string                   `yaml:"labels,omitempty"`
	PodSecurityContext *corev1.PodSecurityContext          `yaml:"podSecurityContext,omitempty"`
	SecurityContext    *vmv1beta1.ContainerSecurityContext `yaml:"securityContext,omitempty"`
	PersistentVolume   *PersistentVolumeValues             `yaml:"persistentVolume,omitempty"`
	Service            *ServiceValues                      `yaml:"service,omitempty"`
}

type ServiceAccount

type ServiceAccount struct {
	Name string `yaml:"name,omitempty"`
}

type ServiceValues

type ServiceValues struct {
	Annotations              map[string]string `yaml:"annotations,omitempty"`
	Labels                   map[string]string `yaml:"labels,omitempty"`
	ClusterIP                string            `yaml:"clusterIP,omitempty"`
	ExternalIPs              []string          `yaml:"externalIPs,omitempty"`
	LoadBalancerIP           string            `yaml:"loadBalancerIP,omitempty"`
	LoadBalancerSourceRanges []string          `yaml:"loadBalancerSourceRanges,omitempty"`
	Type                     string            `yaml:"type,omitempty"`
}

type VLAgentHelmValues

type VLAgentHelmValues struct {
	Image                     ImageValues                         `yaml:"image"`
	ReplicaCount              *int32                              `yaml:"replicaCount,omitempty"`
	Annotations               map[string]string                   `yaml:"annotations,omitempty"`
	PodAnnotations            map[string]string                   `yaml:"podAnnotations,omitempty"`
	PodLabels                 map[string]string                   `yaml:"podLabels,omitempty"`
	NodeSelector              map[string]string                   `yaml:"nodeSelector,omitempty"`
	Tolerations               []corev1.Toleration                 `yaml:"tolerations,omitempty"`
	Affinity                  *corev1.Affinity                    `yaml:"affinity,omitempty"`
	TopologySpreadConstraints []corev1.TopologySpreadConstraint   `yaml:"topologySpreadConstraints,omitempty"`
	SecurityContext           *vmv1beta1.ContainerSecurityContext `yaml:"securityContext,omitempty"`
	PodSecurityContext        *corev1.PodSecurityContext          `yaml:"podSecurityContext,omitempty"`
	PriorityClassName         string                              `yaml:"priorityClassName,omitempty"`
	ExtraArgs                 map[string]string                   `yaml:"extraArgs,omitempty"`
	Env                       []corev1.EnvVar                     `yaml:"env,omitempty"`
	ExtraVolumes              []corev1.Volume                     `yaml:"extraVolumes,omitempty"`
	ExtraVolumeMounts         []corev1.VolumeMount                `yaml:"extraVolumeMounts,omitempty"`
	Resources                 *corev1.ResourceRequirements        `yaml:"resources,omitempty"`
	RemoteWrite               []vmv1.VLAgentRemoteWriteSpec       `yaml:"remoteWrite"`
	MaxDiskUsagePerURL        string                              `yaml:"maxDiskUsagePerURL,omitempty"`
	PersistentVolume          *PersistentVolumeValues             `yaml:"persistentVolume,omitempty"`
}

VLAgentHelmValues represents values from VictoriaLogs agent helm chart

type VLClusterHelmValues

type VLClusterHelmValues struct {
	Global         GlobalValues    `yaml:"global,omitempty"`
	VLSelect       ServerValues    `yaml:"vlselect"`
	VLInsert       ServerValues    `yaml:"vlinsert"`
	VLStorage      ServerValues    `yaml:"vlstorage"`
	ServiceAccount *ServiceAccount `yaml:"serviceAccount,omitempty"`
}

VLClusterHelmValues represents values from VictoriaLogs cluster helm chart

type VLCollectorHelmValues

type VLCollectorHelmValues struct {
	Image                     ImageValues                         `yaml:"image"`
	Annotations               map[string]string                   `yaml:"annotations,omitempty"`
	PodAnnotations            map[string]string                   `yaml:"podAnnotations,omitempty"`
	PodLabels                 map[string]string                   `yaml:"podLabels,omitempty"`
	NodeSelector              map[string]string                   `yaml:"nodeSelector,omitempty"`
	Tolerations               []corev1.Toleration                 `yaml:"tolerations,omitempty"`
	Affinity                  *corev1.Affinity                    `yaml:"affinity,omitempty"`
	TopologySpreadConstraints []corev1.TopologySpreadConstraint   `yaml:"topologySpreadConstraints,omitempty"`
	SecurityContext           *vmv1beta1.ContainerSecurityContext `yaml:"securityContext,omitempty"`
	PodSecurityContext        *corev1.PodSecurityContext          `yaml:"podSecurityContext,omitempty"`
	PriorityClassName         string                              `yaml:"priorityClassName,omitempty"`
	ExtraArgs                 map[string]string                   `yaml:"extraArgs,omitempty"`
	Env                       []corev1.EnvVar                     `yaml:"env,omitempty"`
	ExtraVolumes              []corev1.Volume                     `yaml:"extraVolumes,omitempty"`
	ExtraVolumeMounts         []corev1.VolumeMount                `yaml:"extraVolumeMounts,omitempty"`
	Resources                 *corev1.ResourceRequirements        `yaml:"resources,omitempty"`
	RemoteWrite               []vmv1.VLAgentRemoteWriteSpec       `yaml:"remoteWrite"`
	Collector                 VLCollectorSettings                 `yaml:"collector"`
}

type VLCollectorSettings

type VLCollectorSettings struct {
	TimeField              []string `yaml:"timeField,omitempty"`
	MsgField               []string `yaml:"msgField,omitempty"`
	StreamFields           []string `yaml:"streamFields,omitempty"`
	ExcludeFilter          string   `yaml:"excludeFilter,omitempty"`
	IncludePodLabels       *bool    `yaml:"includePodLabels,omitempty"`
	IncludePodAnnotations  *bool    `yaml:"includePodAnnotations,omitempty"`
	IncludeNodeLabels      *bool    `yaml:"includeNodeLabels,omitempty"`
	IncludeNodeAnnotations *bool    `yaml:"includeNodeAnnotations,omitempty"`
	ExtraFields            string   `yaml:"extraFields,omitempty"`
	IgnoreFields           []string `yaml:"ignoreFields,omitempty"`
	TenantID               string   `yaml:"tenantID,omitempty"`
	CheckpointsPath        *string  `yaml:"checkpointsPath,omitempty"`
	LogsPath               string   `yaml:"logsPath,omitempty"`
}

type VLogsHelmValues

type VLogsHelmValues struct {
	Global         GlobalValues    `yaml:"global,omitempty"`
	Server         ServerValues    `yaml:"server"`
	ServiceAccount *ServiceAccount `yaml:"serviceAccount,omitempty"`
}

VLogsHelmValues represents values from VictoriaLogs single helm chart

type VMAgentHelmValues

type VMAgentHelmValues struct {
	Global             GlobalValues                        `yaml:"global,omitempty"`
	ReplicaCount       *int32                              `yaml:"replicaCount,omitempty"`
	Image              ImageValues                         `yaml:"image"`
	ImagePullSecrets   []corev1.LocalObjectReference       `yaml:"imagePullSecrets,omitempty"`
	ExtraArgs          map[string]interface{}              `yaml:"extraArgs,omitempty"`
	ExtraEnvs          []corev1.EnvVar                     `yaml:"env,omitempty"`
	Resources          *corev1.ResourceRequirements        `yaml:"resources,omitempty"`
	NodeSelector       map[string]string                   `yaml:"nodeSelector,omitempty"`
	Tolerations        []corev1.Toleration                 `yaml:"tolerations,omitempty"`
	Affinity           *corev1.Affinity                    `yaml:"affinity,omitempty"`
	PodAnnotations     map[string]string                   `yaml:"podAnnotations,omitempty"`
	Labels             map[string]string                   `yaml:"labels,omitempty"`
	PodSecurityContext *corev1.PodSecurityContext          `yaml:"podSecurityContext,omitempty"`
	SecurityContext    *vmv1beta1.ContainerSecurityContext `yaml:"securityContext,omitempty"`
	RemoteWrite        []vmv1beta1.VMAgentRemoteWriteSpec  `yaml:"remoteWrite,omitempty"`
	ServiceAccount     *ServiceAccount                     `yaml:"serviceAccount,omitempty"`
}

VMAgentHelmValues represents values from VictoriaMetrics agent helm chart

type VMAlertHelmValues

type VMAlertHelmValues struct {
	Global         GlobalValues        `yaml:"global,omitempty"`
	Server         VMAlertServerValues `yaml:"server"`
	ServiceAccount *ServiceAccount     `yaml:"serviceAccount,omitempty"`
}

type VMAlertServerValues

type VMAlertServerValues struct {
	Image              ImageValues                         `yaml:"image"`
	ImagePullSecrets   []corev1.LocalObjectReference       `yaml:"imagePullSecrets,omitempty"`
	ReplicaCount       *int32                              `yaml:"replicaCount,omitempty"`
	ExtraArgs          map[string]interface{}              `yaml:"extraArgs,omitempty"`
	ExtraEnvs          []corev1.EnvVar                     `yaml:"env,omitempty"`
	Resources          *corev1.ResourceRequirements        `yaml:"resources,omitempty"`
	NodeSelector       map[string]string                   `yaml:"nodeSelector,omitempty"`
	Tolerations        []corev1.Toleration                 `yaml:"tolerations,omitempty"`
	Affinity           *corev1.Affinity                    `yaml:"affinity,omitempty"`
	PodAnnotations     map[string]string                   `yaml:"podAnnotations,omitempty"`
	Labels             map[string]string                   `yaml:"labels,omitempty"`
	PodSecurityContext *corev1.PodSecurityContext          `yaml:"podSecurityContext,omitempty"`
	SecurityContext    *vmv1beta1.ContainerSecurityContext `yaml:"securityContext,omitempty"`
	Notifier           *vmv1beta1.VMAlertNotifierSpec      `yaml:"notifier,omitempty"`
	Notifiers          []vmv1beta1.VMAlertNotifierSpec     `yaml:"notifiers,omitempty"`
	RemoteWrite        *vmv1beta1.VMAlertRemoteWriteSpec   `yaml:"remoteWrite,omitempty"`
	RemoteRead         *vmv1beta1.VMAlertRemoteReadSpec    `yaml:"remoteRead,omitempty"`
	Datasource         vmv1beta1.VMAlertDatasourceSpec     `yaml:"datasource,omitempty"`
}

type VMAnomalyHelmValues

type VMAnomalyHelmValues struct {
	Global             GlobalValues                        `yaml:"global,omitempty"`
	ReplicaCount       *int32                              `yaml:"replicaCount,omitempty"`
	Image              ImageValues                         `yaml:"image"`
	ImagePullSecrets   []corev1.LocalObjectReference       `yaml:"imagePullSecrets,omitempty"`
	ExtraArgs          map[string]interface{}              `yaml:"extraArgs,omitempty"`
	ExtraEnvs          []corev1.EnvVar                     `yaml:"env,omitempty"`
	Resources          *corev1.ResourceRequirements        `yaml:"resources,omitempty"`
	NodeSelector       map[string]string                   `yaml:"nodeSelector,omitempty"`
	Tolerations        []corev1.Toleration                 `yaml:"tolerations,omitempty"`
	Affinity           *corev1.Affinity                    `yaml:"affinity,omitempty"`
	PodAnnotations     map[string]string                   `yaml:"podAnnotations,omitempty"`
	Labels             map[string]string                   `yaml:"labels,omitempty"`
	PodSecurityContext *corev1.PodSecurityContext          `yaml:"podSecurityContext,omitempty"`
	SecurityContext    *vmv1beta1.ContainerSecurityContext `yaml:"securityContext,omitempty"`
	Reader             *VMAnomalyReaderValues              `yaml:"reader,omitempty"`
	Writer             *VMAnomalyWriterValues              `yaml:"writer,omitempty"`
	ServiceAccount     *ServiceAccount                     `yaml:"serviceAccount,omitempty"`
}

VMAnomalyHelmValues represents values from VictoriaMetrics anomaly helm chart

type VMAnomalyReaderValues

type VMAnomalyReaderValues struct {
	DatasourceURL  string `yaml:"datasourceURL,omitempty"`
	SamplingPeriod string `yaml:"samplingPeriod,omitempty"`
}

type VMAnomalyWriterValues

type VMAnomalyWriterValues struct {
	DatasourceURL string `yaml:"datasourceURL,omitempty"`
}

type VMAuthHelmValues

type VMAuthHelmValues struct {
	ServerValues   `yaml:",inline"`
	Global         GlobalValues    `yaml:"global,omitempty"`
	Env            []corev1.EnvVar `yaml:"env,omitempty"`
	ServiceAccount *ServiceAccount `yaml:"serviceAccount,omitempty"`
}

VMAuthHelmValues represents values from VictoriaMetrics auth helm chart

type VMClusterHelmValues

type VMClusterHelmValues struct {
	Global         GlobalValues    `yaml:"global,omitempty"`
	VMSelect       ServerValues    `yaml:"vmselect"`
	VMInsert       ServerValues    `yaml:"vminsert"`
	VMStorage      ServerValues    `yaml:"vmstorage"`
	ServiceAccount *ServiceAccount `yaml:"serviceAccount,omitempty"`
}

VMClusterHelmValues represents values from VictoriaMetrics cluster helm chart

type VMSingleHelmValues

type VMSingleHelmValues struct {
	Global         GlobalValues    `yaml:"global,omitempty"`
	Server         ServerValues    `yaml:"server"`
	ServiceAccount *ServiceAccount `yaml:"serviceAccount,omitempty"`
}

VMSingleHelmValues represents values from VictoriaMetrics single helm chart

type VTClusterHelmValues

type VTClusterHelmValues struct {
	Global         GlobalValues    `yaml:"global,omitempty"`
	VTSelect       ServerValues    `yaml:"vtselect"`
	VTInsert       ServerValues    `yaml:"vtinsert"`
	VTStorage      ServerValues    `yaml:"vtstorage"`
	ServiceAccount *ServiceAccount `yaml:"serviceAccount,omitempty"`
}

VTClusterHelmValues represents values from VictoriaTraces cluster helm chart

type VTSingleHelmValues

type VTSingleHelmValues struct {
	Global         GlobalValues    `yaml:"global,omitempty"`
	Server         ServerValues    `yaml:"server"`
	ServiceAccount *ServiceAccount `yaml:"serviceAccount,omitempty"`
}

VTSingleHelmValues represents values from VictoriaTraces single helm chart

Jump to

Keyboard shortcuts

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