automation

package
v0.5.1-rc3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxKubernetesResourceNameLength = 63

	WeGOAppIdentifierLabelKey = "wego.weave.works/app-identifier"
)
View Source
const (
	ConfigModeClusterOnly  ConfigMode = "clusterOnly"
	ConfigModeUserRepo     ConfigMode = "userRepo"
	ConfigModeExternalRepo ConfigMode = "externalRepo"

	ResourceKindApplication    ResourceKind = "Application"
	ResourceKindSecret         ResourceKind = "Secret"
	ResourceKindGitRepository  ResourceKind = "GitRepository"
	ResourceKindHelmRepository ResourceKind = "HelmRepository"
	ResourceKindKustomization  ResourceKind = "Kustomization"
	ResourceKindHelmRelease    ResourceKind = "HelmRelease"
)

Variables

This section is empty.

Functions

func AddWegoIgnore

func AddWegoIgnore(sourceManifest []byte) ([]byte, error)

func AppAutomationDeployPath

func AppAutomationDeployPath(a models.Application) string

func AppAutomationKustomizePath

func AppAutomationKustomizePath(a models.Application) string

func AppAutomationSourcePath

func AppAutomationSourcePath(a models.Application) string

func AppDeployName

func AppDeployName(a models.Application) string

func AppToWegoApp

func AppToWegoApp(app models.Application) wego.Application

func AppYamlDir

func AppYamlDir(a models.Application) string

func AppYamlPath

func AppYamlPath(a models.Application) string

func ApplicationNameTooLong

func ApplicationNameTooLong(name string) bool

func AutomationUserKustomizePath

func AutomationUserKustomizePath(clusterName string) string

func ConstrainResourceName

func ConstrainResourceName(str string) string

func CreateKustomize

func CreateKustomize(name, namespace string, resources ...string) types.Kustomization

func GenerateResourceName

func GenerateResourceName(url gitproviders.RepoURL) string

func GetAppHash

func GetAppHash(a models.Application) string

func GetOrCreateKustomize

func GetOrCreateKustomize(filename, name, namespace string) (types.Kustomization, error)

func WegoAppToApp

func WegoAppToApp(app wego.Application) (models.Application, error)

Types

type AutomationGen

type AutomationGen struct {
	GitProvider gitproviders.GitProvider
	Flux        flux.Flux
	Logger      logger.Logger
}

func (*AutomationGen) GenerateAutomation

func (a *AutomationGen) GenerateAutomation(ctx context.Context, app models.Application, clusterName string) ([]AutomationManifest, error)

type AutomationGenerator

type AutomationGenerator interface {
	GenerateAutomation(ctx context.Context, app models.Application, clusterName string) ([]AutomationManifest, error)
}

func NewAutomationGenerator

func NewAutomationGenerator(gp gitproviders.GitProvider, flux flux.Flux, logger logger.Logger) AutomationGenerator

type AutomationManifest

type AutomationManifest struct {
	Path    string
	Content []byte
}

type ConfigMode

type ConfigMode string

type GeneratedSecretName

type GeneratedSecretName string

func CreateRepoSecretName

func CreateRepoSecretName(gitSourceURL gitproviders.RepoURL) GeneratedSecretName

func (GeneratedSecretName) String

func (s GeneratedSecretName) String() string

type ResourceKind

type ResourceKind string

func DeployKind

func DeployKind(a models.Application) ResourceKind

func SourceKind

func SourceKind(a models.Application) ResourceKind

func (ResourceKind) ToGVR

type ResourceRef

type ResourceRef struct {
	Kind           ResourceKind
	Name           string
	RepositoryPath string
}

type SourceType

type SourceType string

Jump to

Keyboard shortcuts

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