env

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(config CreateConfig) error

Create creates a new environment for the project.

func Delete

func Delete(config DeleteConfig) error

Delete deletes an environment.

func GetParams

func GetParams(envName, nsName string, config GetParamsConfig) (map[string]param.Params, error)

GetParams gets all parameters for an environment.

func List

func List(ksApp app.App) (map[string]Env, error)

List lists all environments for the current ksonnet application.

func Rename

func Rename(from, to string, config RenameConfig) error

Rename renames an environment

func SetParams

func SetParams(envName, component string, params param.Params, config SetParamsConfig) error

SetParams sets params for an environment.

Types

type CreateConfig

type CreateConfig struct {
	App         app.App
	Destination Destination
	Fs          afero.Fs
	K8sSpecFlag string
	Name        string
	RootPath    string

	OverrideData []byte
	ParamsData   []byte
}

CreateConfig is configuration for creating an environment.

type DeleteConfig

type DeleteConfig struct {
	App     app.App
	AppRoot string
	Name    string
	Fs      afero.Fs
}

DeleteConfig is a configuration for deleting an environment.

type Destination

type Destination struct {
	// contains filtered or unexported fields
}

Destination contains destination information for a cluster.

func NewDestination

func NewDestination(server, namespace string) Destination

NewDestination creates an instance of Destination.

func (*Destination) MarshalJSON

func (d *Destination) MarshalJSON() ([]byte, error)

MarshalJSON marshals a Destination to JSON.

func (*Destination) Namespace

func (d *Destination) Namespace() string

Namespace is the namespace of the Kubernetes server that targets should be deployed.

func (*Destination) Server

func (d *Destination) Server() string

Server is URL to the Kubernetes server that the cluster is running on.

type Env

type Env struct {
	// Name is the environment name.
	Name string
	// KubernetesVersion is the version of Kubernetes for this environment.
	KubernetesVersion string
	// Destination is the cluster destination for this environment.
	Destination Destination
	// Targets are the component namespaces that will be installed.
	Targets []string
}

Env represents a ksonnet environment.

func Retrieve

func Retrieve(ksApp app.App, name string) (*Env, error)

Retrieve retrieves an environment by name.

type GetParamsConfig

type GetParamsConfig struct {
	AppRoot string
	Fs      afero.Fs
}

GetParamsConfig is config items for getting environment params.

type RenameConfig

type RenameConfig struct {
	App     app.App
	AppRoot string
	Fs      afero.Fs
}

RenameConfig are options for renaming an environment.

type SetParamsConfig

type SetParamsConfig struct {
	AppRoot string
	Fs      afero.Fs
}

SetParamsConfig is config items for setting environment params.

Jump to

Keyboard shortcuts

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