cmd

package
v0.0.0-...-a765f26 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KeyPath string
View Source
var PrivateIP bool
View Source
var PublicIP bool
View Source
var RootCmd = &cobra.Command{
	Use:   "yawsi",
	Short: "Yet Another AWS Command Line Interface",
}
View Source
var ShowCommand bool

Functions

func AddRecordsToCloudflare

func AddRecordsToCloudflare(cfClient *cloudflare.API, zoneName string, recordSet *route53.ListResourceRecordSetsOutput) []*cloudflare.DNSRecordResponse

func DescribeEKSCluster

func DescribeEKSCluster(clusterName *string) *eks.DescribeClusterOutput

func Execute

func Execute()

Execute is called by main.main(). It only needs to happen once to the rootCmd.

func GetIAMRoleArnToAssume

func GetIAMRoleArnToAssume(projectName string, environmentName string) *string

func GetKubeConfigData

func GetKubeConfigData() ([]byte, error)

func GetR53Zone

func GetR53Zone(zoneId string)

func GetRoute53ZoneID

func GetRoute53ZoneID(zoneName string) (string, error)

func GetUserHomeDir

func GetUserHomeDir() string

func KubeConfigPath

func KubeConfigPath() (string, error)

func ListEKSClusters

func ListEKSClusters(details bool) *eks.ListClustersOutput

func ListR53Zones

func ListR53Zones()

func SetKubeConfigCurrentContext

func SetKubeConfigCurrentContext(contextName string) error

func WriteKubeConfig

func WriteKubeConfig(kd kubeConfigData) error

func WriteKubeConfigToFile

func WriteKubeConfigToFile(clusterData *eks.DescribeClusterOutput, projectName string, environment string) error

Write kubeconfig to file

Types

type ClusterConfig

type ClusterConfig struct {
	Cluster map[string]string `yaml:"cluster"`
	Name    string            `yaml:"name"`
}

type ClusterContext

type ClusterContext struct {
	Context map[string]string `yaml:"context"`
	Name    string            `yaml:"name"`
}

func GetKubeConfigContexts

func GetKubeConfigContexts() []ClusterContext

type ClusterUser

type ClusterUser struct {
	Name string                            `yaml:"name"`
	User map[string]ClusterUserExecDetails `yaml:"user"`
}

type ClusterUserExecDetails

type ClusterUserExecDetails struct {
	ApiVersion string   `yaml:"apiVersion"`
	Command    string   `yaml:"command"`
	Args       []string `yaml:"args"`
}

type KubeConfigType

type KubeConfigType struct {
	APIVersion     string           `yaml:"apiVersion"`
	CurrentContext string           `yaml:"current-context"`
	Clusters       []ClusterConfig  `yaml:"clusters"`
	Contexts       []ClusterContext `yaml:"contexts"`
	Kind           string           `yaml:"kind"`
	Users          []ClusterUser    `yaml:"users"`
}

type RouteContainer

type RouteContainer struct {
	Main         bool
	RouteTableId string
	Routes       []*ec2.Route
}

RouteContainer represents a set of routes and whether it is associated to the VPC main route table or not

type SecurityGroupRule

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

Embdes ec2.IpPermission and adds an additional field to mark whether this is an inbound or outbound security group rule

Jump to

Keyboard shortcuts

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