editor

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 49 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAppReleaseIfMissing added in v0.0.14

func CreateAppReleaseIfMissing(restcfg *rest.Config, kc client.Client, reg repo.IRegistry, model releasesapi.Metadata) (*driversapi.AppRelease, error)

func CreateChartOrder

func CreateChartOrder(reg repo.IRegistry, opts releasesapi.ChartOrder) (*releasesapi.Order, error)

func DefaultSourceRefNamespace added in v0.0.13

func DefaultSourceRefNamespace(kc client.Client, sourceName string) (string, error)

func GenerateEditorModel

func GenerateEditorModel(kc client.Client, reg repo.IRegistry, chartRef releasesapi.ChartSourceRef, opts map[string]interface{}) (*unstructured.Unstructured, error)

func GenerateResourceEditorModel added in v0.0.7

func GenerateResourceEditorModel(kc client.Client, reg repo.IRegistry, opts map[string]interface{}) (*unstructured.Unstructured, error)

func ListResources added in v0.0.2

func ListResources(chartName string, data []byte) ([]releasesapi.ResourceObject, error)

func LoadResourceEditorModel added in v0.0.7

func LoadResourceEditorModel(kc client.Client, reg repo.IRegistry, opts releasesapi.ModelMetadata) (*releasesapi.EditorTemplate, error)

func MustResourceKey added in v0.0.15

func MustResourceKey(apiVersion, kind, chartName, name string) string

func RenderChart added in v0.0.7

func RenderChart(kc client.Client, reg repo.IRegistry, chartRef releasesapi.ChartSourceRef, opts map[string]interface{}) (string, *releasesapi.ChartTemplate, error)

func RenderOrderTemplate

func RenderOrderTemplate(bs *lib.BlobStore, reg repo.IRegistry, order releasesapi.Order) (string, []releasesapi.ChartTemplate, error)

func RenderResourceEditorChart added in v0.0.7

func RenderResourceEditorChart(kc client.Client, reg repo.IRegistry, opts map[string]interface{}) (string, *releasesapi.ChartTemplate, error)

func ResourceFilename

func ResourceFilename(apiVersion, kind, chartName, name string) (string, string, string)

func ResourceKey

func ResourceKey(apiVersion, kind, chartName, name string) (string, error)

func SetChartInfo added in v0.0.18

func SetChartInfo(feature *uiapi.Feature, featureKey string, values map[string]interface{}) error

func UpdateFeatureValues added in v0.0.15

func UpdateFeatureValues(kc client.Client, chrt *chart.Chart, vals map[string]any) (map[string]any, error)

Types

type EditorModelGenerator

type EditorModelGenerator struct {
	Registry repo.IRegistry
	releasesapi.ChartSourceRef
	Version     string
	ReleaseName string
	Namespace   string
	KubeVersion string
	ValuesFile  string
	ValuesPatch *runtime.RawExtension
	Values      map[string]interface{}

	RefillMetadata bool

	CRDs     []*chart.File
	Manifest []byte
}

func (*EditorModelGenerator) Do

func (*EditorModelGenerator) Result

func (x *EditorModelGenerator) Result() ([]*chart.File, []byte)

type TemplateRenderer

type TemplateRenderer struct {
	Registry repo.IRegistry
	releasesapi.ChartSourceRef
	ReleaseName string
	Namespace   string
	KubeVersion string
	ValuesFile  string
	ValuesPatch *runtime.RawExtension
	Values      map[string]interface{}

	BucketURL string
	UID       string
	PublicURL string

	CRDs     []releasesapi.BucketFile
	Manifest *releasesapi.BucketFile
}

func (*TemplateRenderer) Do

func (x *TemplateRenderer) Do() error

func (*TemplateRenderer) Result

func (x *TemplateRenderer) Result() (crds []releasesapi.BucketFile, manifest *releasesapi.BucketFile)

Jump to

Keyboard shortcuts

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