config

package
v0.0.0-...-83aa6d9 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RegionIDTag is region id
	RegionIDTag = "region-id"
	// InstanceIDTag is instance id
	InstanceIDTag = "instance-id"
)

Variables

This section is empty.

Functions

func GetDefaultAK

func GetDefaultAK() (string, string, string)

GetDefaultAK read default ak from local file or from STS

func GetLocalAK

func GetLocalAK() (string, string)

func GetSTSAK

func GetSTSAK() (string, string, string)

GetSTSAK get STS AK and token from ecs meta server

func GlobalConfigSet

func GlobalConfigSet(nodeID, masterURL, kubeconfig string)

GlobalConfigSet set Global Config

Types

type GlobalConfig

type GlobalConfig struct {
	//EcsClient  *ecs.Client
	//Region     string
	NodeInfo   *v1.Node
	KubeClient *kubernetes.Clientset
}

GlobalConfig save global values for plugin

var (
	GlobalConfigVar GlobalConfig
)

type RoleAuth

type RoleAuth struct {
	AccessKeyID     string
	AccessKeySecret string
	Expiration      time.Time
	SecurityToken   string
	LastUpdated     time.Time
	Code            string
}

RoleAuth define STS Token Response

Jump to

Keyboard shortcuts

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