controller

package
v0.116.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 65 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.Interface) (string, error)

func RestartDeployment

func RestartDeployment(ctx context.Context, clientset kubernetes.Interface, namespace string, deploymentName 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             types.AkamaiAuth
	AWSAuth                types.AWSAuth
	AzureAuth              types.AzureAuth
	CivoAuth               types.CivoAuth
	DigitaloceanAuth       types.DigitaloceanAuth
	VultrAuth              types.VultrAuth
	CloudflareAuth         types.CloudflareAuth
	GitAuth                types.GitAuth
	VaultAuth              types.VaultAuth
	GoogleAuth             types.GoogleAuth
	K3sAuth                types.K3sAuth
	AwsAccessKeyID         string
	AwsSecretAccessKey     string
	NodeType               string
	NodeCount              int
	PostInstallCatalogApps []types.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
	Client *http.Client

	// repositories
	Repositories []string

	// teams
	Teams []string

	// atlantis
	AtlantisWebhookSecret string
	AtlantisWebhookURL    string

	// internal
	KubefirstTeam string

	// state store
	KubefirstStateStoreBucketName string
	KubefirstArtifactsBucketName  string

	KubernetesClient kubernetes.Interface

	// Telemetry
	TelemetryEvent telemetry.TelemetryEvent

	// Azure
	AzureDNSZoneResourceGroup string

	// Provider clients
	AwsClient    *awsinternal.Configuration
	AzureClient  *azureinternal.Client
	GoogleClient google.Configuration
	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() (*types.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) InitController

func (clctrl *ClusterController) InitController(def *types.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 types.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) UpdateClusterOnError added in v0.106.0

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

UpdateClusterOnError implements an error handler for cluster controller objects

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