helmbase

package module
v0.0.0-...-287af01 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

README

Pulumi Helm Chart Component Base

This repository contains boilerplate for creating a Pulumi Component Package which wraps a Kubernetes Helm Chart, and gives it a strongly typed interface. This exposes the chart to the Pulumi's Infrastructure as Code tool in multiple languages, including JavaScript, TypeScript, Python, Go, and C#, and adds compile-time type-checking for chart parameters, built-in documentation, and more.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Construct

func Construct(ctx *pulumi.Context, c Chart, typ, name string,
	args ChartArgs, inputs provider.ConstructInputs, defaultChart, defaultRepo string,
	opts pulumi.ResourceOption) (*provider.ConstructResult, error)

Construct is the RPC call that initiates the creation of a new Chart component. It creates, registers, and returns the resulting component object. This contains most of the boilerplate so that the calling component can be relatively simple.

Types

type Chart

type Chart interface {
	pulumi.ComponentResource
	// Type returns the fully qualified Pulumi type token for this resource.
	Type() string
	// SetOutputs registers the resulting Helm Release child resource, after it
	// has been created and registered. This contains the Status, among other things.
	SetOutputs(rel *helm.Release)
}

Chart represents a strongly typed Helm Chart resource. For the most part, it merely participates in the Pulumi resource lifecycle (by virtue of extending pulumi.ComponentResource), but it also offers a few specific helper methods.

type ChartArgs

type ChartArgs interface {
	R() *ReleaseArgs
	V() interface{}
}

ChartArgs is a properly annotated structure (with `pulumi:""` and `json:""` tags) which carries the strongly typed argument payload for the given Chart resource.

type ReleaseArgs

type ReleaseArgs struct {
	helm.ReleaseTypeArgs
}

ReleaseArgs is a lot like helm.ReleaseArgs, except that it doesn't require the "chart" and "repositoryOpts" arguments, since there are sensible defaults for those thanks to this being a strongly typed chart component. TODO: wish we could just reuse the *helm.ReleaseArgs type; see

https://github.com/pulumi/pulumi/issues/8114 for details on why we can't.

func (*ReleaseArgs) InitDefaults

func (args *ReleaseArgs) InitDefaults(chart, repo string, values interface{})

InitDefaults copies the default chart, repo, and values onto the args struct.

func (*ReleaseArgs) To

func (args *ReleaseArgs) To() *helm.ReleaseArgs

To turns the args struct into a Helm-ready ReleaseArgs struct.

Jump to

Keyboard shortcuts

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