package util
import "k8s.io/kubernetes/federation/pkg/kubefed/util"
Index ¶
- Constants
- func CreateKubeconfigSecret(clientset client.Interface, kubeconfig *clientcmdapi.Config, namespace, name string, dryRun bool) (*api.Secret, error)
- func GetClientsetFromSecret(secret *api.Secret, serverAddress string) (*client.Clientset, error)
- func GetServerAddress(c *federationapi.Cluster) (string, error)
- type AdminConfig
- type SubcommandOptions
Constants ¶
const ( // KubeconfigSecretDataKey is the key name used in the secret to // stores a cluster's credentials. KubeconfigSecretDataKey = "kubeconfig" // Used in and to create the kube-dns configmap storing the zone info FedDomainMapKey = "federations" KubeDnsConfigmapName = "kube-dns" // DefaultFederationSystemNamespace is the namespace in which // federation system components are hosted. DefaultFederationSystemNamespace = "federation-system" KubeAPIQPS = 20.0 KubeAPIBurst = 30 )
Functions ¶
func CreateKubeconfigSecret ¶
func CreateKubeconfigSecret(clientset client.Interface, kubeconfig *clientcmdapi.Config, namespace, name string, dryRun bool) (*api.Secret, error)
func GetClientsetFromSecret ¶
func GetServerAddress ¶
func GetServerAddress(c *federationapi.Cluster) (string, 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) // ClusterFactory provides a mechanism to communicate with the // cluster derived from the context and the kubeconfig. ClusterFactory(context, 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 SubcommandOptions ¶
type SubcommandOptions struct { Name string Host string FederationSystemNamespace string Kubeconfig string }
SubcommandOptions holds the configuration required by the subcommands of `kubefed`.
func (*SubcommandOptions) Bind ¶
func (o *SubcommandOptions) Bind(flags *pflag.FlagSet)
func (*SubcommandOptions) SetName ¶
func (o *SubcommandOptions) SetName(cmd *cobra.Command, args []string) error
Source Files ¶
util.go
- Version
- v1.6.0-beta.2
- Published
- Mar 8, 2017
- Platform
- linux/amd64
- Imports
- 15 packages
- Last checked
- 18 minutes ago –
Tools for package owners.