models

package
v0.6.2-patch2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: MPL-2.0 Imports: 21 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"
	WegoProfilesPath        = "profiles.yaml"

	WegoConfigMapName = "weave-gitops-config"
	WegoImage         = "ghcr.io/weaveworks/wego-app"
)

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, configRepo 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

func ValidateApplicationName

func ValidateApplicationName(name string) error

func WegoImageAndVersion

func WegoImageAndVersion() (string, string)

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(ctx context.Context, fluxClient flux.Flux, gitProvider gitproviders.GitProvider, kubeClient kube.Kube, params ManifestsParams) ([]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 NoClusterApplicableManifests

func NoClusterApplicableManifests(params ManifestsParams) ([]Manifest, error)

NoClusterApplicableManifests generates all yaml files that are going to be written in the config repo and cannot be applied to the cluster directly

type ManifestsParams

type ManifestsParams struct {
	ClusterName   string
	WegoNamespace string
	ConfigRepo    gitproviders.RepoURL
}

type SourceType

type SourceType string

Jump to

Keyboard shortcuts

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