clustermesh

package
v0.15.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableWithHelm added in v0.14.1

func DisableWithHelm(ctx context.Context, k8sClient *k8s.Client, params Parameters) error

func EnableWithHelm added in v0.14.1

func EnableWithHelm(ctx context.Context, k8sClient *k8s.Client, params Parameters) error

Types

type ClusterStats

type ClusterStats struct {
	Configured int `json:"configured,omitempty"`
	Connected  int `json:"connected,omitempty"`
}

type ConnectivityStatus

type ConnectivityStatus struct {
	GlobalServices StatisticalStatus        `json:"global_services,omitempty"`
	Connected      StatisticalStatus        `json:"connected,omitempty"`
	Clusters       map[string]*ClusterStats `json:"clusters,omitempty"`
	Total          int64                    `json:"total,omitempty"`
	NotReady       int64                    `json:"not_ready,omitempty"`
	Errors         status.ErrorCountMapMap  `json:"errors,omitempty"`
}

type K8sClusterMesh

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

func NewK8sClusterMesh

func NewK8sClusterMesh(client k8sClusterMeshImplementation, p Parameters) *K8sClusterMesh

func (*K8sClusterMesh) Connect

func (k *K8sClusterMesh) Connect(ctx context.Context) error

func (*K8sClusterMesh) ConnectWithHelm added in v0.14.7

func (k *K8sClusterMesh) ConnectWithHelm(ctx context.Context) error

ConnectWithHelm enables clustermesh using a Helm Upgrade action. Certificates are generated via the Helm chart's cronJob (certgen) mode. As with classic mode, only autodetected IP-based clustermesh-apiserver Service endpoints are currently supported.

func (*K8sClusterMesh) CreateExternalWorkload

func (k *K8sClusterMesh) CreateExternalWorkload(ctx context.Context, names []string) error

func (*K8sClusterMesh) DeleteExternalWorkload

func (k *K8sClusterMesh) DeleteExternalWorkload(ctx context.Context, names []string) error

func (*K8sClusterMesh) Disable

func (k *K8sClusterMesh) Disable(ctx context.Context) error

func (*K8sClusterMesh) Disconnect

func (k *K8sClusterMesh) Disconnect(ctx context.Context) error

func (*K8sClusterMesh) DisconnectWithHelm added in v0.14.8

func (k *K8sClusterMesh) DisconnectWithHelm(ctx context.Context) error

func (*K8sClusterMesh) Enable

func (k *K8sClusterMesh) Enable(ctx context.Context) error

func (*K8sClusterMesh) ExternalWorkloadStatus

func (k *K8sClusterMesh) ExternalWorkloadStatus(ctx context.Context, names []string) error

func (*K8sClusterMesh) GetClusterConfig

func (k *K8sClusterMesh) GetClusterConfig(ctx context.Context) error

func (*K8sClusterMesh) Log

func (k *K8sClusterMesh) Log(format string, a ...interface{})

func (*K8sClusterMesh) Status

func (k *K8sClusterMesh) Status(ctx context.Context) (*Status, error)

func (*K8sClusterMesh) WriteExternalWorkloadInstallScript

func (k *K8sClusterMesh) WriteExternalWorkloadInstallScript(ctx context.Context, writer io.Writer) error

type Parameters

type Parameters struct {
	Namespace            string
	ServiceType          string
	ServiceAnnotations   map[string]string
	DestinationContext   string
	Wait                 bool
	WaitDuration         time.Duration
	DestinationEndpoints []string
	SourceEndpoints      []string
	ApiserverImage       string
	ApiserverVersion     string
	CreateCA             bool
	Writer               io.Writer
	Labels               map[string]string
	IPv4AllocCIDR        string
	IPv6AllocCIDR        string
	All                  bool
	ConfigOverwrites     []string
	Retries              int
	HelmValuesSecretName string
	Output               string

	// EnableExternalWorkloads indicates whether externalWorkloads.enabled Helm value
	// should be set to true. For Helm mode only.
	EnableExternalWorkloads bool

	// EnableKVStoreMesh indicates whether kvstoremesh should be enabled.
	// For Helm mode only.
	EnableKVStoreMesh bool
}

type StatisticalStatus

type StatisticalStatus struct {
	Min int64   `json:"min,omitempty"`
	Avg float64 `json:"avg,omitempty"`
	Max int64   `json:"max,omitempty"`
}

type Status

type Status struct {
	AccessInformation *accessInformation  `json:"access_information,omitempty"`
	Connectivity      *ConnectivityStatus `json:"connectivity,omitempty"`
}

Jump to

Keyboard shortcuts

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