Documentation
¶
Index ¶
- Variables
- func CurrentVersion(repoURL string) string
- func GenerateFromStackYaml(stackConfig StackConfig) (map[string]string, error)
- func IsVersionLocked(stackConfig StackConfig) (bool, error)
- func LatestVersion(repoURL string) (string, error)
- func RepoUrlWithoutVersion(repoURL string) string
- func StackDefinitionFromRepo(repoUrl string) (string, error)
- func VersionsSince(repoURL string, sinceString string) ([]string, error)
- type Component
- type StackConfig
- type StackDefinition
- type StackRef
Constants ¶
This section is empty.
Variables ¶
View Source
var BootstrapCmd = cli.Command{ Name: "bootstrap", Usage: "Bootstraps the gitops controller", UsageText: `stack bootstrap --single-env --gitops-repo-url [email protected]:<user>/<repo>.git`, Action: gitops.Bootstrap, Flags: []cli.Flag{ &cli.StringFlag{ Name: "env", Usage: "environment to bootstrap", }, &cli.BoolFlag{ Name: "single-env", Usage: "if the repo holds manifests from a single environment", }, &cli.StringFlag{ Name: "gitops-repo-url", Usage: "URL of the gitops repo (mandatory)", Required: true, }, &cli.StringFlag{ Name: "gitops-repo-path", Usage: "path to the working copy of the gitops repo, default: current dir", }, &cli.BoolFlag{ Name: "no-controller", Usage: "to not bootstrap the FluxV2 gitops controller, only the GitRepository and Kustomization to add a new source", }, }, }
View Source
var Command = cli.Command{ Name: "stack", Usage: "Bootstrap curated Kubernetes stacks", Subcommands: []*cli.Command{ &GenerateCmd, &ConfigureCmd, &LintCmd, &UpdateCmd, }, }
View Source
var ConfigureCmd = cli.Command{ Name: "configure", Usage: "Configures Kubernetes resources and writes a stack.yaml", UsageText: `stack configure`, Action: configure, Flags: []cli.Flag{ &cli.StringFlag{ Name: "config", Aliases: []string{"c"}, }, &cli.StringFlag{ Name: "stack-repo", Aliases: []string{"r"}, }, &cli.StringFlag{ Name: "stack-definition", }, }, }
View Source
var GenerateCmd = cli.Command{ Name: "generate", Usage: "Generates Kubernetes resources from stack.yaml", UsageText: `stack generate`, Action: generateFunc, Flags: []cli.Flag{ &cli.StringFlag{ Name: "config", Aliases: []string{"c"}, }, }, }
View Source
var LintCmd = cli.Command{ Name: "lint", Usage: "Lints the stack.yaml file", UsageText: `stack lint`, Action: lint, Flags: []cli.Flag{ &cli.StringFlag{ Name: "config", Aliases: []string{"c"}, Usage: "stack.yaml to lint", }, }, }
View Source
var UpdateCmd = cli.Command{ Name: "update", Usage: "Updates the stack version in stack.yaml", UsageText: `stack update`, Action: update, Flags: []cli.Flag{ &cli.StringFlag{ Name: "config", Aliases: []string{"c"}, }, &cli.BoolFlag{ Name: "check", }, &cli.StringFlag{ Name: "output", Aliases: []string{"o"}, Usage: "output format, eg.: json", }, }, }
Functions ¶
func CurrentVersion ¶
func GenerateFromStackYaml ¶
func GenerateFromStackYaml(stackConfig StackConfig) (map[string]string, error)
func IsVersionLocked ¶
func IsVersionLocked(stackConfig StackConfig) (bool, error)
func LatestVersion ¶
func RepoUrlWithoutVersion ¶
func StackDefinitionFromRepo ¶
Types ¶
type Component ¶
type Component struct { Name string `json:"name,omitempty" yaml:"name"` Description string `json:"description,omitempty" yaml:"description"` Category string `json:"category,omitempty" yaml:"category"` Variable string `json:"variable,omitempty" yaml:"variable"` Logo string `json:"logo,omitempty" yaml:"logo"` OnePager string `json:"onePager,omitempty" yaml:"onePager"` Schema string `json:"schema,omitempty" yaml:"schema"` UISchema string `json:"uiSchema,omitempty" yaml:"uiSchema"` }
type StackConfig ¶
type StackConfig struct { Stack StackRef `yaml:"stack" json:"stack"` Config map[string]interface{} `yaml:"config" json:"config"` }
func Configure ¶
func Configure(stackDefinition StackDefinition, existingStackConfig StackConfig) (StackConfig, bool, error)
type StackDefinition ¶
type StackDefinition struct { Name string `json:"name,omitempty" yaml:"name"` Description string `json:"description,omitempty" yaml:"description"` Intro string `json:"intro,omitempty" yaml:"intro"` Categories []interface{} `json:"categories" yaml:"categories"` Components []*Component `json:"components,omitempty" yaml:"components"` ChangLog string `json:"changeLog,omitempty" yaml:"changeLog"` Message string `json:"message,omitempty" yaml:"message"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.