restconfig

package
v0.14.0-m2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureTestFramework

func ConfigureTestFramework(args []string) error

func ForBroker

func ForBroker(submariner *v1alpha1.Submariner, serviceDisc *v1alpha1.ServiceDiscovery) (*rest.Config, string, error)

Types

type PerContextFn added in v0.14.0

type PerContextFn func(clusterInfo *cluster.Info, namespace string, status reporter.Interface) error

type Producer

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

func NewProducer

func NewProducer() *Producer

NewProducer initialises a blank producer which needs to be set up with flags (see SetupFlags).

func NewProducerFrom

func NewProducerFrom(kubeConfig, kubeContext string) *Producer

NewProducerFrom initialises a producer using the given kubeconfig file and context. The context may be empty, in which case the default context will be used.

func (*Producer) AddInClusterConfigFlag

func (rcp *Producer) AddInClusterConfigFlag(cmd *cobra.Command)

AddInClusterConfigFlag adds a flag enabling in-cluster configurations for processes running in pods.

func (*Producer) AddKubeConfigFlag

func (rcp *Producer) AddKubeConfigFlag(cmd *cobra.Command)

func (*Producer) AddKubeContextMultiFlag

func (rcp *Producer) AddKubeContextMultiFlag(cmd *cobra.Command, usage string)

AddKubeContextMultiFlag adds a "kubeconfig" flag and a "kubecontext" flag that can be specified multiple times (or comma separated).

func (*Producer) CheckVersionMismatch

func (rcp *Producer) CheckVersionMismatch(cmd *cobra.Command, args []string) error

func (*Producer) CountRequestedClusters

func (rcp *Producer) CountRequestedClusters() int

func (*Producer) ForCluster

func (rcp *Producer) ForCluster() (RestConfig, error)

func (*Producer) MustGetForClusters

func (rcp *Producer) MustGetForClusters() []RestConfig

func (*Producer) PopulateTestFramework

func (rcp *Producer) PopulateTestFramework()

func (*Producer) RunOnSelectedContext added in v0.14.0

func (rcp *Producer) RunOnSelectedContext(function PerContextFn, status reporter.Interface) error

RunOnSelectedContext runs the given function on the selected context.

func (*Producer) SetupFlags added in v0.14.0

func (rcp *Producer) SetupFlags(flags *pflag.FlagSet)

SetupFlags configures the given flags to control the producer settings.

func (*Producer) WithDefaultNamespace added in v0.14.0

func (rcp *Producer) WithDefaultNamespace(defaultNamespace string) *Producer

WithDefaultNamespace configures the producer to set up a namespace flag, with the given default value. The chosen namespace will be passed to the PerContextFn used to process the context.

func (*Producer) WithNamespace added in v0.14.0

func (rcp *Producer) WithNamespace() *Producer

WithNamespace configures the producer to set up a namespace flag. The chosen namespace will be passed to the PerContextFn used to process the context.

type RestConfig

type RestConfig struct {
	Config      *rest.Config
	ClusterName string
}

Jump to

Keyboard shortcuts

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