providerConfigs

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 19 Imported by: 1

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.

Index

Constants

View Source
const (
	GithubHost             = "github.com"
	GitlabHost             = "gitlab.com"
	KubectlClientVersion   = "v1.25.7"
	LocalhostOS            = runtime.GOOS
	LocalhostArch          = runtime.GOARCH
	TerraformClientVersion = "1.3.8"
	ArgocdHelmChartVersion = "4.10.5"

	ArgocdPortForwardURL = runtimepkg.ArgocdPortForwardURL
	VaultPortForwardURL  = runtimepkg.VaultPortForwardURL
)

Variables

This section is empty.

Functions

func AdjustGitopsRepo

func AdjustGitopsRepo(
	cloudProvider string,
	clusterName string,
	clusterType string,
	gitopsRepoDir string,
	gitProvider string,
	k1Dir string,
	apexContentExists bool,
	useCloudflareOriginIssuer bool,
) error

AdjustGitopsRepo

func AdjustMetaphorRepo

func AdjustMetaphorRepo(
	destinationMetaphorRepoURL string,
	gitopsRepoDir string,
	gitProvider string,
	k1Dir string,
) error

AdjustMetaphorRepo

func BootstrapMgmtCluster

func BootstrapMgmtCluster(
	clientset *kubernetes.Clientset,
	gitProvider string,
	gitUser string,
	destinationGitopsRepoURL string,
	gitProtocol string,
	cloudflareAPIToken string,
	cloudAuth string,
	dnsProvider string,
	cloudProvider string,
	httpsPassword string,
	sshToken string,
) error

func DetokenizeAdditionalPath

func DetokenizeAdditionalPath(path string, tokens *GitopsDirectoryValues) error

DetokenizeAdditionalPath - Translate tokens by values on a given path

func DetokenizeGitGitops

func DetokenizeGitGitops(path string, tokens *GitopsDirectoryValues, gitProtocol string, useCloudflareOriginIssuer bool) error

DetokenizeGitGitops - Translate tokens by values on a given path

func DetokenizeGitMetaphor

func DetokenizeGitMetaphor(path string, tokens *MetaphorTokenValues) error

DetokenizeGithubMetaphor - Translate tokens by values on a given path

func K8sNamespaces

func K8sNamespaces(clientset *kubernetes.Clientset) error

func PrepareGitRepositories

func PrepareGitRepositories(
	cloudProvider string,
	gitProvider string,
	clusterName string,
	clusterType string,
	destinationGitopsRepoURL string,
	gitopsDir string,
	gitopsTemplateBranch string,
	gitopsTemplateURL string,
	destinationMetaphorRepoURL string,
	k1Dir string,
	gitopsTokens *GitopsDirectoryValues,
	metaphorDir string,
	metaphorTokens *MetaphorTokenValues,
	apexContentExists bool,
	gitProtocol string,
	useCloudflareOriginIssuer bool,
) error

PrepareGitRepositories

func ServiceAccounts

func ServiceAccounts(clientset *kubernetes.Clientset, cloudflareAPIToken string) error

Types

type GitopsDirectoryValues

