Documentation ¶
Index ¶
- Constants
- func New(ctx resource.Context, s *Settings) (env resource.Environment, err error)
- type ClientFactoryFunc
- type Environment
- func (e *Environment) AllClusters() cluster.Clusters
- func (e *Environment) Clusters() cluster.Clusters
- func (e *Environment) ClustersByNetwork() map[string][]cluster.Cluster
- func (e *Environment) EnvironmentName() string
- func (e *Environment) ID() resource.ID
- func (e *Environment) IsMultiCluster() bool
- func (e *Environment) IsMultiNetwork() bool
- func (e *Environment) Settings() *Settings
- type FakeEnvironment
- type Settings
Constants ¶
const ( ArchAMD64 = "amd64" ArchARM64 = "arm64" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientFactoryFunc ¶
ClientFactoryFunc is a transformation function that creates k8s clients from the provided k8s config files.
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
Environment is the implementation of a kubernetes environment. It implements environment.Environment, and also hosts publicly accessible methods that are specific to cluster environment.
func (*Environment) AllClusters ¶
func (e *Environment) AllClusters() cluster.Clusters
func (*Environment) Clusters ¶
func (e *Environment) Clusters() cluster.Clusters
func (*Environment) ClustersByNetwork ¶
func (e *Environment) ClustersByNetwork() map[string][]cluster.Cluster
ClustersByNetwork returns an inverse mapping of the network topolgoy to a slice of clusters in a given network.
func (*Environment) EnvironmentName ¶
func (e *Environment) EnvironmentName() string
func (*Environment) IsMultiCluster ¶
func (e *Environment) IsMultiCluster() bool
func (*Environment) IsMultiNetwork ¶
func (e *Environment) IsMultiNetwork() bool
IsMultinetwork returns true if there is more than one network name in networkTopology.
func (*Environment) Settings ¶
func (e *Environment) Settings() *Settings
type FakeEnvironment ¶
FakeEnvironment for testing.
func (FakeEnvironment) AllClusters ¶
func (f FakeEnvironment) AllClusters() cluster.Clusters
func (FakeEnvironment) Clusters ¶
func (f FakeEnvironment) Clusters() cluster.Clusters
func (FakeEnvironment) EnvironmentName ¶
func (f FakeEnvironment) EnvironmentName() string
func (FakeEnvironment) ID ¶
func (f FakeEnvironment) ID() resource.ID
func (FakeEnvironment) IsMultiCluster ¶
func (f FakeEnvironment) IsMultiCluster() bool
func (FakeEnvironment) IsMultiNetwork ¶
func (f FakeEnvironment) IsMultiNetwork() bool
type Settings ¶
type Settings struct { // An array of paths to kube config files. Required if the environment is kubernetes. KubeConfig []string // Indicates that the LoadBalancer services can obtain a public IP. If not, NodePort be used as a workaround // for ingress gateway. KinD will not support LoadBalancer out of the box and requires a workaround such as // MetalLB. LoadBalancerSupported bool // Architecture indicates the architecture of the cluster under test Architecture string // MCSControllerEnabled indicates that the Kubernetes environment has a Multi-Cluster Services (MCS) // controller up and running. MCSControllerEnabled bool // MCSAPIGroup the group to use for the MCS API MCSAPIGroup string // MCSAPIVersion the version to use for the MCS API MCSAPIVersion string // contains filtered or unexported fields }
Settings provide kube-specific Settings from flags.
func NewSettingsFromCommandLine ¶
NewSettingsFromCommandLine returns Settings obtained from command-line flags. config.Parse must be called before calling this function.
func (*Settings) MCSAPIGroupVersion ¶
func (s *Settings) MCSAPIGroupVersion() schema.GroupVersion
func (*Settings) ServiceExportGVR ¶
func (s *Settings) ServiceExportGVR() schema.GroupVersionResource
func (*Settings) ServiceImportGVR ¶
func (s *Settings) ServiceImportGVR() schema.GroupVersionResource