infra

package
v0.0.0-...-96a9b75 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Infras = infras{
	{
		Name:          "basic cluster",
		ResourceGroup: rg,
		Location:      location,
		Suffix:        uuid.New().String(),
	},
	{
		Name:          "private cluster",
		ResourceGroup: rg,
		Location:      location,
		Suffix:        uuid.New().String(),
		McOpts:        []clients.McOpt{clients.PrivateClusterOpt},
	},
}

Infras is a list of infrastructure configurations the e2e tests will run against

View Source
var PrivateClusterOpt = McOpt{
	Name: "private cluster",
	// contains filtered or unexported fields
}

PrivateClusterOpt specifies that the cluster should be private

Functions

This section is empty.

Types

type Identifier

type Identifier interface {
	GetId() string
}

type LoadableProvisioned

type LoadableProvisioned struct {
	Name                                                                      string
	Cluster                                                                   azure.Resource
	ClusterLocation, ClusterDnsServiceIp, ClusterPrincipalId, ClusterClientId string
	ClusterOptions                                                            map[string]struct{}
	ResourceGroup                                                             arm.ResourceID // rg id is a little weird and can't be correctly parsed by azure.Resource so we have to use arm.ResourceID
	SubscriptionId                                                            string
	TenantId                                                                  string
	Zones                                                                     []LoadableZone
	PrivateZones                                                              []azure.Resource
	Ipv4ServiceName                                                           string
	Ipv6ServiceName                                                           string
}

LoadableProvisioned is a struct that can be used to load a Provisioned struct from a file. Ensure that all fields are exported so that they can properly be serialized/deserialized.

func ToLoadable

func ToLoadable(p []Provisioned) ([]LoadableProvisioned, error)

Returns LoadableProvisioned struct to be saved to infrastructure .json file

func (LoadableProvisioned) Provisioned

func (l LoadableProvisioned) Provisioned() (Provisioned, error)

Used to load Provisioned struct from infra-config.json or other specified infrastructure .json file

type LoadableZone

type LoadableZone struct {
	ResourceId  azure.Resource
	Nameservers []string
}

type McOpt

type McOpt struct {
	Name string
	// contains filtered or unexported fields
}

McOpt specifies what kind of managed cluster to create

type Provisioned

type Provisioned struct {
	Name            string
	Cluster         cluster
	ResourceGroup   resourceGroup
	SubscriptionId  string
	TenantId        string
	Zones           []zone
	PrivateZones    []privateZone
	Ipv4ServiceName string
	Ipv6ServiceName string
}

Provisioned is a struct that contains all the resources provisioned in by the infra command (provision.go) Configuration is saved in this struct when reading from infrastructure configuration .json file

func ToProvisioned

func ToProvisioned(l []LoadableProvisioned) ([]Provisioned, error)

Loads Provisioned struct from infrastructure .json file

func (Provisioned) Loadable

func (p Provisioned) Loadable() (LoadableProvisioned, error)

Used to save provisioned infrastructure to .json file, used by ToLoadable() and called from the infra command

Jump to

Keyboard shortcuts

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