credentials

package
v0.0.0-...-2170ac4 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAWSEnvVars

func GetAWSEnvVars() []string

GetAWSEnvVars returns the list of AWS environment variables

func GetOpenStackEnvVars

func GetOpenStackEnvVars() []string

GetOpenStackEnvVars returns the list of OpenStack environment variables

Types

type AWSCredentials

type AWSCredentials struct {
	AccessKeyID     string   `json:"access_key_id,omitempty"`
	SecretAccessKey string   `json:"secret_access_key,omitempty"`
	Region          string   `json:"region,omitempty"`
	Profile         string   `json:"profile,omitempty"`
	SessionToken    string   `json:"session_token,omitempty"`
	VPCID           string   `json:"vpc_id,omitempty"`
	PrivateSubnets  []string `json:"private_subnets,omitempty"`
	PublicSubnets   []string `json:"public_subnets,omitempty"`
}

AWSCredentials represents AWS credentials and configuration

func (*AWSCredentials) IsEmpty

func (c *AWSCredentials) IsEmpty() bool

IsEmpty returns true if the credentials are empty or incomplete

func (*AWSCredentials) ToEnvVarsForShell

func (c *AWSCredentials) ToEnvVarsForShell(shell string) string

ToEnvVarsForShell converts AWS credentials to shell-specific environment variable export statements

func (*AWSCredentials) ToMap

func (c *AWSCredentials) ToMap() map[string]interface{}

ToMap converts AWS credentials to a map for JSON serialization

func (*AWSCredentials) ToTerraform

func (c *AWSCredentials) ToTerraform() string

ToTerraform converts AWS credentials to Terraform provider configuration

type Extractor

type Extractor struct {
	// contains filtered or unexported fields
}

Extractor extracts cloud provider credentials from cluster configuration

func NewExtractor

func NewExtractor(cfg v2.Config) *Extractor

NewExtractor creates a new credentials extractor

func (*Extractor) ExtractAWS

func (e *Extractor) ExtractAWS() (*AWSCredentials, error)

ExtractAWS extracts AWS credentials from the cluster configuration

func (*Extractor) ExtractOpenStack

func (e *Extractor) ExtractOpenStack() (*OpenStackCredentials, error)

ExtractOpenStack extracts OpenStack credentials from the cluster configuration

type OpenStackCredentials

type OpenStackCredentials struct {
	AuthURL                     string `json:"auth_url,omitempty"`
	Region                      string `json:"region,omitempty"`
	ApplicationCredentialID     string `json:"application_credential_id,omitempty"`
	ApplicationCredentialSecret string `json:"application_credential_secret,omitempty"`
	Domain                      string `json:"domain,omitempty"`
	TenantName                  string `json:"tenant_name,omitempty"`
	FloatingNetworkID           string `json:"floating_network_id,omitempty"`
	SubnetID                    string `json:"subnet_id,omitempty"`
	Insecure                    bool   `json:"insecure,omitempty"`

	// Legacy username/password authentication (if available)
	Username          string `json:"username,omitempty"`
	Password          string `json:"password,omitempty"`
	ProjectName       string `json:"project_name,omitempty"`
	UserDomainName    string `json:"user_domain_name,omitempty"`
	ProjectDomainName string `json:"project_domain_name,omitempty"`
}

OpenStackCredentials represents OpenStack credentials and configuration

func (*OpenStackCredentials) IsEmpty

func (c *OpenStackCredentials) IsEmpty() bool

IsEmpty returns true if the credentials are empty or incomplete

func (*OpenStackCredentials) ToCloudsYAML

func (c *OpenStackCredentials) ToCloudsYAML() string

ToCloudsYAML converts OpenStack credentials to clouds.yaml format

func (*OpenStackCredentials) ToEnvMap

func (c *OpenStackCredentials) ToEnvMap() map[string]string

ToEnvMap converts OpenStack credentials to process environment variables.

func (*OpenStackCredentials) ToEnvVarsForShell

func (c *OpenStackCredentials) ToEnvVarsForShell(shell string) string

ToEnvVarsForShell converts OpenStack credentials to shell-specific environment variable export statements

func (*OpenStackCredentials) ToMap

func (c *OpenStackCredentials) ToMap() map[string]interface{}

ToMap converts OpenStack credentials to a map for JSON serialization

func (*OpenStackCredentials) ToTerraform

func (c *OpenStackCredentials) ToTerraform() string

ToTerraform converts OpenStack credentials to Terraform provider configuration

Jump to

Keyboard shortcuts

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