kustomize

package
v0.0.0-...-46a1c6e Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

You can use the "packr clean" command to clean up this, and any other packr generated files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildInput

type BuildInput struct {
	Config MixinConfig
}

BuildInput represents stdin passed to the mixin for the build command.

type InstallAction

type InstallAction struct {
	Steps []InstallStep `yaml:"install"`
}

The `Porter.sh` action for Install

type InstallArguments

type InstallArguments struct {
	Step `yaml:",inline"`

	Name          string            `yaml:"name"`
	Kustomization []string          `yaml:"kustomization_input"`
	Manifests     string            `yaml:"kubernetes_manifest_output"`
	Set           map[string]string `yaml:"set"`
	AutoDeploy    bool              `yaml:"autoDeploy"`
	Reorder       string            `yaml:"reorder"`
}

The base level Structure that captures the high level data types

needed by Kustomize.

`Kustomization` field in the Go struct and `kustomization_input` field in the `porter.yaml`
is the location against which to run the `kustomize build` command. This will
be an overlay directory.

`Manifests` field in the Go struct and `kubernetes_manifest_output` field in the `porter.yaml`
is the location into which `kustomize` will output the generated kubernetes resource yaml files.

`Reorder` is a boolean flag in the Go struct and `autoDeploy` field in the `porter.yaml` which
 enables `kustomize` to reorder the resources within the yaml file that is to be output.

 `Reorder` from the `kustomize` documentation -

 --reorder {none | legacy } flag to the build command.
 The default value is legacy which means no change - continue to output resources in the legacy order
 (Namespaces first, ValidatingWebhookConfiguration last, etc. - see gvk.go)
 A value of none suppresses the sort

`Set`, `AutoDeploy` are not currently implemented.

type InstallStep

type InstallStep struct {
	InstallArguments `yaml:"kustomize"`
}

The `Porter.sh` step for Install for Kustomize

type KustomizeOutput

type KustomizeOutput struct {
	Name   string `yaml:"name"`
	Secret string `yaml:"secret"`
	Key    string `yaml:"key"`
}

type Mixin

type Mixin struct {
	*context.Context

	KustomizeClientVersion string
	// contains filtered or unexported fields
}

Kusomtize is the logic behind the kustomize mixin

func New

func New() *Mixin

New kustomize mixin client, initialized with useful defaults.

func (*Mixin) Build

func (m *Mixin) Build() error

func (*Mixin) GetSchema

func (m *Mixin) GetSchema() (string, error)

Returns the JSON Schema for this `kustomize` mixin's configuration, found within a Porter.sh

`porter.yaml` configuration file, as a `string`

func (*Mixin) Install

func (m *Mixin) Install() error

The public method invoked by `porter` when performing an `Install` step that has a `kustomize` mixin step

func (*Mixin) PrintSchema

func (m *Mixin) PrintSchema() error

Outputs the JSON Schema for this `kustomize` mixin's configuration found within a Porter.sh

`porter.yaml` configuration file.

func (*Mixin) PrintVersion

func (m *Mixin) PrintVersion(opts version.Options) error

func (*Mixin) Status

func (m *Mixin) Status(opts StatusOptions) error

Status reports the status for a provided set of Kustomize releases

func (*Mixin) Uninstall

func (m *Mixin) Uninstall() error

Uninstall deletes a provided set of Kustomize releases, supplying optional flags/params

func (*Mixin) Upgrade

func (m *Mixin) Upgrade() error

Upgrade issues a kustomize upgrade command for a release using the provided UpgradeArguments

func (*Mixin) ValidatePayload

func (m *Mixin) ValidatePayload(b []byte) error

type MixinConfig

type MixinConfig struct {
	ClientVersion string `yaml:"clientVersion,omitempty"`
}

type StatusAction

type StatusAction struct {
	Steps []StatusStep `yaml:"status"`
}

type StatusArguments

type StatusArguments struct {
	Step `yaml:",inline"`

	Releases []string `yaml:"releases"`
}

StatusArguments are the arguments available for the Status action

type StatusOptions

type StatusOptions struct {
	printer.PrintOptions
}

type StatusStep

type StatusStep struct {
	StatusArguments `yaml:"kustomize"`
}

StatusStep represents the structure of an Status action

type Step

type Step struct {
	Description string            `yaml:"description"`
	Outputs     []KustomizeOutput `yaml:"outputs,omitempty"`
}

type TestMixin

type TestMixin struct {
	*Mixin
	TestContext *context.TestContext
}

func NewTestMixin

func NewTestMixin(t *testing.T) *TestMixin

NewTestMixin initializes a kustomize mixin, with the output buffered, and an in-memory file system.

type UninstallAction

type UninstallAction struct {
	Steps []UninstallStep `yaml:"uninstall"`
}

type UninstallArguments

type UninstallArguments struct {
	Step `yaml:",inline"`

	Name          string            `yaml:"name"`
	Kustomization []string          `yaml:"kustomization_input"`
	Manifests     string            `yaml:"kubernetes_manifest_output"`
	Reorder       string            `yaml:"reorder"`
	Set           map[string]string `yaml:"set"`
	Purge         bool              `yaml:"purge"`
}

UninstallArguments are the arguments available for the Uninstall action

type UninstallStep

type UninstallStep struct {
	UninstallArguments `yaml:"kustomize"`
}

UninstallStep represents the structure of an Uninstall action

type UpgradeAction

type UpgradeAction struct {
	Steps []UpgradeStep `yaml:"upgrade"`
}

type UpgradeArguments

type UpgradeArguments struct {
	Step `yaml:",inline"`

	Name          string            `yaml:"name"`
	Kustomization []string          `yaml:"kustomization_input"`
	Manifests     string            `yaml:"kubernetes_manifest_output"`
	Reorder       string            `yaml:"reorder"`
	Set           map[string]string `yaml:"set"`
}

UpgradeArguments represent the arguments available to the Upgrade step

type UpgradeStep

type UpgradeStep struct {
	UpgradeArguments `yaml:"kustomize"`
}

UpgradeStep represents the structure of an Upgrade step

Directories

Path Synopsis
You can use the "packr2 clean" command to clean up this, and any other packr generated files.
You can use the "packr2 clean" command to clean up this, and any other packr generated files.

Jump to

Keyboard shortcuts

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