cmd

package
v3.8.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func BindClientConfigSecurityFlags

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

BindClientConfigSecurityFlags adds flags for the supplied client config

func DefaultClientConfig

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

Types

type Config

type Config struct {
	// MasterAddr is the address the master can be reached on (host, host:port, or URL).
	MasterAddr flagtypes.Addr
	// KubernetesAddr is the address of the Kubernetes server (host, host:port, or URL).
	// If omitted defaults to the master.
	KubernetesAddr flagtypes.Addr
	// CommonConfig is the shared base config for both the OpenShift config and Kubernetes config
	CommonConfig restclient.Config
	// Namespace is the namespace to act in
	Namespace string

	// If set, allow kubeconfig file loading
	FromFile bool
	// If true, no environment is loaded (for testing, primarily)
	SkipEnv bool
	// contains filtered or unexported fields
}

Config contains all the necessary bits for client configuration

func NewConfig

func NewConfig() *Config

NewConfig returns a new configuration

func (*Config) Bind

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

Bind binds configuration values to the passed flagset

func (*Config) BindToFile

func (cfg *Config) BindToFile() *Config

BindToFile is used when this config will not be bound to flags, but should load the config file from disk if available.

func (*Config) Clients

func (cfg *Config) Clients() (kclientset.Interface, error)

Clients returns an OpenShift and a Kubernetes client from a given configuration

func (*Config) KubeConfig

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

KubeConfig returns the Kubernetes configuration

func (*Config) OpenShiftConfig

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

OpenShiftConfig returns the OpenShift configuration

Jump to

Keyboard shortcuts

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