render

package
v0.0.0-...-97dd610 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YAMLSeparator       = "\n---\n"
	NotesFileNameSuffix = ".txt"
)

Variables

Functions

This section is empty.

Types

type LocalRenderer

type LocalRenderer struct {
	Opts    *RendererOptions
	Chart   *chart.Chart
	Started bool
}

LocalRenderer load chart from local file system

func (*LocalRenderer) Init

func (lr *LocalRenderer) Init() error

func (*LocalRenderer) RenderManifest

func (lr *LocalRenderer) RenderManifest(valsYaml string) (string, error)

type RemoteRenderer

type RemoteRenderer struct {
	Opts    *RendererOptions
	Chart   *chart.Chart
	Started bool
}

func (*RemoteRenderer) Init

func (rr *RemoteRenderer) Init() error

func (*RemoteRenderer) RenderManifest

func (rr *RemoteRenderer) RenderManifest(valsYaml string) (string, error)

type Renderer

type Renderer interface {
	Init() error
	RenderManifest(valsYaml string) (string, error)
}

Renderer is responsible for rendering helm chart with new values. For using RenderManifest, we must invoke Init firstly.

func NewLocalRenderer

func NewLocalRenderer(opts ...RendererOption) (Renderer, error)

func NewRemoteRenderer

func NewRemoteRenderer(opts ...RendererOption) (Renderer, error)

type RendererOption

type RendererOption func(*RendererOptions)

func WithDir

func WithDir(dir string) RendererOption

func WithFS

func WithFS(f fs.FS) RendererOption

func WithName

func WithName(name string) RendererOption

func WithNamespace

func WithNamespace(ns string) RendererOption

func WithRepoURL

func WithRepoURL(repo string) RendererOption

func WithVersion

func WithVersion(version string) RendererOption

type RendererOptions

type RendererOptions struct {
	Name      string
	Namespace string

	// fields for LocalRenderer
	// local file system containing the target chart
	FS fs.FS
	// chart relevant path to FS
	Dir string

	// fields for RemoteRenderer
	// remote chart version
	Version string
	// remote chart repo url
	RepoURL string
}

Jump to

Keyboard shortcuts

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