Commit Graph

59 Commits

Author SHA1 Message Date
Rohit Jnagal
ebc11e11ad Merge pull request #9782 from andronat/9578_TestCreateCleanWithPrefix
TestCreateCleanWithPrefix was failing if env variables existed
2015-07-10 10:04:20 -07:00
Kris Rousey
ffa764d60b Unify command line namespace resolution
This change allows the namespace in kubeconfig to be overridden by
specifying the namespace in the spec file. If namespace is explicitly
provided in the command line flags and the spec file has a different
namespace, this will cause an error.
2015-07-01 12:59:17 -07:00
Anastasis Andronidis
530369cc01 TestCreateCleanWithPrefix was failing if env variables existed 2015-06-29 23:14:36 +02:00
Mike Danese
0da17683f0 log a message when we fall back to service account 2015-06-19 17:52:38 -07:00
Mike Danese
c93a7d644c make clientcmd use inClusterConfig only if no other configs are available 2015-06-19 12:41:10 -07:00
krousey
49a6b629f8 Merge pull request #9171 from jdef/parse_prefix_from_server
parse apiserver prefix from client config host spec
2015-06-08 10:17:41 -07:00
James DeFelice
4b8995f009 parse apiserver prefix from client config host spec, with unit test 2015-06-04 20:20:19 +00:00
Daniel Smith
67f53d2eff Make kubectl work inside a container in k8s 2015-06-03 12:48:07 -07:00
Dawn Chen
b31505bfba Merge pull request #8646 from andronat/failed_test_TestCreateMissingContext
Test fails when arbitrary kubernetes master is set
2015-05-22 14:56:53 -07:00
Anastasis Andronidis
66a758b85d Test fails when env variables are set 2015-05-22 01:12:55 +02:00
Jeff Lowdermilk
4ef79733b6 Remove pkg/api dependency from pkg/client/clientcmd/api 2015-05-21 11:47:50 -07:00
Tim Hockin
70c94fad6d Don't rename api imports in conversions 2015-05-19 11:21:21 -07:00
Jeff Lowdermilk
db09ceae25 Remove dependency on pkg/api from pkg/client/clientcmd/api 2015-05-15 19:03:34 -07:00
deads2k
bd66e9011d expose FlagInfo binding methods 2015-05-12 13:33:11 -04:00
deads2k
19784dbc4f remove auth-path from kubeconfig 2015-05-11 10:40:23 -04:00
deads2k
6498fc1fda remove cmd respect for auth-path 2015-05-08 16:33:33 -04:00
Eric Paris
6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Jeff Lowdermilk
fa6ce7b7bf Add a --raw flag to kubectl config view
Defaults to false, unless --flatten is specified. Default behavior
(--raw=false) is that byte data (Client{Certificate,Key}data,
CertificateAuthorityData) is redacted for a more human-readable view.
Useful for manually inspecting files that have embeded data.
2015-04-23 09:19:45 -07:00
Jeff Lowdermilk
97e4549170 Merge pull request #6680 from deads2k/deads-change-kubeconfig-chain
change kubeconfig loading chain
2015-04-16 13:57:31 -07:00
fabianofranz
f71aa6ad38 Create complete parent dir structure when saving config to file 2015-04-16 14:17:54 -03:00
deads2k
de4be5422c change kubeconfig loading order 2015-04-16 13:05:09 -04:00
deads2k
bac5cbbe82 add flattening and minifying options to config view 2015-04-14 10:23:10 -04:00
deads2k
e7baa94404 allow selective removal of kubeconfig override flags 2015-04-13 13:14:23 -04:00
deads2k
b2e3f2185e make kubectl config behave more expectedly 2015-04-09 15:43:57 -04:00
Clayton Coleman
9b5b27a12e Return a typed error for config validation, and make errors simple
Will allow clients to determine when the configuration is bad.
2015-04-02 01:40:00 -04:00
Clayton Coleman
6918a4d32e Replace automatic YAML decoding with opt-in YAML decoding
Base codecs no longer automically handle YAML.  Instead, clients
must convert to JSON first via yaml.ToJSON and runtime.YAMLDecoder.
2015-03-20 00:03:56 -04:00
deads2k
8555ed3ede allow any number of kubeconfig files 2015-03-17 08:49:34 -04:00
Jeff Lowdermilk
7db006ab1a Generate standalone kubeconfig on kube-up, clear on kube-down.
Also tweaked the ginkgo tests to pull auth directly from a kubeconfig file
instead of the legacy kubernetes_auth file.
2015-03-10 14:23:34 -07:00
Jeff Lowdermilk
a280e0da2d Revert "Standalone kubeconfig for gce kube-up" 2015-03-09 17:45:06 -07:00
Jeff Lowdermilk
4173d369aa Generate standalone kubeconfig on kube-up, clear on kube-down.
Also tweaked the ginkgo tests to pull auth directly from a kubeconfig file
instead of the legacy kubernetes_auth file.
2015-03-09 16:02:00 -07:00
Jeff Lowdermilk
6e704d174d Simplify generating kubeconfig with embeded cert data 2015-03-03 12:18:07 -08:00
deads2k
03dde0fc46 tolerate empty .kubeconfig files 2015-02-20 08:27:08 -05:00
Jeff Lowdermilk
703b642886 Merge pull request #4517 from liggitt/kubeconfig_cert_data
Let .kubeconfig be a single-source config for API clients
2015-02-19 10:22:58 -08:00
Jordan Liggitt
abb38cf793 Let .kubeconfig populate ca/cert/key data, and basic-auth username/password in client configs 2015-02-19 11:29:42 -05:00
Jordan Liggitt
945616a6f9 Surface load errors when reading .kubeconfig files 2015-02-18 23:34:51 -05:00
deads2k
fef503932f properly handle mergo map versus value rules 2015-02-13 08:29:00 -05:00
Victor Marmol
0a64fecaf5 Minor clarification of --server flag.
Fixes #3425.
2015-02-11 17:04:41 -08:00
deads2k
bc93de314a remove --ns-path option from .kubeconfig file, kick tests 2015-02-03 14:22:55 -05:00
Clayton Coleman
2d5c6b4443 Allow commands to specify a short namespace
OpenShift currently uses '-n', so opening up the potential for downstream
to set a short namespace.  However, this should only be used in general for
commands that want to work across namespaces frequently - such as admin
level operations on entire namespaces like quota or cleanup behavior where
you have permissions and need to rapidly switch.
2015-01-30 17:47:40 -05:00
deads2k
aba73493de resolve relative paths in kubeconfig 2015-01-30 14:01:24 -05:00
Tim Hockin
7dd0400065 Merge pull request #3470 from deads2k/deads-add-kubecfg-ns
respect namespace from .kubeconfig file
2015-01-21 12:58:06 -08:00
Brian Grant
54ad81759a Merge pull request #3677 from filbranden/flag_shorthand_refactor1
Flag shorthand refactor1
2015-01-21 10:41:26 -08:00
Filipe Brandenburger
0bfeeb84ca Make short flags optional, refactor code to use StringVarP directly.
There is no need to check for an empty string and call StringVar or
StringVarP depending on the case, since StringVar is essentially the
same as a call to StringVarP with an empty string.

This turns 6 lines of code back into 1.

Remove the TODO comments since removing the short flags will no longer
simplify this code significantly.
2015-01-21 07:58:02 -08:00
Filipe Brandenburger
af76d14e2e Revert "fixup repeated usage strings"
This reverts commit 469bd2b641.
2015-01-21 07:56:24 -08:00
Jordan Liggitt
f71521d758 Allow overriding global default cluster host 2015-01-21 10:38:58 -05:00
deads2k
469bd2b641 fixup repeated usage strings 2015-01-21 08:12:24 -05:00
deads2k
8c01729f38 make shorthand flags optional 2015-01-20 16:21:27 -05:00
deads2k
dd01137138 add namespace to kubeconfig file 2015-01-20 16:07:54 -05:00
Andrew Seidl
6dee1d7fa4 Fix typos in user-facing strings 2015-01-18 01:32:34 -06:00
deads2k
b51a717f6e add kubectl config 2015-01-13 16:19:57 -05:00