Fix exec example to use new configuration model
This commit is contained in:
parent
bc2aac4897
commit
77a504e294
@ -1,13 +1,15 @@
|
||||
import time
|
||||
|
||||
from kubernetes import config
|
||||
from kubernetes.client import configuration
|
||||
from kubernetes.client import Configuration
|
||||
from kubernetes.client.apis import core_v1_api
|
||||
from kubernetes.client.rest import ApiException
|
||||
from kubernetes.stream import stream
|
||||
|
||||
config.load_kube_config()
|
||||
configuration.assert_hostname = False
|
||||
c = Configuration()
|
||||
c.assert_hostname = False
|
||||
Configuration.set_default(c)
|
||||
api = core_v1_api.CoreV1Api()
|
||||
name = 'busybox-test'
|
||||
|
||||
|
||||
2
setup.py
2
setup.py
@ -46,7 +46,7 @@ setup(
|
||||
tests_require=TESTS_REQUIRES,
|
||||
packages=['kubernetes', 'kubernetes.client', 'kubernetes.config',
|
||||
'kubernetes.watch', 'kubernetes.client.apis',
|
||||
'kubernetes.client.models', 'kubernetes.stream'],
|
||||
'kubernetes.stream', 'kubernetes.client.models'],
|
||||
include_package_data=True,
|
||||
long_description="""\
|
||||
Python client for kubernetes http://kubernetes.io/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user