jnetvm

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package jvm contains the jsonnet rendering logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JsonnetRender

func JsonnetRender(
	cmdFlagsJsonnet types.CmdJsonnetOptions,
	filename string,
	vmConfig types.VMConfig,
	logger zerolog.Logger,
) error

Renders a jsonnet file with the specified options.

func JsonnetRenderClusterParams

func JsonnetRenderClusterParams(
	vmConfig types.VMConfig,
	clusterName string,
	componentNames []string,
	clusterParams string,
	prune bool,
	lint bool,
) (string, error)

Render cluster params, merged with one or more component's parameters. Empty componentName list renders all component parameters.

func JsonnetRenderClusterParamsOnly

func JsonnetRenderClusterParamsOnly(
	vmConfig types.VMConfig,
	clusterName string,
	clusterParams string,
	prune bool,
	lint bool,
) (string, error)

Only render cluster params (_cluster), without components.

func JsonnetRenderFiles

func JsonnetRenderFiles(
	vmConfig types.VMConfig,
	files []string,
	param string,
	prune bool,
	prepend string,
	source string,
	lint bool,
) (string, error)

Takes a list of jsonnet files and imports each one. Formats the string for jsonnet using "+". source is only used for error messages.

func JsonnetVM

func JsonnetVM(vmConfig types.VMConfig) (*jsonnet.VM, error)

Create a Jsonnet VM to run commands in. It:

  • creates a jsonnet VM
  • registers kr8+ native functions
  • Add jsonnet library directories
  • loads external files into extVars

func MergeComponentDefaults

func MergeComponentDefaults(
	componentMap map[string]kr8_types.Kr8ClusterComponentRef,
	componentNames []string,
	vmConfig types.VMConfig,
) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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