ephconfig

package
v0.0.0-...-cda7753 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelAppKey              = "app.kubernetes.io/part-of"
	LabelAppValueEphemerator = "ephemerator.tilt.dev"
	LabelNameKey             = "app.kubernetes.io/name"
	LabelNameValueEphrunner  = "ephrunner"
)

Variables

This section is empty.

Functions

func IsAllowed

func IsAllowed(allowlist *Allowlist, spec EnvSpec) error

Validate the environment spec for anything that looks suspicious: - The repo must match our allow list. - The path must be a valid relative path. - The branch must look like a reasonable branch name.

func ReadGatewayHost

func ReadGatewayHost() (string, error)

Types

type Allowlist

type Allowlist struct {
	RepoBase string `json:"repoBase" yaml:"repoBase"`

	RepoNames []string `json:"repoNames" yaml:"repoNames"`
}

Format of the Allowlist key in ephctrl-allowlist ConfigMap

func ReadAllowlist

func ReadAllowlist() (*Allowlist, error)

type EnvSpec

type EnvSpec struct {
	Repo   string
	Branch string
	Path   string
}

Jump to

Keyboard shortcuts

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