Commit Graph

87 Commits

Author SHA1 Message Date
Tom Haddon
ed98daeae9 Fix trivial typo in error messages - 'does not exist' vs. 'does not exists' 2021-03-19 05:56:27 +01:00
Mridul Seth
3c719874c6 fix typo in test file 2021-02-01 19:13:29 +01:00
Mridul Seth
76d8fbda28 fix codestyle 2021-01-25 13:43:26 +01:00
Mridul Seth
8a3bdb8ebe take care of empty kube_config files 2021-01-23 19:23:45 +01:00
Dylan Shepard
0559445cb4
unused io import, pre-setting pycodestyle 2020-09-09 07:28:51 -07:00
Dylan Shepard
9f4775f43f
trying to fix pycodestyle problems 2020-09-09 07:22:04 -07:00
Dylan Shepard
49cbb1de99
replace inside the parens 2020-09-09 07:07:13 -07:00
Dylan Shepard
bfa968140c
supporting 2.7, reading works fine, writing reqs unicode 2020-09-09 07:03:45 -07:00
Dylan Shepard
f85a41fa31
renaming functions and setting to internal 2020-08-31 12:01:11 -07:00
Dylan Shepard
aac4e35ca9
correcting tests 2020-08-19 12:49:33 -07:00
Dylan Shepard
f65f06b1ed
commiting changes to branch 2020-08-19 12:36:32 -07:00
Kubernetes Prow Robot
54d188f89e
Merge pull request #205 from greed42/plugin-certificates
Accept client certificates from an authn/authz plugin
2020-07-29 19:42:31 -07:00
Kubernetes Prow Robot
ab61ca3c27
Merge pull request #201 from Akasurde/kube_config_no_obj_fix
FileOrData: Handle None object
2020-07-29 09:39:47 -07:00
Graham Reed
b85aff2b3e Accept client certificates from an authn/authz plugin
(Plugin interface reference: https://kubernetes.io/docs/reference/access-authn-authz/authentication/#input-and-output-formats)

When handling the response from the authn/authz plugin, `token` will be used if provided, which maintains current behaviour. Newly added is handling `clientCertificateData`: if it is present, that certificate (and its key) will be used as provided by the plugin. (And any certificate/key pair provided via the `users` section of the configuration file will be ignored.)
2020-07-23 10:31:30 +01:00
Haowei Cai
a7c78291bf add old api_key to set auth attributes 2020-07-16 00:38:24 -07:00
Abhijeet Kasurde
a270ea2946 FileOrData: Handle None object
Return when object is None in FileOrData class

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-07-02 23:04:48 +05:30
Kubernetes Prow Robot
3ea80032c3
Merge pull request #198 from ACXLM/fix/load-kube-config
fix cfg is none, load kube config error
2020-06-25 10:10:38 -07:00
ACXLM
30d9e2af1c change test case 2020-06-25 20:53:29 +08:00
Haowei Cai
982de11392 generated by scripts/update-pycodestyle.sh in main repo 2020-06-22 16:08:20 -07:00
vishnu667
91812350e4 updated docstring for load_kube_config_from_dict 2020-06-20 00:50:39 +05:30
ACXLM
3ff79da50c fix cfg is none, load kube config error
Signed-off-by: zhu hui <hui.zhu@daocloud.io>
2020-06-02 13:55:43 +08:00
vishnu667
52a3bdc159 removing load from dict presist from the added test cases. 2020-05-22 00:57:46 +05:30
vishnu667
6c327377e8 test case fix __get_kube_config_loader_dict_no_persist 2020-05-22 00:05:15 +05:30
vishnu667
c6e8194127 Adding config to init file and indentation fixes 2020-05-15 22:14:22 +05:30
vishnu667
e92495f0d1 Adding test Cases 2020-05-15 20:37:36 +05:30
vishnu667
27a1b811d4 Re-using the _get_kube_config_loader in _get_kube_config_loader_for_yaml_file 2020-05-14 16:13:47 +05:30
vishnu667
ab515103d8 Adding ability to pass kube_config as a dict. 2020-05-14 07:44:54 +05:30
Shihang Zhang
0b1ac80470 allow incluster to accept pass-in config 2020-05-13 14:57:27 -07:00
Shihang Zhang
3cfc41ea9e set expiration on token of incluster config and reload if expires 2020-04-22 09:35:37 -07:00
Kubernetes Prow Robot
d30f1e6fd4
Merge pull request #184 from fooka03/bugfix/179
Fix apiserver_id 'get' method
2020-02-21 15:38:47 -08:00
Nigel Foucha
faf2e0c2db
Fix apiserver_id 'get' method 2020-02-20 19:20:44 -05:00
Fabrice Rabaute
64662bb738
config: Fix persist_config flag and function calls
The persist_config flag was setting the kwargs['config_persister'] to
the result of the function kcfg.save_changes and not the function
kcfg.save_changes itself.

Once this is fixed, the second problem was that the function was called
with an argument when it's defined without argument so an exception was
raised.
2020-01-14 14:23:16 -08:00
Fabrice Rabaute
39113de2aa
Add option to refresh gcp token when config is cmd-path 2020-01-08 11:28:23 -08:00
Nigel Foucha
0b208334ef
Dynamically load apiserver id from kube config 2019-10-09 11:37:40 -04:00
Kubernetes Prow Robot
9f73cc68c1
Merge pull request #163 from goddenrich/kube-configs-with-no-contexts-clusters-users
Merging configs with missing fields
2019-09-24 14:55:57 -07:00
Kubernetes Prow Robot
c700068ed6
Merge pull request #161 from ganchurin/issue-954
Support false values in configuration file
2019-09-24 14:49:58 -07:00
Richard Godden
7ce0198af2 default empty dict 2019-09-23 17:57:50 +01:00
Richard Godden
4ea69211e3 added test that should fail 2019-09-23 17:43:20 +01:00
Evgeniy Ganchurin
6dec044758 Issue-954 - Support false values in configuration file 2019-09-21 03:04:17 +03:00
Quentin Lemaire
a29bf292cc Add checks for None config file 2019-09-19 09:34:21 +02:00
Oz N Tiram
c941d74b37 Remove all shebangs from Python modules and checker
As discussed, Python modules which aren't intended to be invoked
as scripts should not include a shebang line.

Update CONTRIBUTING.md and the checker script.
This script now includes a list SKIP_FILES for files that
should not be checked for boilerplate template.
The tests will now fail if a Python module has a shebang line.
Scripts which should have a shebang line and exists in the directory
`hack` can be ignored by adding them to the SKIP_FILES list.
2019-08-27 22:18:52 +02:00
Richard Godden
ca007f3672 parse microseconds 2019-08-01 21:49:32 +01:00
Roger Hoem-Martinsen
6edea7b245 shorten down long line 2019-07-03 09:29:31 +02:00
Roger Hoem-Martinsen
26e16d0c70 Add azure config tests 2019-07-03 09:14:38 +02:00
Roger Hoem-Martinsen
30bc425271 fix bug and add method azure is expired 2019-07-03 09:14:03 +02:00
Haowei Cai (Roy)
487c9182c8
Merge pull request #79 from bpicolo/fix_base64_padding_for_kconfig
Fix base64 padding for kube config
2019-06-19 15:46:02 -07:00
Kubernetes Prow Robot
1d5231cee6
Merge pull request #110 from axelsteingrimsson/add_email_scope_to_gcp_credentials_refresh
Add email scope to GCP provided credential refresh
2019-04-08 13:26:27 -07:00
Ben Picolo
72a02cca50 Merge remote-tracking branch 'upstream/master' into fix_base64_padding_for_kconfig 2019-03-30 09:35:41 -04:00
Ben Picolo
b3ddbd903a Add tests for updated pieces 2019-03-30 09:23:03 -04:00
Kubernetes Prow Robot
5c03b3b237
Merge pull request #94 from tomplus/feat/merge-kubeconfigs
feat: merging kubeconfig files
2019-03-18 10:22:31 -07:00