controller

package
v0.105.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: MIT Imports: 62 Imported by: 0

Documentation

Overview

Copyright (C) 2021-2023, Kubefirst

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadKubefirstAPITokenFromSecret

func ReadKubefirstAPITokenFromSecret(clientset *kubernetes.Clientset) (string, error)

func RestartDeployment

func RestartDeployment(ctx context.Context, clientset kubernetes.Interface, namespace string, deployment_name string) error

Types

type ClusterController

type ClusterController struct {
	CloudProvider             string
	CloudRegion               string
	ClusterName               string
	ClusterID                 string
	ClusterType               string
	DomainName                string
	SubdomainName             string
	DnsProvider               string
	UseCloudflareOriginIssuer bool
	AlertsEmail               string

	// auth
	AkamaiAuth             pkgtypes.AkamaiAuth
	AWSAuth                pkgtypes.AWSAuth
	CivoAuth               pkgtypes.CivoAuth
	DigitaloceanAuth       pkgtypes.DigitaloceanAuth
	VultrAuth              pkgtypes.VultrAuth
	CloudflareAuth         pkgtypes.CloudflareAuth
	GitAuth                pkgtypes.GitAuth
	VaultAuth              pkgtypes.VaultAuth
	GoogleAuth             pkgtypes.GoogleAuth
	K3sAuth                pkgtypes.K3sAuth
	AwsAccessKeyID         string
	AwsSecretAccessKey     string
	NodeType               string
	NodeCount              int
	PostInstallCatalogApps []pkgtypes.GitopsCatalogApp
	InstallKubefirstPro    bool

	// configs
	ProviderConfig providerConfigs.ProviderConfig

	// git
	GitopsTemplateURL    string
	GitopsTemplateBranch string
	GitProvider          string
	GitProtocol          string
	GitHost              string
	GitOwner             string
	GitUser              string
	GitToken             string
	GitlabOwnerGroupID   int

	// container registry
	ContainerRegistryHost string
	ECR                   bool

	// http
	HttpClient *http.Client

	// repositories
	Repositories []string

	// teams
	Teams []string

	// atlantis
	AtlantisWebhookSecret string
	AtlantisWebhookURL    string

	// internal
	KubefirstTeam string

	// state store
	KubefirstStateStoreBucketName string
	KubefirstArtifactsBucketName  string

	KubernetesClient *kubernetes.Clientset

	// Telemetry
	TelemetryEvent telemetry.TelemetryEvent

	// Provider clients
	AwsClient    *awsinternal.AWSConfiguration
	GoogleClient google.GoogleConfiguration
	Kcfg         *k8s.KubernetesClient
	Cluster      types.Cluster
}

func (*ClusterController) ClusterSecretsBootstrap

func (clctrl *ClusterController) ClusterSecretsBootstrap() error

ClusterSecretsBootstrap

func (*ClusterController) ContainerRegistryAuth

func (clctrl *ClusterController) ContainerRegistryAuth() (string, error)

ContainerRegistryAuth

func (*ClusterController) CreateCluster

func (clctrl *ClusterController) CreateCluster() error

CreateCluster

func (*ClusterController) CreateTokens

func (clctrl *ClusterController) CreateTokens(kind string) interface{}

CreateTokens

func (*ClusterController) CreateVirtualClusters

func (clctrl *ClusterController) CreateVirtualClusters() error

ExportClusterRecord will export cluster record to mgmt cluster

func (*ClusterController) DeployRegistryApplication

func (clctrl *ClusterController) DeployRegistryApplication() error

DeployRegistryApplication

func (*ClusterController) DetokenizeKMSKeyID

func (clctrl *ClusterController) DetokenizeKMSKeyID() error

DetokenizeKMSKeyID

func (*ClusterController) DomainLivenessTest

func (clctrl *ClusterController) DomainLivenessTest() error

DomainLivenessTest

func (*ClusterController) DownloadTools

func (clctrl *ClusterController) DownloadTools(toolsDir string) error

DownloadTools This obviously doesn't work in an api-based environment. It's included for testing and development.

func (*ClusterController) ExportClusterRecord

func (clctrl *ClusterController) ExportClusterRecord() error

ExportClusterRecord will export cluster record to mgmt cluster To be intiated by cluster 0

func (*ClusterController) GetCurrentClusterRecord

func (clctrl *ClusterController) GetCurrentClusterRecord() (pkgtypes.Cluster, error)

GetCurrentClusterRecord will return an active cluster's record if it exists

func (*ClusterController) GetRepoURL

func (clctrl *ClusterController) GetRepoURL() (string, error)

func (*ClusterController) GetUserPassword

func (clctrl *ClusterController) GetUserPassword(user string) error

InitializeVault

func (*ClusterController) GitInit

func (clctrl *ClusterController) GitInit() error

GitInit

func (*ClusterController) HandleDomainLiveness

func (clctrl *ClusterController) HandleDomainLiveness(domainLiveness bool) error

HandleDomainLiveness

func (*ClusterController) HandleError

func (clctrl *ClusterController) HandleError(condition string) error

HandleError implements an error handler for cluster controller objects

func (*ClusterController) InitController

func (clctrl *ClusterController) InitController(def *pkgtypes.ClusterDefinition) error

InitController

func (*ClusterController) InitializeArgoCD

func (clctrl *ClusterController) InitializeArgoCD() error

InitializeArgoCD

func (*ClusterController) InitializeBot

func (clctrl *ClusterController) InitializeBot() error

InitializeBot

func (*ClusterController) InitializeVault

func (clctrl *ClusterController) InitializeVault() error

InitializeVault

func (*ClusterController) InstallArgoCD

func (clctrl *ClusterController) InstallArgoCD() error

InstallArgoCD

func (*ClusterController) RepositoryPrep

func (clctrl *ClusterController) RepositoryPrep() error

RepositoryPrep

func (*ClusterController) RepositoryPush

func (clctrl *ClusterController) RepositoryPush() error

RepositoryPush

func (*ClusterController) RunGitTerraform

func (clctrl *ClusterController) RunGitTerraform() error

RunGitTerraform

func (*ClusterController) RunUsersTerraform

func (clctrl *ClusterController) RunUsersTerraform() error

RunUsersTerraform

func (*ClusterController) RunVaultTerraform

func (clctrl *ClusterController) RunVaultTerraform() error

RunVaultTerraform

func (*ClusterController) SetGitTokens

func (clctrl *ClusterController) SetGitTokens(def pkgtypes.ClusterDefinition) error

GetCurrentClusterRecord will return an active cluster's record if it exists

func (*ClusterController) StateStoreCreate

func (clctrl *ClusterController) StateStoreCreate() error

StateStoreCreate

func (*ClusterController) StateStoreCredentials

func (clctrl *ClusterController) StateStoreCredentials() error

StateStoreCredentials

func (*ClusterController) WaitForClusterReady

func (clctrl *ClusterController) WaitForClusterReady() error

WaitForClusterReady

func (*ClusterController) WaitForVault

func (clctrl *ClusterController) WaitForVault() error

WaitForVault

func (*ClusterController) WriteVaultSecrets

func (clctrl *ClusterController) WriteVaultSecrets() error

Jump to

Keyboard shortcuts

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