myks

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	// Name of the application
	Name string
	// Application prototype directory
	Prototype string
	// contains filtered or unexported fields
}

func NewApplication

func NewApplication(e *Environment, name string, prototypeName string) (*Application, error)

func (*Application) Init

func (a *Application) Init() error

func (*Application) Render

func (a *Application) Render() error

func (*Application) Sync

func (a *Application) Sync() error

type CmdResult

type CmdResult struct {
	Stdout string
	Stderr string
}

type Environment

type Environment struct {
	// Path to the environment directory
	Dir string
	// Environment data file
	EnvironmentDataFile string
	// Environment id
	Id string
	// Environment manifest
	Manifest *EnvironmentManifest
	// contains filtered or unexported fields
}

func NewEnvironment

func NewEnvironment(g *Globe, dir string) *Environment

func (*Environment) Init

func (e *Environment) Init(applicationNames []string) error

func (*Environment) Render

func (e *Environment) Render() error

func (*Environment) Sync

func (e *Environment) Sync() error

func (*Environment) SyncAndRender added in v1.2.0

func (e *Environment) SyncAndRender() error

type EnvironmentManifest

type EnvironmentManifest struct {
	Applications []ManifestApplication
}

type Globe

type Globe struct {

	// Project root directory
	RootDir string
	// Base directory for environments
	EnvironmentBaseDir string `default:"envs"`
	// Application prototypes directory
	PrototypesDir string `default:"prototypes"`
	// Rendered kubernetes manifests directory
	RenderedDir string `default:"rendered"`
	// Prefix for kubernetes namespaces
	NamespacePrefix string `default:""`

	// Service directory name
	ServiceDirName string `default:".myks"`
	// Temporary directory name
	TempDirName string `default:"tmp"`
	// Application data file name
	ApplicationDataFileName string `default:"app-data.ytt.yaml"`
	// Environment data file name
	EnvironmentDataFileName string `default:"env-data.ytt.yaml"`
	// Environment manfiest template file name
	EnvironmentManifestTemplateFileName string `default:"manifest.ytt.yaml"`
	// Rendered environment manifest file name
	EnvironmentManifestFileName string `default:"manifest.yaml"`
	// Rendered vendir config file name
	VendirConfigFileName string `default:"vendir.yaml"`
	// Rendered vendir lock file name
	VendirLockFileName string `default:"vendir.lock.yaml"`
	// Downloaded third-party sources
	VendorDirName string `default:"vendor"`
	// Helm charts directory name
	HelmChartsDirName string `default:"charts"`
	// Ytt step directory name
	YttStepDirName string `default:"ytt"`
	// Ytt library directory name
	YttLibraryDirName string `default:"lib"`

	// Paths to scan for environments
	SearchPaths []string
	// Application names to process
	ApplicationNames []string
	// contains filtered or unexported fields
}

Define the main structure

func New

func New(rootDir string) *Globe

func (*Globe) Init

func (g *Globe) Init(searchPaths []string, applicationNames []string) error

func (*Globe) Render

func (g *Globe) Render() error

func (*Globe) Sync

func (g *Globe) Sync() error

func (*Globe) SyncAndRender added in v1.2.0

func (g *Globe) SyncAndRender() error

type HelmConfig

type HelmConfig struct {
	Namespace   string `yaml:"namespace"`
	KubeVersion string `yaml:"kubeVersion"`
	IncludeCRDs bool   `yaml:"includeCRDs"`
}

type ManifestApplication

type ManifestApplication struct {
	Name      string
	Prototype string
}

Jump to

Keyboard shortcuts

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