package util
import "k8s.io/kubernetes/federation/pkg/kubefed/util"
Index ¶
- Constants
- func AddSubcommandFlags(cmd *cobra.Command)
- func CreateKubeconfigSecret(clientset *client.Clientset, kubeconfig *clientcmdapi.Config, namespace, name string, dryRun bool) (*api.Secret, error)
- type AdminConfig
- type SubcommandFlags
Constants ¶
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" )
Functions ¶
func AddSubcommandFlags ¶
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 // HostFactory provides a mechanism to communicate with the // cluster where federation control plane is hosted. HostFactory(host, kubeconfigPath string) cmdutil.Factory }
AdminConfig provides a filesystem based kubeconfig (via `PathOptions()`) and a mechanism to talk to the federation host cluster.
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.
Source Files ¶
util.go
- Version
- v1.5.2-beta.0
- Published
- Dec 14, 2016
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 12 minutes ago –
Tools for package owners.