chartvalues

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package chartvalues holds the Go types of the preview-env chart's values, from which cmd/schemagen generates charts/preview-env/values.schema.json.

Index

Constants

View Source
const NamespacePattern = `^[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?$`

NamespacePattern matches a Kubernetes namespace name (an RFC 1123 label).

Variables

This section is empty.

Functions

This section is empty.

Types

type PreviewNamespace

type PreviewNamespace struct {
	Labels      map[string]string `yaml:"labels,omitempty"`
	Annotations map[string]string `yaml:"annotations,omitempty"`
}

PreviewNamespace is the extra metadata of the preview Namespace.

func (PreviewNamespace) JSONSchemaExtend

func (PreviewNamespace) JSONSchemaExtend(s *jsonschema.Schema)

JSONSchemaExtend makes both fields optional and rejects, in each, the keys the chart sets on the Namespace. A reserved key maps to the false schema rather than to a propertyNames rule, whose failure Helm reports at a random location.

type ServiceChart

type ServiceChart struct {
	Path          string   `yaml:"path,omitempty"`
	ImageTagParam string   `yaml:"imageTagParam,omitempty"`
	HostParam     string   `yaml:"hostParam,omitempty"`
	ValueFiles    []string `yaml:"valueFiles,omitempty"`
}

ServiceChart is a serviceCharts entry: how a service's chart is rendered. Every field is optional.

func (ServiceChart) JSONSchemaExtend

func (ServiceChart) JSONSchemaExtend(s *jsonschema.Schema)

JSONSchemaExtend makes every field optional and every string non-empty.

type Values

type Values struct {
	APIVersion       string                  `yaml:"apiVersion"`
	Services         []preview.ServiceEntry  `yaml:"services"`
	ServiceCharts    map[string]ServiceChart `yaml:"serviceCharts"`
	PreviewNamespace PreviewNamespace        `yaml:"previewNamespace"`
	ArgocdNamespace  string                  `yaml:"argocdNamespace"`
}

Values is the merged input of the preview-env chart: a preview values file (apiVersion, services), the chart settings of the gitops repo's preview-env.yaml (serviceCharts, previewNamespace) and the ApplicationSet's argocdNamespace. No other root key is allowed.

func (Values) JSONSchemaExtend

func (Values) JSONSchemaExtend(s *jsonschema.Schema)

JSONSchemaExtend requires apiVersion, services and argocdNamespace (a null argocdNamespace in a values file removes the chart default before validation, so it must fail as missing), rejects other root keys, fixes apiVersion to preview.APIVersion and argocdNamespace to a namespace name.

Jump to

Keyboard shortcuts

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