clientcmd

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2015 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigSyntax = " --master=<addr>"

Variables

This section is empty.

Functions

func BindClientConfigSecurityFlags

func BindClientConfigSecurityFlags(config *kclient.Config, flags *pflag.FlagSet)

BindClientConfig adds flags for the supplied client config

func DefaultClientConfig added in v0.3.2

func DefaultClientConfig(flags *pflag.FlagSet) clientcmd.ClientConfig

Copy of kubectl/cmd/DefaultClientConfig, using NewNonInteractiveDeferredLoadingClientConfig

func EnvVarsFromConfig

func EnvVarsFromConfig(config *kclient.Config) []api.EnvVar

Types

type Config

type Config struct {
	MasterAddr     flagtypes.Addr
	KubernetesAddr flagtypes.Addr
	// ClientConfig is the shared base config for both the openshift config and kubernetes config
	CommonConfig kclient.Config
}

func NewConfig

func NewConfig() *Config

func (*Config) Bind

func (cfg *Config) Bind(flags *pflag.FlagSet)

func (*Config) Clients

func (cfg *Config) Clients() (osclient.Interface, kclient.Interface, error)

func (*Config) KubeConfig

func (cfg *Config) KubeConfig() *kclient.Config

func (*Config) OpenShiftConfig

func (cfg *Config) OpenShiftConfig() *kclient.Config

type Factory added in v0.3.2

type Factory struct {
	*kubecmd.Factory
	OpenShiftClientConfig clientcmd.ClientConfig
}

Factory provides common options for OpenShift commands

func New added in v0.3.2

func New(flags *pflag.FlagSet) *Factory

NewFactory creates a default Factory for commands that should share identical server connection behavior. Most commands should use this method to get a factory.

func NewFactory added in v0.3.2

func NewFactory(clientConfig clientcmd.ClientConfig) *Factory

NewFactory creates an object that holds common methods across all OpenShift commands

func (*Factory) Clients added in v0.3.2

func (f *Factory) Clients(cmd *cobra.Command) (*client.Client, *kclient.Client, error)

Clients returns an OpenShift and Kubernetes client.

type ShortcutExpander added in v0.3.2

type ShortcutExpander struct {
	meta.RESTMapper
}

ShortcutExpander is a RESTMapper that can be used for OpenShift resources.

func (ShortcutExpander) VersionAndKindForResource added in v0.3.2

func (e ShortcutExpander) VersionAndKindForResource(resource string) (defaultVersion, kind string, err error)

VersionAndKindForResource implements meta.RESTMapper. It expands the resource first, then invokes the wrapped mapper.

Jump to

Keyboard shortcuts

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