stateval

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package stateval is used for generating Helmfile state values. State values are consumed in both helmfile.yaml and values.yaml.gotmpl files.

Note: We serialize yaml keys with upper case name for greater readability in Go templates. (so that we can use .Values.Release.ChartPath and not .Values.release.chartPath)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppValues

type AppValues struct {
	// Release the release that is being rendered
	Release Release `yaml:"Release"`
	// ChartPath filesystem path for the chart that is being rendered
	ChartPath string `yaml:"ChartPath"`
	// Destination destination where the release is being deployed
	Destination Destination `yaml:"Destination"`
	// Environment environment where the release is being deployed (for app releases only)
	Environment Environment `yaml:"Environment,omitempty"`
	// Cluster cluster where the release is being deployed (for cluster releases only)
	Cluster Cluster `yaml:"Cluster,omitempty"`
}

AppValues -- the full set of helmfile state values for rendering application manifests (used by $THELMA_HOME/helmfile.yaml)

func BuildAppValues

func BuildAppValues(r terra.Release, chartPath string) AppValues

BuildAppValues generates an AppValues for the given release

type ArgoApp

type ArgoApp struct {
	// ProjectName name of the ArgoCD project the release's Argo app will belong to
	ProjectName string `yaml:"ProjectName"`
	// ClusterName name of the cluster this release is being deployed to
	ClusterName string `yaml:"ClusterName"`
	// ClusterAddress address of the cluster this release is being deployed to
	ClusterAddress string `yaml:"ClusterAddress"`
}

ArgoApp -- information about the Argo application that will be used to deploy this release

type ArgoAppValues

type ArgoAppValues struct {
	// Release the release this Argo app will deploy
	Release Release `yaml:"Release"`
	// Destination destination where this Argo app will deploy the release to
	Destination Destination `yaml:"Destination"`
	// ArgoApp information about the cluster and project the ArgoApp will deploy to
	ArgoApp ArgoApp `yaml:"ArgoApp"`
	// Environment environment where the release is being deployed (for app releases only)
	Environment Environment `yaml:"Environment,omitempty"`
	// Cluster cluster where the release is being deployed (for cluster releases only)
	Cluster Cluster `yaml:"Cluster,omitempty"`
}

ArgoAppValues -- the full set of helmfile state values for rendering argo apps (used by $THELMA_HOME/argocd/application/helmfile.yaml)

func BuildArgoAppValues

func BuildArgoAppValues(r terra.Release) ArgoAppValues

BuildArgoAppValues generates an ArgoAppValues for the given release

type ArgoProject

type ArgoProject struct {
	// ProjectName name of the ArgoCD project that is being rendered
	ProjectName string `yaml:"ProjectName"`
}

ArgoProject -- information about the ArgoProject that will be used to deploy this release

type ArgoProjectValues

type ArgoProjectValues struct {
	// Destination environment or cluster that apps in this project will deploy to
	Destination Destination `yaml:"Destination"`
	// ArgoProject information about the Argo project that is being rendered
	ArgoProject ArgoProject `yaml:"ArgoProject"`
}

ArgoProjectValues -- the full set of helmfile state values for rendering argo projects (used by $THELMA_HOME/argocd/projects/helmfile.yaml)

func BuildArgoProjectValues

func BuildArgoProjectValues(d terra.Destination) ArgoProjectValues

BuildArgoProjectValues genreates an ArgoProjectValues for the given destination

type Cluster

type Cluster struct {
	// Name of the cluster this release is being deployed to (omitted if app release)
	Name string `yaml:"Name,omitempty"`
}

Cluster -- information about the cluster the release is being deployed to

type Destination

type Destination struct {
	// Name of the environment or cluster
	Name string `yaml:"Name"`
	// Type -- either "environment" or "cluster"
	Type string `yaml:"Type"`
	// ConfigBase configuration base for this environment or cluster. Eg. "live", "terra"
	ConfigBase string `yaml:"ConfigBase"`
	// ConfigName configuration name for this environment for cluster.
	// (same as Name except for dynamically-created environments)
	ConfigName string `yaml:"ConfigName"`
}

Destination -- information about where chart release is being deployed (env, cluster)

type Environment

type Environment struct {
	// Name of the environment this release is being deployed to
	Name string `yaml:"Name"`
	// DEPRECATED (remove once we are no longer running hybrids bee/fiab envs)
	IsHybrid bool `yaml:"IsHybrid"`
	// DEPRECATED (remove once we are no longer running hybrid bee/fiab envs)
	Fiab struct {
		Name string `yaml:"Name,omitempty"`
		IP   string `yaml:"IP,omitempty"`
	} `yaml:"Fiab,omitempty"`
}

Environment -- information about the environment the release is being deployed to.

type Release

type Release struct {
	// Name of this release
	Name string `yaml:"Name"`
	// Type of this release
	Type string `yaml:"Type"`
	// Namespace this release is being deployed to
	Namespace string `yaml:"Namespace"`
	// AppVersion version of the application that's being deployed (only included for app releases)
	AppVersion string `yaml:"AppVersion,omitempty"`
}

Release -- information related to the chart release that is being rendered

Jump to

Keyboard shortcuts

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