k8s

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAWSAccount

func GetAWSAccount(
	ctx context.Context,
	cli client.Client,
	namespace,
	accountCRName string,
) (*awsv1alpha1.Account, error)

Get AWS Account CR

func GetAWSAccountClaim

func GetAWSAccountClaim(
	ctx context.Context,
	cli client.Client,
	namespace,
	accountClaimName string,
) (*awsv1alpha1.AccountClaim, error)

Get AWS Account Claim CR

func GetAWSAccountCredentials

func GetAWSAccountCredentials(
	ctx context.Context,
	cli client.Client,
	namespace,
	secretName string,
) (*awsprovider.AwsClientInput, error)

Get the IAM Credentials created with AWS Account CR

func GetAccountClaimFromClusterID

func GetAccountClaimFromClusterID(
	ctx context.Context,
	cli client.Client,
	clusterID string,
) (*awsv1alpha1.AccountClaim, error)

GetAccountClaimFromClusterID returns an account based on the cluster ID

func NewAWSSecret

func NewAWSSecret(name, namespace, accessKeyID, secretAccessKey string) string

func NewClient

func NewClient(flags *genericclioptions.ConfigFlags) (client.Client, error)

NewClient creates a Kubernetes client with provided cli flags

Types

type ClusterResourceFactoryOptions

type ClusterResourceFactoryOptions struct {
	AccountName      string
	AccountID        string
	AccountNamespace string
	ClusterID        string
	SupportRoleARN   string

	Awscloudfactory awsprovider.FactoryOptions

	Flags   *genericclioptions.ConfigFlags
	KubeCli client.Client
}

ClusterResourceFactoryOptions defines the struct for running list account command

func (*ClusterResourceFactoryOptions) AttachCobraCliFlags

func (factory *ClusterResourceFactoryOptions) AttachCobraCliFlags(cmd *cobra.Command)

AttachCobraCliFlags adds cobra cli flags to cobra command

func (*ClusterResourceFactoryOptions) GetCloudProvider

func (factory *ClusterResourceFactoryOptions) GetCloudProvider(verbose bool) (awsprovider.Client, error)

GetCloudProvider placeholder

func (*ClusterResourceFactoryOptions) ValidateIdentifiers

func (factory *ClusterResourceFactoryOptions) ValidateIdentifiers() (bool, error)

ValidateIdentifiers checks for presence and validity of account identifiers

Jump to

Keyboard shortcuts

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