util

package
v1.6.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KubeconfigSecretDataKey is the key name used in the secret to
	// stores a cluster's credentials.
	KubeconfigSecretDataKey = "kubeconfig"

	// DefaultFederationSystemNamespace is the namespace in which
	// federation system components are hosted.
	DefaultFederationSystemNamespace = "federation-system"
)

Variables

This section is empty.

Functions

func AddSubcommandFlags

func AddSubcommandFlags(cmd *cobra.Command)

AddSubcommandFlags adds the definition for `kubefed` subcommand flags.

func CreateKubeconfigSecret

func CreateKubeconfigSecret(clientset *client.Clientset, kubeconfig *clientcmdapi.Config, namespace, name string, dryRun bool) (*api.Secret, error)

Types

type AdminConfig

type AdminConfig interface {
	// PathOptions provides filesystem based kubeconfig access.
	PathOptions() *clientcmd.PathOptions
	// FedClientSet provides a federation API compliant clientset
	// to communicate with the federation control plane api server
	FederationClientset(context, kubeconfigPath string) (*fedclient.Clientset, error)
	// HostFactory provides a mechanism to communicate with the
	// cluster where federation control plane is hosted.
	HostFactory(hostcontext, kubeconfigPath string) cmdutil.Factory
}

AdminConfig provides a filesystem based kubeconfig (via `PathOptions()`) and a mechanism to talk to the federation host cluster and the federation control plane api server.

func NewAdminConfig

func NewAdminConfig(pathOptions *clientcmd.PathOptions) AdminConfig

NewAdminConfig creates an admin config for `kubefed` commands.

type SubcommandFlags

type SubcommandFlags struct {
	Name                      string
	Host                      string
	FederationSystemNamespace string
	Kubeconfig                string
}

SubcommandFlags holds the flags required by the subcommands of `kubefed`.

func GetSubcommandFlags

func GetSubcommandFlags(cmd *cobra.Command, args []string) (*SubcommandFlags, error)

GetSubcommandFlags retrieves the command line flag values for the `kubefed` subcommands.

Jump to

Keyboard shortcuts

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