package kubeconfig

import "github.com/oslokommune/okctl/pkg/kubeconfig"

Package kubeconfig creates a kubernetes KUBECONFIG that uses awm-iam-authenticator to receive an authorisation token and fetches the certificate and endpoint from EKS

Index

Functions

func Create

func Create(awsIAMAuthenticatorPath string, username string, cfg *v1alpha5.ClusterConfig) clientCmdApi.Config

Create returns an initialised kubeconfig

func GetUser

func GetUser(iamRoleARN string) string

GetUser returns the username part - This is stolen from eksctl

Types

type Config

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

Config contains the

func (*Config) Bytes

func (k *Config) Bytes() ([]byte, error)

Bytes returns the serialised kubeconfig

func (*Config) Config

func (k *Config) Config() clientCmdApi.Config

Config returns the plain config

func (*Config) Validate

func (k *Config) Validate() error

Validate a configuration

type Getter

type Getter interface {
	Get() (*Config, error)
}

Getter defines the kubeconf get interactions

func New

func New(awsIAMAuthenticatorPath string, clusterConfig *v1alpha5.ClusterConfig, provider v1alpha1.CloudProvider) Getter

New returns an initialised kubeconfig creator

Source Files

doc.go kubeconfig.go

Version
v0.0.106 (latest)
Published
Oct 21, 2022
Platform
linux/amd64
Imports
9 packages
Last checked
5 days ago

Tools for package owners.