namespace

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressRange

type AddressRange struct {
	SubnetMask      string `json:"subnet_mask,omitempty"`
	StartingAddress string `json:"starting_address"`
	Gateway         string `json:"gateway"`
	AddressCount    int    `json:"address_count,omitempty"`
}

type Cidr

type Cidr struct {
	Address string `json:"address"`
	Prefix  int    `json:"prefix"`
}

type ClusterSummary

type ClusterSummary struct {
	ID               string `json:"cluster"`
	Name             string `json:"cluster_name"`
	KubernetesStatus string `json:"kubernetes_status"`
	ConfigStatus     string `json:"config_status"`
}

ClusterSummary for a cluster with vSphere Namespaces enabled.

func (*ClusterSummary) Reference

Reference implements the mo.Reference interface

type DefaultImageRegistry

type DefaultImageRegistry struct {
	Hostname string `json:"hostname"`
	Port     int    `json:"port,omitempty"`
}

type DistributedSwitchCompatibilitySummary

type DistributedSwitchCompatibilitySummary struct {
	Compatible        bool   `json:"compatible"`
	DistributedSwitch string `json:"distributed_switch"`
}

type EdgeClusterCompatibilitySummary

type EdgeClusterCompatibilitySummary struct {
	Compatible  bool   `json:"compatible"`
	EdgeCluster string `json:"edge_cluster"`
	DisplayName string `json:"display_name"`
}

type EnableClusterSpec

type EnableClusterSpec struct {
	MasterDNSSearchDomains                 []string                 `json:"master_DNS_search_domains,omitempty"`
	ImageStorage                           ImageStorage             `json:"image_storage"`
	NcpClusterNetworkSpec                  *NcpClusterNetworkSpec   `json:"ncp_cluster_network_spec"`
	MasterManagementNetwork                *MasterManagementNetwork `json:"master_management_network"`
	MasterDNSNames                         []string                 `json:"Master_DNS_names,omitempty"`
	MasterNTPServers                       []string                 `json:"master_NTP_servers,omitempty"`
	EphemeralStoragePolicy                 string                   `json:"ephemeral_storage_policy,omitempty"`
	DefaultImageRepository                 string                   `json:"default_image_repository,omitempty"`
	ServiceCidr                            *Cidr                    `json:"service_cidr"`
	LoginBanner                            string                   `json:"login_banner,omitempty"`
	SizeHint                               string                   `json:"size_hint"`
	WorkerDNS                              []string                 `json:"worker_DNS,omitempty"`
	DefaultImageRegistry                   *DefaultImageRegistry    `json:"default_image_registry,omitempty"`
	MasterDNS                              []string                 `json:"master_DNS,omitempty"`
	NetworkProvider                        string                   `json:"network_provider"`
	MasterStoragePolicy                    string                   `json:"master_storage_policy,omitempty"`
	DefaultKubernetesServiceContentLibrary string                   `json:"default_kubernetes_service_content_library,omitempty"`
}

type ImageStorage

type ImageStorage struct {
	StoragePolicy string `json:"storage_policy"`
}

type Manager

type Manager struct {
	*rest.Client
}

Manager extends rest.Client, adding namespace related methods.

func NewManager

func NewManager(client *rest.Client) *Manager

NewManager creates a new Manager instance with the given client.

func (*Manager) CreateSupportBundle

func (c *Manager) CreateSupportBundle(ctx context.Context, id string) (*SupportBundleLocation, error)

CreateSupportBundle retrieves the cluster's Namespaces-related support bundle.

func (*Manager) DisableCluster

func (c *Manager) DisableCluster(ctx context.Context, id string) error

EnableCluster enables vSphere Namespaces on the specified cluster, using the given spec.

func (*Manager) EnableCluster

func (c *Manager) EnableCluster(ctx context.Context, id string, spec *EnableClusterSpec) error

EnableCluster enables vSphere Namespaces on the specified cluster, using the given spec.

func (*Manager) ListClusters

func (c *Manager) ListClusters(ctx context.Context) ([]ClusterSummary, error)

ListClusters returns a summary of all clusters with vSphere Namespaces enabled.

func (*Manager) ListCompatibleDistributedSwitches

func (c *Manager) ListCompatibleDistributedSwitches(ctx context.Context, clusterId string) (result []DistributedSwitchCompatibilitySummary, err error)

func (*Manager) ListCompatibleEdgeClusters

func (c *Manager) ListCompatibleEdgeClusters(ctx context.Context, clusterId string, switchId string) (result []EdgeClusterCompatibilitySummary, err error)

func (*Manager) SupportBundleRequest

func (c *Manager) SupportBundleRequest(ctx context.Context, bundle *SupportBundleLocation) (*http.Request, error)

SupportBundleRequest returns an http.Request which can be used to download the given support bundle.

type MasterManagementNetwork

type MasterManagementNetwork struct {
	Mode         string        `json:"mode"`
	FloatingIP   string        `json:"floating_IP,omitempty"`
	AddressRange *AddressRange `json:"address_range,omitempty"`
	Network      string        `json:"network"`
}

type NcpClusterNetworkSpec

type NcpClusterNetworkSpec struct {
	NsxEdgeCluster           string `json:"nsx_edge_cluster,omitempty"`
	PodCidrs                 []Cidr `json:"pod_cidrs"`
	EgressCidrs              []Cidr `json:"egress_cidrs"`
	ClusterDistributedSwitch string `json:"cluster_distributed_switch,omitempty"`
	IngressCidrs             []Cidr `json:"ingress_cidrs"`
}

type SupportBundleLocation

type SupportBundleLocation struct {
	Token SupportBundleToken `json:"wcp_support_bundle_token"`
	URL   string             `json:"url"`
}

SupportBundleLocation contains the URL to download the per-cluster support bundle from, as well as a token required.

type SupportBundleToken

type SupportBundleToken struct {
	Expiry string `json:"expiry"`
	Token  string `json:"token"`
}

SupportBundleToken information about the token required in the HTTP GET request to generate the support bundle.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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