models

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AutomationTypeHelm      AutomationType = "helm"
	AutomationTypeKustomize AutomationType = "kustomize"

	SourceTypeGit  SourceType = "git"
	SourceTypeHelm SourceType = "helm"
)
View Source
const (
	MaxKubernetesResourceNameLength = 63

	AppCRDPath              = "wego-system.yaml"
	RuntimePath             = "gitops-runtime.yaml"
	SourcePath              = "flux-source-resource.yaml"
	SystemKustResourcePath  = "flux-system-kustomization-resource.yaml"
	UserKustResourcePath    = "flux-user-kustomization-resource.yaml"
	SystemKustomizationPath = "kustomization.yaml"
	WegoAppPath             = "wego-app.yaml"
	WegoConfigPath          = "wego-config.yaml"

	WegoConfigMapName = "weave-gitops-config"
)

Variables

This section is empty.

Functions

func ApplicationNameTooLong added in v0.6.2

func ApplicationNameTooLong(name string) bool

func ConstrainResourceName added in v0.6.2

func ConstrainResourceName(str string) string

func ConvertManifestsToCommitFiles added in v0.6.2

func ConvertManifestsToCommitFiles(manifests []Manifest) []gitprovider.CommitFile

func CreateClusterSourceName added in v0.6.2

func CreateClusterSourceName(gitSourceURL gitproviders.RepoURL) string

func CreateGitopsConfigMap added in v0.6.2

func CreateGitopsConfigMap(fluxNamespace string, wegoNamespace string) (corev1.ConfigMap, error)

func CreateKustomization added in v0.6.2

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

func GetClusterHash added in v0.6.2

func GetClusterHash(clusterName string) string

func IsExternalConfigRepo added in v0.6.0

func IsExternalConfigRepo(url string) bool

Types

type Application

type Application struct {
	Name                string
	Namespace           string
	HelmSourceURL       string
	GitSourceURL        gitproviders.RepoURL
	ConfigRepo          gitproviders.RepoURL
	Branch              string
	Path                string
	AutomationType      AutomationType
	SourceType          SourceType
	HelmTargetNamespace string
}

type AutomationType

type AutomationType string

type Cluster added in v0.6.1

type Cluster struct {
	Name string
}

type GeneratedSecretName added in v0.6.2

type GeneratedSecretName string

func CreateRepoSecretName added in v0.6.2

func CreateRepoSecretName(gitSourceURL gitproviders.RepoURL) GeneratedSecretName

func GetSecretRefForPrivateGitSources added in v0.6.2

func GetSecretRefForPrivateGitSources(ctx context.Context, gitProvider gitproviders.GitProvider, url gitproviders.RepoURL) (GeneratedSecretName, error)

func (GeneratedSecretName) String added in v0.6.2

func (s GeneratedSecretName) String() string

type Manifest added in v0.6.2

type Manifest struct {
	Path    string
	Content []byte
}

func BootstrapManifests added in v0.6.2

func BootstrapManifests(fluxClient flux.Flux, clusterName string, namespace string, configURL gitproviders.RepoURL) ([]Manifest, error)

BootstrapManifests creates all yaml files that are going to be applied to the cluster

func GetSourceManifest added in v0.6.2

func GetSourceManifest(ctx context.Context, fluxClient flux.Flux, gitProviderClient gitproviders.GitProvider, clusterName string, namespace string, configURL gitproviders.RepoURL, branch string) (Manifest, error)

func GitopsManifests added in v0.6.2

func GitopsManifests(ctx context.Context, fluxClient flux.Flux, gitProvider gitproviders.GitProvider, clusterName string, namespace string, configURL gitproviders.RepoURL) ([]Manifest, error)

GitopsManifests generates all yaml files that are going to be written in the config repo

type SourceType

type SourceType string

Jump to

Keyboard shortcuts

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