config

package
v0.0.0-...-49c81f2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const KUBE_CA_FILE_PATH string = KUBE_CA_PATH + "kubecafile"
View Source
const KUBE_CA_PATH string = "/tmp/spikectl/"

TODO: not sure if this should liv here

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentPools

type AgentPools struct {
	Name     string `json:"name"`
	VmsSize  string `json:"vms_size"`
	MaxPods  int    `json:"max_pods"`
	MinCount int    `json:"min_count"`
	Count    int    `json:"count"`
	MaxCount int    `json:"max_count"`
}

type Aks

type Aks struct {
	ClusterName     string          `json:"cluster_name"`
	AgentPools      []AgentPools    `json:"agent_pools"`
	ServiceProvider ServiceProvider `json:"service_provider"`
}

type AwsConfig

type AwsConfig struct {
	Profile string    `json:"profile"`
	Region  string    `json:"region"`
	VPC     VPCConfig `json:"vpc"`
	EKS     EKSConfig `json:"eks"`
}

type AzureConfig

type AzureConfig struct {
	SubscriptionId       string               `json:"subscription_id"`
	ResourceGroupConfig  ResourceGroupConfig  `json:"resource_group"`
	VirtualNetworkConfig VirtualNetworkConfig `json:"virtual_network"`
	Aks                  Aks                  `json:"aks"`
}

type CloudProvider

type CloudProvider uint8
const (
	AWS CloudProvider = iota + 1
	AZURE
	GCP
)

func ParseCloudProvider

func ParseCloudProvider(s string) (CloudProvider, error)

func (*CloudProvider) MarshalJSON

func (c *CloudProvider) MarshalJSON() ([]byte, error)

func (*CloudProvider) String

func (c *CloudProvider) String() string

func (*CloudProvider) UnmarshalJSON

func (c *CloudProvider) UnmarshalJSON(data []byte) (err error)

type CoreComponent

type CoreComponent struct {
	ReleaseName  string `json:"release_name"`
	Chart        string `json:"chart"`
	Namespace    string `json:"namespace"`
	Repository   string `json:"repository"`
	ChartVersion string `json:"chart_version"`
	ImageName    string `json:"image_name,omitempty"`
	ImageVersion string `json:"image_version,omitempty"`
}

type EKSConfig

type EKSConfig struct {
	Name      string          `json:"name"`
	NodeGroup NodeGroupConfig `json:"node_group"`
}

type GKEConfig

type GKEConfig struct {
	Name             string `json:"name"`
	Version          string `json:"version"`
	InitialNodeCount int64  `json:"initial_node_count"`
}

type GcpConfig

type GcpConfig struct {
	ProjectId string    `json:"project_id"`
	Zone      string    `json:"zone"`
	GKE       GKEConfig `json:"gke"`
	VPC       VPCConfig `json:"vpc"`
}

type InternetGatewayConfig

type InternetGatewayConfig struct {
	Name string `json:"name"`
}

type KubeConfig

type KubeConfig struct {
	EndPoint string `json:"endpoint"`
	CaFile   string `json:"ca_file"`
	Token    string `json:"token"`
}

type NatGatewayConfig

type NatGatewayConfig struct {
	Name string `json:"name"`
}

type NodeGroupConfig

type NodeGroupConfig struct {
	Name         string        `json:"name"`
	InstanceType []string      `json:"instance_type"`
	Scaling      ScalingConfig `json:"scaling"`
}

type ResourceGroupConfig

type ResourceGroupConfig struct {
	Location string `json:"location"`
	Name     string `json:"name"`
}

type RouteTableConfig

type RouteTableConfig struct {
	Name string `json:"name"`
}

type ScalingConfig

type ScalingConfig struct {
	MaxSize     int64 `json:"max_size"`
	MinSize     int64 `json:"min_size"`
	DesiredSize int64 `json:"desired_size"`
}

type ServiceProvider

type ServiceProvider struct {
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

type Spike

type Spike struct {
	Spike SpikeConfig `json:"spike"`
}

type SpikeConfig

type SpikeConfig struct {
	CloudProvider  CloudProvider   `json:"cloud_provider"`
	AzureConfig    AzureConfig     `json:"azure"`
	AwsConfig      AwsConfig       `json:"aws"`
	GcpConfig      GcpConfig       `json:"gcp"`
	CoreComponents []CoreComponent `json:"core"`
}

type SubnetConfig

type SubnetConfig struct {
	PublicSubnetName           string `json:"public_subnet_name"`
	PublicSubnetCidr           string `json:"public_subnet_cidr"`
	PublicSubnetAz             string `json:"public_subnet_az"`
	PrimaryPrivateSubnetName   string `json:"primary_private_subnet_name"`
	PrimaryPrivateSubnetCidr   string `json:"primary_private_subnet_cidr"`
	PrimaryPrivateSubnetAz     string `json:"primary_private_subnet_az"`
	SecondaryPrivateSubnetName string `json:"secondary_private_subnet_name"`
	SecondaryPrivateSubnetCidr string `json:"secondary_private_subnet_cidr"`
	SecondaryPrivateSubnetAz   string `json:"secondary_private_subnet_az"`
}

type Subnets

type Subnets struct {
	Name          string `json:"name"`
	AddressPrefix string `json:"address_prefix"`
}

type VPCConfig

type VPCConfig struct {
	Name             string                `json:"name"`
	CIDR             string                `json:"cidr"`
	Subnets          SubnetConfig          `json:"subnets"`
	InternetGateway  InternetGatewayConfig `json:"internet_gateway"`
	NatGateway       NatGatewayConfig      `json:"nat_gateway"`
	PublicRouteTable RouteTableConfig      `json:"public_route_table"`
}

type VirtualNetworkConfig

type VirtualNetworkConfig struct {
	Name            string    `json:"name"`
	AddressPrefixes []string  `json:"address_prefixes"`
	Subnets         []Subnets `json:"subnets"`
}

Jump to

Keyboard shortcuts

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