infrastructure

package
v0.33.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScopeGarden = "garden"
	ScopeShoot  = "shoot"
	// ScopeAuthorizedShoots is the tag name used to annotate a NSX-T object with allowed shoot-names
	ScopeAuthorizedShoots = "authorized-shoots"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NSXTConfig

type NSXTConfig struct {
	// NSX-T username.
	User string `json:"user,omitempty"`
	// NSX-T password in clear text.
	Password string `json:"password,omitempty"`
	// NSX-T host.
	Host string `json:"host,omitempty"`
	// InsecureFlag is to be set to true if NSX-T uses self-signed cert.
	InsecureFlag bool `json:"insecure-flag,omitempty"`
	// RemoteAuth is to be set to true if NSX-T uses remote authentication (authentication done through the vIDM).
	RemoteAuth bool `json:"remote-auth,omitempty"`

	VMCAccessToken     string `json:"vmcAccessToken,omitempty"`
	VMCAuthHost        string `json:"vmcAuthHost,omitempty"`
	ClientAuthCertFile string `json:"client-auth-cert-file,omitempty"`
	ClientAuthKeyFile  string `json:"client-auth-key-file,omitempty"`
	CAFile             string `json:"ca-file,omitempty"`
}

NSXTConfig contains the NSX-T specific configuration

type NSXTInfraSpec

type NSXTInfraSpec struct {
	EdgeClusterName   string           `json:"edgeClusterName"`
	TransportZoneName string           `json:"transportZoneName"`
	Tier0GatewayName  string           `json:"tier0GatewayName"`
	SNATIPPoolName    string           `json:"snatIPPoolName"`
	GardenID          string           `json:"gardenID"`
	GardenName        string           `json:"gardenName"`
	ClusterName       string           `json:"clusterName"`
	WorkersNetwork    string           `json:"workersNetwork"`
	DNSServers        []string         `json:"dnsServers"`
	DHCPOptions       map[int][]string `json:"dhcpOptions,omitempty"`

	ExternalTier1GatewayPath *string `json:"externalTier1GatewayPath,omitempty"`
}

func (NSXTInfraSpec) CreateCommonTags

func (s NSXTInfraSpec) CreateCommonTags() []common.Tag

func (NSXTInfraSpec) CreateTags

func (s NSXTInfraSpec) CreateTags() []model.Tag

func (NSXTInfraSpec) FullClusterName

func (s NSXTInfraSpec) FullClusterName() string

type NSXTInfrastructureEnsurer

type NSXTInfrastructureEnsurer interface {
	// CheckConnection checks if the NSX-T REST API is reachable with the given endpoint and credentials.
	CheckConnection() error
	// NewStateWithVersion creates empty state with version depending on NSX-T backend or overwritten version
	NewStateWithVersion(overwriteVersion *string) (*api.NSXTInfraState, error)
	// EnsureInfrastructure ensures that the infrastructure is complete
	// It checks all infrastructure objects and creates missing one or updates them if important attributes have been changed.
	// It can even recover objects not recorded in the state.
	EnsureInfrastructure(spec NSXTInfraSpec, state *api.NSXTInfraState) error
	// EnsureInfrastructureDeleted ensures that all infrastructure objects are deleted
	// It even trys to recover objects not recorded in the state before deleting them.
	EnsureInfrastructureDeleted(spec *NSXTInfraSpec, state *api.NSXTInfraState) error
	// GetIPPoolTags retrieves the tags of an IP pool
	GetIPPoolTags(ipPoolName string) (map[string]string, error)
	// CheckShootAuthorizationByTags checks if shoot namespace is allowed in the tags
	CheckShootAuthorizationByTags(objectType, name string, tags map[string]string) error
}

NSXTInfrastructureEnsurer ensures that infrastructure is completed created or deleted

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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