Compare commits

...

59 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
888d7df5ff
Merge pull request #1527 from roycaihw/v18-ga
Some checks failed
End to End Tests - release-18.0 / build (3.6) (push) Has been cancelled
End to End Tests - release-18.0 / build (3.7) (push) Has been cancelled
End to End Tests - release-18.0 / build (3.8) (push) Has been cancelled
End to End Tests - release-18.0 / build (3.9) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.6) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.7) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.8) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.9) (push) Has been cancelled
Release 18.20.0
2021-08-16 14:04:22 -07:00
Haowei Cai
5231791f0c update changelog and readme 2021-08-16 13:53:54 -07:00
Haowei Cai
9e3641da11 apply hotfixes 2021-08-16 13:52:19 -07:00
Haowei Cai
286bd61dc3 generated client change for v18 GA release 2021-08-16 13:44:53 -07:00
Haowei Cai
4a5b39d085 update version constants for v18 GA release 2021-08-16 13:34:42 -07:00
Kubernetes Prow Robot
6850340ec6
Merge pull request #1519 from roycaihw/release18
Pull master into release-18.0
2021-08-05 17:14:54 -07:00
Haowei Cai
8bd7651ec4 update release notes 2021-08-05 16:58:19 -07:00
Haowei Cai
1b80892d6c Merge branch 'master' of github.com:kubernetes-client/python into release18 2021-08-05 16:39:33 -07:00
Haowei Cai
7d89f0254e update submodule 2021-08-05 16:39:18 -07:00
Kubernetes Prow Robot
0b146c35ed
Merge pull request #1496 from roycaihw/release-18b1
Release v18.20.0b1
2021-06-21 09:14:50 -07:00
Haowei Cai
a7f122ece4 update readme and changelog 2021-06-20 19:26:06 -07:00
Haowei Cai
1d5d40556f generated client change for v18.20.0b1 release 2021-06-20 19:16:03 -07:00
Haowei Cai
698a4689f2 update version constants for v18.20.0b1 release 2021-06-20 19:05:05 -07:00
Haowei Cai
d8fd974e63 Merge branch 'master' of github.com:kubernetes-client/python into release-18b1 2021-06-20 19:00:22 -07:00
Kubernetes Prow Robot
fa64fd9ce4
Merge pull request #1425 from roycaihw/fix-release-notes
Fix release notes for v18.17.0a1 and v17.14.0a1 in release-18.0 branch
2021-04-22 15:47:27 -07:00
Nabarun Pal
f152ecf5ea Update CHANGELOG with v17.14.0a1
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2021-04-22 15:14:16 -07:00
Haowei Cai
f4a5dd0aab fix release notes for v18.17.0a1 2021-04-22 14:45:09 -07:00
Kubernetes Prow Robot
f0ff60f290
Merge pull request #1411 from roycaihw/release-18.0
Release v18.17.0a1
2021-04-12 16:30:49 -07:00
Haowei Cai
2d9dbdf133 update changelog and readme 2021-04-12 13:54:14 -07:00
Haowei Cai
adc68b77ba add a test for default configuration behavior 2021-04-12 13:54:14 -07:00
Fabian von Feilitzsch
5b68936c23 Add test to ensure kubernetes client threadpool is cleaned up 2021-04-12 13:54:14 -07:00
Nabarun Pal
8b526497c5 Add kubernetes.client.apis as an alias to kubernetes.client.api
Reference: https://github.com/kubernetes-client/python/issues/974

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2021-04-12 13:54:14 -07:00
Nabarun Pal
61f1fbe49a Fix custom objects API to preserve backward compatibility
Reference:
- [#866](https://github.com/kubernetes-client/python/issues/866)
- [#959](https://github.com/kubernetes-client/python/pull/959)

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2021-04-12 13:54:14 -07:00
Haowei Cai
3b247f5d0f generated client change for v18.17.0a1 release
removed the generated test directory following the hot issue
(https://github.com/kubernetes-client/python/blob/master/devel/release.md#hot-issues):
  4. Remove the tests directory
2021-04-12 13:54:14 -07:00
Haowei Cai
e43ab1e4ad workaround for required LIBRARY env from gen repo
the env is not used by the python client.
2021-04-12 13:54:14 -07:00
Haowei Cai
91bb4910b2 update version constant for v18.17.0a1 release
kubernetes 1.18 is no longer maintained. 1.18.17 was the last patch release.
2021-04-11 16:03:07 -07:00
Abhijeet Kasurde
eb9db7762d examples/pod_exec.py: fix example
Use get_default_copy() API with configuration.
2021-04-11 16:02:05 -07:00
abhiabhi94
86cd342c63 Refactor utils
- move regex compilation to the top of the module to enable caching.
2021-04-11 16:01:49 -07:00
Soumitra Kumar
dadc47b282 Added kubernetes.leaderelection in packages list to fix No module named 'kubernetes.leaderelection' error
To reproduce: Make sure to create a file outside of checked out python repo directory.
$ cat hello_k8s.py
import kubernetes

kubernetes.config.load_kube_config()

k8s = kubernetes.client.CoreV1Api()
print("Listing pods with their IPs:")
ret = k8s.list_pod_for_all_namespaces(watch=False)
for i in ret.items:
    print("%s\t%s\t%s" % (i.status.pod_ip, i.metadata.namespace, i.metadata.name))

python hello_k8s.py
Traceback (most recent call last):
  File "hello_k8s.py", line 1, in <module>
    import kubernetes
  File "<frozen zipimport>", line 259, in load_module
  File "anaconda3/lib/python3.8/site-packages/kubernetes-17.0.0_snapshot-py3.8.egg/kubernetes/__init__.py", line 25, in <module>
ModuleNotFoundError: No module named 'kubernetes.leaderelection'
2021-04-11 16:01:36 -07:00
Invictus17
affaebb534 Adding symbolic link to base/leaderelection 2021-04-11 16:01:23 -07:00
Sumant
dcd449ace6 Enable leaderelection 2021-04-11 16:00:45 -07:00
Haowei Cai
c55c0ef663 configmap-e2e: use labels 2021-04-11 16:00:38 -07:00
Arumugam
73c7339621 Adding Power support(ppc64le) with ci and testing to the project for architecture independent 2021-04-11 16:00:27 -07:00
Patrick J. McNerthney
69986824ac Implement back end raw port test container using python. 2021-04-11 16:00:13 -07:00
Haowei Cai
b143e8c829 changelog for python-base update 2021-04-11 15:06:23 -07:00
Haowei Cai
b2b520a010 update python-base submodule 2021-04-11 14:57:42 -07:00
Kubernetes Prow Robot
7a0e799a02
Merge pull request #1319 from palnabarun/release-18.0
Release 18.0 Snapshot
2020-11-23 18:23:00 -08:00
Nabarun Pal
fae8590d61
Add a note about the change in client versioning schema
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-22 21:58:52 +05:30
Nabarun Pal
4ff8c05914
Add v17.14.0a1 to the compatibility matrix
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-22 21:58:52 +05:30
Nabarun Pal
a027b2a4bb
Refactor the format of compatibitility matrix
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-22 21:58:52 +05:30
Nabarun Pal
469bc9af88
Update CHANGELOG with v18.0.0-snapshot
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-22 21:58:52 +05:30
Haowei Cai
1c2be29248
add a test for default configuration behavior 2020-11-17 04:00:33 +05:30
Fabian von Feilitzsch
b4a3fc235e
Add test to ensure kubernetes client threadpool is cleaned up 2020-11-17 04:00:33 +05:30
Nabarun Pal
9f880d8396
Add kubernetes.client.apis as an alias to kubernetes.client.api
Reference: https://github.com/kubernetes-client/python/issues/974

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-17 04:00:33 +05:30
Nabarun Pal
e379ad2868
Fix custom objects API to preserve backward compatibility
Reference:
- [#866](https://github.com/kubernetes-client/python/issues/866)
- [#959](https://github.com/kubernetes-client/python/pull/959)

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-17 04:00:32 +05:30
Nabarun Pal
cd92c5d545
Generate client 18.0.0-snapshot
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-17 04:00:32 +05:30
Nabarun Pal
0fd73895d7
Update constants to reflect Client release 18.0.0-snapshot
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-17 04:00:32 +05:30
Nabarun Pal
161f1236dc
Update README
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-17 04:00:32 +05:30
Nabarun Pal
7a4ffcf819
Update CHANGELOG with v17.0.0-snapshot
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-17 04:00:32 +05:30
Haowei Cai
631386c894
add a test for default configuration behavior 2020-11-17 04:00:31 +05:30
Fabian von Feilitzsch
a3d90aa243
Add test to ensure kubernetes client threadpool is cleaned up 2020-11-17 04:00:31 +05:30
Nabarun Pal
4cfbfd4e17
Add kubernetes.client.apis as an alias to kubernetes.client.api
Reference: https://github.com/kubernetes-client/python/issues/974

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-17 04:00:31 +05:30
Nabarun Pal
7f1667e5a2
Fix custom objects API to preserve backward compatibility
Reference:
- [#866](https://github.com/kubernetes-client/python/issues/866)
- [#959](https://github.com/kubernetes-client/python/pull/959)

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-17 04:00:31 +05:30
Nabarun Pal
86f621a0f2
Remove generated tests
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-17 04:00:31 +05:30
Nabarun Pal
2132e24fd1
Generate client 17.0.0
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-17 04:00:30 +05:30
Nabarun Pal
329b27a859
Update constants to reflect Client release 17.0.0
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-17 04:00:30 +05:30
Nabarun Pal
c382d32f92
Update CHANGELOG and README to reflect v12.0.0 and v12.0.1
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-17 04:00:30 +05:30
Nabarun Pal
89ea5306ab
Update hot patch section of release documentation
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-11-17 04:00:29 +05:30
dependabot[bot]
ddf34709bc
Bump actions/setup-python from v2.1.3 to v2.1.4
Bumps [actions/setup-python](https://github.com/actions/setup-python) from v2.1.3 to v2.1.4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2.1.3...41b7212b1668f5de9d65e9c82aa777e6bbedb3a8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-17 04:00:29 +05:30
14 changed files with 137 additions and 14 deletions

View File

@ -83,6 +83,47 @@ jobs:
repo: kubernetes-client/python
distributions: sdist bdist_wheel
- stage: test
python: 2.7
env: TOXENV=update-pycodestyle
arch: ppc64le
- python: 3.7
env: TOXENV=docs
arch: ppc64le
- python: 2.7
env: TOXENV=coverage,codecov
arch: ppc64le
- python: 2.7
env: TOXENV=py27
arch: ppc64le
- python: 3.5
env: TOXENV=py35
arch: ppc64le
- python: 3.6
env: TOXENV=py36
arch: ppc64le
- python: 3.7
env: TOXENV=py37
arch: ppc64le
- python: 3.8
env: TOXENV=py38
- python: 3.9
env: TOXENV=py39
arch: ppc64le
- stage: deploy
script: skip
arch: ppc64le
deploy:
provider: pypi
user: __token__
password:
secure: gY5Rixj7mWHC9XP5qV5DfWGdX4ZVwCEUElnQA2OeIg235I3eMBqRFM4Q/SKwAG2DzgIWNKsXXVQsZHp7BAjWFMFVQloiU7zohuBRToJUim9U1RaqAjUIr4OU7JPtXenAl5zyyBdywvJiG8UZ4wmt1DBYtdpozQvOwDXvOxNTmElKh5mfDhiSsipmFr2198NtIhiRVC+CZliZsi6osUkt+G6yl9CW+SJU3otgzdaS+VBP26HO0kWHMJiDKvQoIl/Q50IqJUWieFhCLh7lSV71VNVEmM4bMcYK8cAv3zMZHo6REKHF7xrF5tzYMXqpmEGt6L798d2H4BISr6BIlYgiYCatjyE9hxih9iBzGs0XaGUUFD8u1iuzOQI76a5dapG/DixQrGD2o9Gn/Qw6Zp9USIuKZSWUn5hSobwxJUKVNy+afpaJNQUb2W9Hj+jMXAnBDodCzo3nu+QF8GN72cmk3uqVyKUVABtI4kNe3qcEx3DyKfoh7aqJrgydeaRwESKuZ41l5CA+vqXSbbNW8z1MYDYgVdwEyRFsLg6aQk5pPsxuiILaaGy13TUndhuC+GuKcW6wCDf6WpUAwwGAF8+sz4hZ1pfSUdE3F8nfDBW3Bv+G9cB/cKkWJ2vOd9httRrvir8qUc/xPP5aW4pacnfNCQ04Iep/k4PCAdYJDtVGhCY=
skip_existing: true
on:
tags: true
repo: kubernetes-client/python
distributions: sdist bdist_wheel
stages:
- name: verify-tag
if: (tag is present) and (type = push)

View File

@ -1,11 +1,15 @@
# v18.0.0-snapshot
# v18.20.0
Kubernetes API Version: To Be Updated
Kubernetes API Version: 1.18.20
### Feature
- Support for the dryRun parameter has been added to the dynamic client. ([kubernetes-client/python-base#247](https://github.com/kubernetes-client/python-base/pull/247), [@gravesm](https://github.com/gravesm))
- The `python2` support will be removed in 18.0.0 beta release. All the tests will use `python3` versions. ([kubernetes-client/python-base#238](https://github.com/kubernetes-client/python-base/pull/238), [@Priyankasaggu11929](https://github.com/Priyankasaggu11929))
- The dynamic client now supports customizing http "Accept" header through the `header_params` parameter, which can be used to customizing API server response, e.g. retrieving object metadata only. ([kubernetes-client/python-base#236](https://github.com/kubernetes-client/python-base/pull/236), [@Yashks1994](https://github.com/Yashks1994))
- Allow optional list of YAML objects as param to `create_from_yaml` util [kubernetes-client/python#1403](https://github.com/kubernetes-client/python/pull/1403)
**Bug Fix:**
- Fix empty yaml document in `create_from_yaml` [kubernetes-client/python#1506](https://github.com/kubernetes-client/python/pull/1506)
# v18.20.0b1

View File

@ -87,7 +87,7 @@ supported versions of Kubernetes clusters.
- [client 11.y.z](https://pypi.org/project/kubernetes/11.0.0/): Kubernetes 1.14 or below (+-), Kubernetes 1.15 (✓), Kubernetes 1.16 or above (+-)
- [client 12.y.z](https://pypi.org/project/kubernetes/12.0.1/): Kubernetes 1.15 or below (+-), Kubernetes 1.16 (✓), Kubernetes 1.17 or above (+-)
- [client 17.y.z](https://pypi.org/project/kubernetes/17.17.0/): Kubernetes 1.16 or below (+-), Kubernetes 1.17 (✓), Kubernetes 1.18 or above (+-)
- [client 18.y.z](https://pypi.org/project/kubernetes/18.20.0b1/): Kubernetes 1.17 or below (+-), Kubernetes 1.18 (✓), Kubernetes 1.19 or above (+-)
- [client 18.y.z](https://pypi.org/project/kubernetes/18.20.0/): Kubernetes 1.17 or below (+-), Kubernetes 1.18 (✓), Kubernetes 1.19 or above (+-)
> See [here](#homogenizing-the-kubernetes-python-client-versions) for an explaination of why there is no v13-v16 release.
@ -121,12 +121,13 @@ between client-python versions.
| 10.0 Alpha/Beta | Kubernetes main repo, 1.14 branch | ✗ |
| 10.0 | Kubernetes main repo, 1.14 branch | ✗ |
| 11.0 Alpha/Beta | Kubernetes main repo, 1.15 branch | ✗ |
| 11.0 | Kubernetes main repo, 1.15 branch | |
| 11.0 | Kubernetes main repo, 1.15 branch | |
| 12.0 Alpha/Beta | Kubernetes main repo, 1.16 branch | ✗ |
| 12.0 | Kubernetes main repo, 1.16 branch | ✓ |
| 17.0 Alpha/Beta | Kubernetes main repo, 1.17 branch | ✗ |
| 17.0 | Kubernetes main repo, 1.17 branch | ✓ |
| 18.0 Alpha/Beta | Kubernetes main repo, 1.18 branch | ✓ |
| 18.0 Alpha/Beta | Kubernetes main repo, 1.18 branch | ✗ |
| 18.0 | Kubernetes main repo, 1.18 branch | ✓ |
> See [here](#homogenizing-the-kubernetes-python-client-versions) for an explaination of why there is no v13-v16 release.

33
kubernetes/.gitlab-ci.yml Normal file
View File

@ -0,0 +1,33 @@
# ref: https://docs.gitlab.com/ee/ci/README.html
stages:
- test
.nosetest:
stage: test
script:
- pip install -r requirements.txt
- pip install -r test-requirements.txt
- pytest --cov=client
nosetest-2.7:
extends: .nosetest
image: python:2.7-alpine
nosetest-3.3:
extends: .nosetest
image: python:3.3-alpine
nosetest-3.4:
extends: .nosetest
image: python:3.4-alpine
nosetest-3.5:
extends: .nosetest
image: python:3.5-alpine
nosetest-3.6:
extends: .nosetest
image: python:3.6-alpine
nosetest-3.7:
extends: .nosetest
image: python:3.7-alpine
nosetest-3.8:
extends: .nosetest
image: python:3.8-alpine

View File

@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: release-1.18
- Package version: 18.0.0-snapshot
- Package version: 18.20.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
## Requirements.

View File

@ -14,7 +14,7 @@
__project__ = 'kubernetes'
# The version is auto-updated. Please do not edit.
__version__ = "18.0.0-snapshot"
__version__ = "18.20.0"
import kubernetes.client
import kubernetes.config

View File

@ -14,7 +14,7 @@
from __future__ import absolute_import
__version__ = "18.0.0-snapshot"
__version__ = "18.20.0"
# import apis into sdk package
from kubernetes.client.api.admissionregistration_api import AdmissionregistrationApi

View File

@ -78,7 +78,7 @@ class ApiClient(object):
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/18.0.0-snapshot/python'
self.user_agent = 'OpenAPI-Generator/18.20.0/python'
self.client_side_validation = configuration.client_side_validation
def __enter__(self):

View File

@ -347,7 +347,7 @@ class Configuration(object):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: release-1.18\n"\
"SDK Package Version: 18.0.0-snapshot".\
"SDK Package Version: 18.20.0".\
format(env=sys.platform, pyversion=sys.version)
def get_host_settings(self):

2
kubernetes/setup.cfg Normal file
View File

@ -0,0 +1,2 @@
[flake8]
max-line-length=99

View File

@ -0,0 +1,39 @@
# coding: utf-8
import unittest
from kubernetes.client import Configuration
class TestConfiguration(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
# reset Configuration
Configuration.set_default(None)
def testConfiguration(self):
# check that different instances use different dictionaries
c1 = Configuration()
c2 = Configuration()
self.assertNotEqual(id(c1.api_key), id(c2.api_key))
self.assertNotEqual(id(c1.api_key_prefix), id(c2.api_key_prefix))
def testDefaultConfiguration(self):
# prepare default configuration
c1 = Configuration(host="example.com")
c1.debug = True
Configuration.set_default(c1)
# get default configuration
c2 = Configuration.get_default_copy()
self.assertEqual(c2.host, "example.com")
self.assertTrue(c2.debug)
self.assertNotEqual(id(c1.api_key), id(c2.api_key))
self.assertNotEqual(id(c1.api_key_prefix), id(c2.api_key_prefix))
if __name__ == '__main__':
unittest.main()

View File

@ -18,13 +18,13 @@ import sys
KUBERNETES_BRANCH = "release-1.18"
# client version for packaging and releasing.
CLIENT_VERSION = "18.0.0-snapshot"
CLIENT_VERSION = "18.20.0"
# Name of the release package
PACKAGE_NAME = "kubernetes"
# Stage of development, mainly used in setup.py's classifiers.
DEVELOPMENT_STATUS = "3 - Alpha"
DEVELOPMENT_STATUS = "5 - Production/Stable"
# If called directly, return the constant value given

View File

@ -48,6 +48,9 @@ SETTING_FILE="${TEMP_FOLDER}/settings"
echo "export KUBERNETES_BRANCH=\"$(python ${SCRIPT_ROOT}/constants.py KUBERNETES_BRANCH)\"" > $SETTING_FILE
echo "export CLIENT_VERSION=\"$(python ${SCRIPT_ROOT}/constants.py CLIENT_VERSION)\"" >> $SETTING_FILE
echo "export PACKAGE_NAME=\"client\"" >> $SETTING_FILE
# Workaround for https://github.com/kubernetes-client/gen/pull/183.
# The env is required but not used by python client.
echo "export LIBRARY=\"undefined\"" >> $SETTING_FILE
if [[ -z ${GEN_ROOT:-} ]]; then
GEN_ROOT="${TEMP_FOLDER}/gen"

View File

@ -16,9 +16,9 @@ from setuptools import setup
# Do not edit these constants. They will be updated automatically
# by scripts/update-client.sh.
CLIENT_VERSION = "18.0.0-snapshot"
CLIENT_VERSION = "18.20.0"
PACKAGE_NAME = "kubernetes"
DEVELOPMENT_STATUS = "3 - Alpha"
DEVELOPMENT_STATUS = "5 - Production/Stable"
# To install the library, run the following
#