cluster

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const ArlonGen1ClusterLabelQueryOnArgoApps = "managed-by=arlon,arlon-type=cluster"
View Source
const ArlonGen2ClusterLabelQueryOnArgoApps = "managed-by=arlon,arlon-type=cluster-app"

Variables

This section is empty.

Functions

func ConstructRootApp

func ConstructRootApp(
	argocdNs string,
	clusterName string,
	innerClusterName string,
	repoUrl string,
	repoBranch string,
	repoPath string,
	clusterSpecName string,
	clusterSpecCm *corev1.ConfigMap,
	profileName string,
	managementClusterUrl string,
	gen2CAS bool,
) (*argoappv1.Application, error)

func Create

func Create(
	appIf argoapp.ApplicationServiceClient,
	config *restclient.Config,
	argocdNs,
	arlonNs,
	clusterName,
	baseClusterName,
	repoUrl,
	repoBranch,
	basePath,
	clusterSpecName string,
	prof *arlonv1.Profile,
	createInArgoCd bool,
	managementClusterUrl string,
	withCAS bool,
) (*argoappv1.Application, error)

func CreateClusterApp added in v0.9.0

func CreateClusterApp(
	appIf argoapp.ApplicationServiceClient,
	argocdNs string,
	clusterName string,
	baseClusterName string,
	repoUrl string,
	repoRevision string,
	repoPath string,
	createInArgoCd bool,
	overridden bool,
) (*argoappv1.Application, error)

CreateClusterApp creates a cluster-app that accompanies an arlon-app for gen2 clusters

func CreatePatchDir added in v0.10.0

func CreatePatchDir(
	config *restclient.Config,
	clusterName string,
	repoURL string,
	argocdNs string,
	basePath string,
	patchRepoRevision string,
	baseRepoRevision string,
	overridesPath string,
	baseRepoUrl string,
	baseRepoPath string) error

func CreateProfileApp added in v0.9.0

func CreateProfileApp(
	profileAppName string,
	appIf argoapp.ApplicationServiceClient,
	argocdNs string,
	clusterName string,
	prof *arlonv1.Profile,
	createInArgoCd bool,
) (*argoappv1.Application, error)

CreateProfileApp creates a profile-app that accompanies an arlon-app for gen2 clusters

func Delete added in v0.9.0

func Delete(

	argoIf argoclient.Client,
	config *restclient.Config,
	argocdNs string,
	name string,
) error

func DeleteOverridesDir added in v0.10.0

func DeleteOverridesDir(app *v1alpha1.Application, kubeClient *kubernetes.Clientset, argocdNs string, clusterName string) error

func DeployPatchToGit added in v0.10.0

func DeployPatchToGit(
	creds *argocd.RepoCreds,
	argocdNs string,
	clusterName string,
	repoUrl string,
	patchRepoRevision string,
	baseRepoRevision string,
	basePath string,
	overrides string,
	baseRepoUrl string,
	baseRepoPath string,
) error

func DeployToGit

func DeployToGit(
	creds *argocd.RepoCreds,
	argocdNs string,
	bundles []bundle.Bundle,
	clusterName string,
	repoUrl string,
	repoBranch string,
	basePath string,
	prof *arlonv1.Profile,
) error

func DestroyProfileApps added in v0.9.9

func DestroyProfileApps(
	appIf argoapp.ApplicationServiceClient,
	clusterName string,
) error

DestroyProfileApp destroys a profile-app that accompanies an arlon-app for gen2 clusters

func ManageExternal

func ManageExternal(
	argoIf argoclient.Client,
	config *restclient.Config,
	argocdNs,
	clusterName string,
	prof *arlonv1.Profile,
) error

func NgUpdate added in v0.9.9

func NgUpdate(
	appIf argoapp.ApplicationServiceClient,
	config *restclient.Config,
	argocdNs,
	arlonNs,
	clusterName,
	profileName string,
	updateInArgoCd bool,
) (*argoappv1.Application, error)

func ProcessDynamicProfile

func ProcessDynamicProfile(
	wt *gogit.Worktree,
	clusterName string,
	profileName string,
	argocdNs string,
	repoUrl string,
	repoPath string,
	appPath string,
) error

func SetAppProfiles added in v0.10.0

func SetAppProfiles(
	appIf argoapp.ApplicationServiceClient,
	name string,
	commaSeparatedAppProfiles string,
) error

func UnmanageExternal

func UnmanageExternal(
	argoIf argoclient.Client,
	config *restclient.Config,
	argocdNs,
	clusterName string,
) error

func Update

func Update(
	appIf argoapp.ApplicationServiceClient,
	config *restclient.Config,
	argocdNs,
	arlonNs,
	clusterName,
	clusterSpecName string,
	profileName string,
	updateInArgoCd bool,
	managementClusterUrl string,
) (*argoappv1.Application, error)

Update modifies a cluster to use a different cluster spec or profile, or both. Only some specific changes are allowed. For example, the API provider, cloud provider, or cluster type cannot change, meaning if a new cluster spec is chosen, it must preserve those values. There are no restrictions on the new profile, if one is specified. Bundles associated with the old profile will automatically be removed from the cluster.

Types

type BaseClusterInfo added in v0.9.0

type BaseClusterInfo struct {
	Name         string
	RepoUrl      string
	RepoRevision string
	RepoPath     string
	Overridden   string
}

type Cluster

type Cluster struct {
	Name            string
	ClusterSpecName string           // empty for external clusters
	BaseCluster     *BaseClusterInfo // gen2 only
	ProfileName     string           // gen1 profile
	IsExternal      bool
	SecretName      string   // The corresponding argocd secret. Empty for non-external clusters.
	AppProfiles     []string // gen2 profiles
}

func Get

func Get(
	appIf argoapp.ApplicationServiceClient,
	config *restclient.Config,
	argocdNs string,
	name string,
) (cl *Cluster, err error)

func List

func List(
	appIf argoapp.ApplicationServiceClient,
	config *restclient.Config,
	argocdNs string,
) (clist []Cluster, err error)

func (*Cluster) String added in v0.9.0

func (c *Cluster) String() string

Jump to

Keyboard shortcuts

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