digitalocean

package
v0.3.15 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: MIT Imports: 24 Imported by: 2

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.

Index

Constants

View Source
const (
	CloudProvider = "digitalocean"
)

Variables

This section is empty.

Functions

func BootstrapDigitaloceanMgmtCluster

func BootstrapDigitaloceanMgmtCluster(
	digitalOceanToken string,
	kubeconfigPath string,
	gitProvider string,
	gitUser string,
	cloudflareAPIToken string,
	destinationGitopsRepoURL string,
	gitProtocol string,
	dnsProvider string,
	cloudProvider string,
) error

func DownloadTools

func DownloadTools(kubectlClientPath, kubectlClientVersion, localOs, localArchitecture, terraformClientVersion, toolsDirPath string) error

func GetDigitaloceanTerraformEnvs

func GetDigitaloceanTerraformEnvs(config *providerConfigs.ProviderConfig, envs map[string]string) map[string]string

func GetDomainApexContent

func GetDomainApexContent(domainName string) bool

GetDomainApexContent determines whether or not a target domain features a host responding at zone apex

func GetGithubTerraformEnvs

func GetGithubTerraformEnvs(config *providerConfigs.ProviderConfig, envs map[string]string) map[string]string

func GetGitlabTerraformEnvs

func GetGitlabTerraformEnvs(config *providerConfigs.ProviderConfig, envs map[string]string, gid int) map[string]string

func GetUsersTerraformEnvs

func GetUsersTerraformEnvs(clientset *kubernetes.Clientset, config *providerConfigs.ProviderConfig, envs map[string]string) map[string]string

func GetVaultTerraformEnvs

func GetVaultTerraformEnvs(clientset *kubernetes.Clientset, config *providerConfigs.ProviderConfig, envs map[string]string) map[string]string

func NewDigitalocean

func NewDigitalocean(digitalOceanToken string) *godo.Client

Types

type DigitaloceanConfiguration

type DigitaloceanConfiguration struct {
	Client  *godo.Client
	Context context.Context
}

func (*DigitaloceanConfiguration) CreateSpaceBucket

func (c *DigitaloceanConfiguration) CreateSpaceBucket(cr DigitaloceanSpacesCredentials, bucketName string) error

CreateSpaceBucket

func (*DigitaloceanConfiguration) DeleteDNSRecords added in v0.2.2

func (c *DigitaloceanConfiguration) DeleteDNSRecords(domainName string, dryRun bool) error

DeleteDNSRecords deletes provided DNS records

func (*DigitaloceanConfiguration) DeleteKubernetesClusterVolumes

func (c *DigitaloceanConfiguration) DeleteKubernetesClusterVolumes(resources *godo.KubernetesAssociatedResources) error

DeleteKubernetesClusterVolumes iterates over resource volumes and deletes them

func (*DigitaloceanConfiguration) GetDNSDomains added in v0.1.27

func (c *DigitaloceanConfiguration) GetDNSDomains() ([]string, error)

GetDNSDomains lists all available DNS domains

func (*DigitaloceanConfiguration) GetDNSInfo

func (c *DigitaloceanConfiguration) GetDNSInfo(domainName string) (string, error)

GetDNSInfo determines whether or not a domain exists within digitalocean

func (*DigitaloceanConfiguration) GetDNSRecords

func (c *DigitaloceanConfiguration) GetDNSRecords(domainName string) ([]godo.DomainRecord, error)

GetDNSRecords retrieves DNS records

func (*DigitaloceanConfiguration) GetKubernetesAssociatedResources

func (c *DigitaloceanConfiguration) GetKubernetesAssociatedResources(clusterName string) (*godo.KubernetesAssociatedResources, error)

GetKubernetesAssociatedResources returns resources associated with a digitalocean Kubernetes cluster

func (*DigitaloceanConfiguration) GetRegions added in v0.1.30

func (c *DigitaloceanConfiguration) GetRegions() ([]string, error)

GetRegions lists all available regions

func (*DigitaloceanConfiguration) TestDomainLiveness

func (c *DigitaloceanConfiguration) TestDomainLiveness(domainName string) bool

func (*DigitaloceanConfiguration) ValidateRegion

func (c *DigitaloceanConfiguration) ValidateRegion(region string) error

ValidateRegion guarantees a region argument is valid

type DigitaloceanSpacesCredentials

type DigitaloceanSpacesCredentials struct {
	AccessKey       string
	SecretAccessKey string
	Endpoint        string
}

Jump to

Keyboard shortcuts

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