type GitopsDirectoryValues struct {
	AlertsEmail                    string
	AtlantisAllowList              string
	CloudProvider                  string
	CloudRegion                    string
	ClusterId                      string
	ClusterName                    string
	ClusterType                    string
	ContainerRegistryURL           string
	DomainName                     string
	SubdomainName                  string
	DNSProvider                    string
	Kubeconfig                     string
	KubeconfigPath                 string
	KubefirstArtifactsBucket       string
	KubefirstStateStoreBucket      string
	KubefirstTeam                  string
	KubefirstVersion               string
	StateStoreBucketHostname       string
	NodeType                       string
	NodeCount                      int
	ArgoCDIngressURL               string
	ArgoCDIngressNoHTTPSURL        string
	ArgoWorkflowsIngressURL        string
	ArgoWorkflowsIngressNoHTTPSURL string
	ArgoWorkflowsDir               string
	AtlantisIngressURL             string
	AtlantisIngressNoHTTPSURL      string
	AtlantisWebhookURL             string
	ChartMuseumIngressURL          string
	VaultIngressURL                string
	VaultIngressNoHTTPSURL         string
	VaultDataBucketName            string
	VouchIngressURL                string
	RegistryPath                   string
	SecretStoreRef                 string
	Project                        string
	ClusterDestination             string
	Environment                    string

	AwsIamArnAccountRoot string
	AwsKmsKeyId          string
	AwsNodeCapacityType  string
	AwsAccountID         string

	GoogleAuth       string
	GoogleProject    string
	GoogleUniqueness string
	ForceDestroy     string

	K3sServersPrivateIps []string
	K3sServersPublicIps  []string
	K3sServersArgs       []string
	SshUser              string
	SshPrivateKey        string

	GitDescription       string
	GitNamespace         string
	GitProvider          string
	GitProtocol          string
	GitopsRepoGitURL     string
	GitopsRepoURL        string
	GitRunner            string
	GitRunnerDescription string
	GitRunnerNS          string
	GitURL               string

	GitHubHost  string
	GitHubOwner string
	GitHubUser  string

	GitlabHost         string
	GitlabOwner        string
	GitlabOwnerGroupID int
	GitlabUser         string

	GitopsRepoAtlantisWebhookURL               string
	GitopsRepoNoHTTPSURL                       string
	WorkloadClusterTerraformModuleURL          string
	WorkloadClusterBootstrapTerraformModuleURL string

	ExternalDNSProviderName         string
	ExternalDNSProviderTokenEnvName string
	ExternalDNSProviderSecretName   string
	ExternalDNSProviderSecretKey    string

	UseTelemetry string
}

type MetaphorTokenValues

type MetaphorTokenValues struct {
	CheckoutCWFTTemplate          string
	CloudRegion                   string
	ClusterName                   string
	CommitCWFTTemplate            string
	ContainerRegistryURL          string
	DomainName                    string
	MetaphorDevelopmentIngressURL string
	MetaphorProductionIngressURL  string
	MetaphorStagingIngressURL     string
}

type ProviderConfig

type ProviderConfig struct {
	AkamaiToken                      string
	CivoToken                        string
	DigitaloceanToken                string
	GoogleAuth                       string
	GoogleProject                    string
	K3sServersPrivateIps             []string
	K3sServersPublicIps              []string
	K3sSshPrivateKey                 string
	K3sServersArgs                   []string
	K3sSshUser                       string
	VultrToken                       string
	CloudflareAPIToken               string
	CloudflareOriginCaIssuerAPIToken string

	GithubToken string
	GitlabToken string

	ArgoWorkflowsDir                string
	DestinationGitopsRepoHttpsURL   string
	DestinationGitopsRepoGitURL     string
	DestinationGitopsRepoURL        string
	DestinationMetaphorRepoHttpsURL string
	DestinationMetaphorRepoGitURL   string
	DestinationMetaphorRepoURL      string
	GitopsDir                       string
	GitProvider                     string
	GitProtocol                     string
	K1Dir                           string
	Kubeconfig                      string
	KubectlClient                   string
	KubefirstBotSSHPrivateKey       string
	KubefirstConfig                 string
	LogsDir                         string
	MetaphorDir                     string
	RegistryAppName                 string
	RegistryYaml                    string
	SSLBackupDir                    string
	TerraformClient                 string
	ToolsDir                        string

	GitopsDirectoryValues   *GitopsDirectoryValues
	MetaphorDirectoryValues *MetaphorTokenValues
}

func GetConfig

func GetConfig(
	clusterName string,
	domainName string,
	gitProvider string,
	gitOwner string,
	gitProtocol string,
	cloudflareAPIToken string,
	cloudflareOriginCaIssuerAPIToken string,
) *ProviderConfig

GetConfig - load default values from kubefirst installer

Jump to

Keyboard shortcuts

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