Skip to content

Commit 4df2bf3

Browse files
authored
Merge pull request #2126 from yliaog/automated-release-of-28.1.0-upstream-release-28.0-1694967840
Automated release of 28.1.0 upstream release 28.0 1694967840
2 parents 292fb0a + 103e083 commit 4df2bf3

36 files changed

+74
-81
lines changed

.github/workflows/deploy-wiki.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
deploy-wiki:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
with:
1616
submodules: true
1717
- name: Install rsync

.github/workflows/e2e-master.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
python-version: [3.7, 3.8, 3.9]
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
with:
2020
submodules: true
2121
- name: Create Kind Cluster

.github/workflows/e2e-release-11.0.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
with:
2020
submodules: true
2121
- name: Create Kind Cluster

.github/workflows/e2e-release-12.0.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
with:
2020
submodules: true
2121
- name: Create Kind Cluster

.github/workflows/e2e-release-17.0.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
with:
2020
submodules: true
2121
- name: Create Kind Cluster

.github/workflows/e2e-release-18.0.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
python-version: [3.6, 3.7, 3.8, 3.9]
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
with:
2020
submodules: true
2121
- name: Create Kind Cluster

.github/workflows/e2e-release-26.0.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
python-version: [3.7, 3.8, 3.9]
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
with:
2020
submodules: true
2121
- name: Create Kind Cluster

.github/workflows/test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
use_coverage: 'coverage'
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
with:
1818
submodules: true
1919
- name: Set up Python ${{ matrix.python-version }}

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# v28.1.0
2+
3+
Kubernetes API Version: v1.28.2
4+
5+
### API Change
6+
- Fixed a bug where CEL expressions in CRD validation rules would incorrectly compute a high estimated cost for functions that return strings, lists or maps.
7+
The incorrect cost was evident when the result of a function was used in subsequent operations. ([kubernetes/kubernetes#119807](https://github.com/kubernetes/kubernetes/pull/119807), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery, Auth and Cloud Provider]
8+
- Mark Job onPodConditions as optional in pod failure policy ([kubernetes/kubernetes#120208](https://github.com/kubernetes/kubernetes/pull/120208), [@mimowo](https://github.com/mimowo)) [SIG API Machinery and Apps]
9+
10+
111
# v28.1.0b1
212

313
Kubernetes API Version: v1.28.1

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ supported versions of Kubernetes clusters.
9797
- [client 25.y.z](https://pypi.org/project/kubernetes/25.3.0/): Kubernetes 1.24 or below (+-), Kubernetes 1.25 (✓), Kubernetes 1.26 or above (+-)
9898
- [client 26.y.z](https://pypi.org/project/kubernetes/26.1.0/): Kubernetes 1.25 or below (+-), Kubernetes 1.26 (✓), Kubernetes 1.27 or above (+-)
9999
- [client 27.y.z](https://pypi.org/project/kubernetes/27.2.0/): Kubernetes 1.26 or below (+-), Kubernetes 1.27 (✓), Kubernetes 1.28 or above (+-)
100-
- [client 28.y.z](https://pypi.org/project/kubernetes/28.1.0b1/): Kubernetes 1.27 or below (+-), Kubernetes 1.28 (✓), Kubernetes 1.29 or above (+-)
100+
- [client 28.y.z](https://pypi.org/project/kubernetes/28.1.0/): Kubernetes 1.27 or below (+-), Kubernetes 1.28 (✓), Kubernetes 1.29 or above (+-)
101101

102102
> See [here](#homogenizing-the-kubernetes-python-client-versions) for an explanation of why there is no v13-v16 release.
103103
@@ -151,12 +151,13 @@ between client-python versions.
151151
| 24.0 Alpha/Beta | Kubernetes main repo, 1.24 branch ||
152152
| 24.0 | Kubernetes main repo, 1.24 branch ||
153153
| 25.0 Alpha/Beta | Kubernetes main repo, 1.25 branch ||
154-
| 25.0 | Kubernetes main repo, 1.25 branch | |
154+
| 25.0 | Kubernetes main repo, 1.25 branch | |
155155
| 26.0 Alpha/Beta | Kubernetes main repo, 1.26 branch ||
156156
| 26.0 | Kubernetes main repo, 1.26 branch ||
157157
| 27.0 Alpha/Beta | Kubernetes main repo, 1.27 branch ||
158158
| 27.0 | Kubernetes main repo, 1.27 branch ||
159-
| 28.0 Alpha/Beta | Kubernetes main repo, 1.28 branch ||
159+
| 28.0 Alpha/Beta | Kubernetes main repo, 1.28 branch ||
160+
| 28.0 | Kubernetes main repo, 1.28 branch ||
160161

161162
> See [here](#homogenizing-the-kubernetes-python-client-versions) for an explanation of why there is no v13-v16 release.
162163

examples/annotate_deployment.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ def main():
6262
time.sleep(1)
6363
before_annotating = apps_v1_api.read_namespaced_deployment(
6464
'deploy-nginx', 'default')
65-
print('Before annotating, annotations: %s' %
66-
before_annotating.metadata.annotations)
65+
print(f"Before annotating, annotations: {before_annotating.metadata.annotations}")
6766

6867
annotations = [
6968
{
@@ -80,8 +79,7 @@ def main():
8079
time.sleep(1)
8180
after_annotating = apps_v1_api.read_namespaced_deployment(
8281
name='deploy-nginx', namespace='default')
83-
print('After annotating, annotations: %s' %
84-
after_annotating.metadata.annotations)
82+
print(f"After annotating, annotations: {after_annotating.metadata.annotations}")
8583

8684

8785
if __name__ == "__main__":

examples/api_discovery.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ def main():
2727
config.load_kube_config()
2828

2929
print("Supported APIs (* is preferred version):")
30-
print("%-40s %s" %
31-
("core", ",".join(client.CoreApi().get_api_versions().versions)))
30+
print(f"{'core':<40} {','.join(client.CoreApi().get_api_versions().versions)}")
3231
for api in client.ApisApi().get_api_versions().groups:
3332
versions = []
3433
for v in api.versions:
@@ -38,7 +37,7 @@ def main():
3837
name += "*"
3938
name += v.version
4039
versions.append(name)
41-
print("%-40s %s" % (api.name, ",".join(versions)))
40+
print(f"{api.name:<40} {','.join(versions)}")
4241

4342

4443
if __name__ == '__main__':

examples/apply_from_directory.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from kubernetes import client,config,utils
1+
from kubernetes import client, config, utils
22

33
def main():
44
config.load_kube_config()

examples/apply_from_single_file.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from kubernetes import client,config,utils
1+
from kubernetes import client, config, utils
22

33
def main():
44
config.load_kube_config()
55
k8s_client = client.ApiClient()
6-
yaml_file = 'examples/configmap-demo-pod.yml'
6+
yaml_file = 'examples/yaml_dir/configmap-demo-pod.yml'
77
utils.create_from_yaml(k8s_client,yaml_file,verbose=True)
88

99
if __name__ == "__main__":

examples/cluster_scoped_custom_object.py

+3-12
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,7 @@ def main():
100100
plural="crontabs",
101101
)
102102
print("%s\t\t%s" % ("NAME", "CRON-SPEC"))
103-
print(
104-
"%s\t%s\n" %
105-
(resource["metadata"]["name"],
106-
resource["spec"]["cronSpec"]))
103+
print(f"{resource['metadata']['name']}\t{resource['spec']['cronSpec']}\n")
107104

108105
# patch the `spec.cronSpec` field of the custom resource
109106
patched_resource = api.patch_cluster_custom_object(
@@ -115,10 +112,7 @@ def main():
115112
)
116113
print("[INFO] Custom resource `test-crontab` patched to update the cronSpec schedule!\n")
117114
print("%s\t\t%s" % ("NAME", "PATCHED-CRON-SPEC"))
118-
print(
119-
"%s\t%s\n" %
120-
(patched_resource["metadata"]["name"],
121-
patched_resource["spec"]["cronSpec"]))
115+
print(f"{patched_resource['metadata']['name']}\t{patched_resource['spec']['cronSpec']}\n")
122116

123117
# patch the `metadata.labels` field of the custom resource
124118
patched_resource = api.patch_cluster_custom_object(
@@ -130,10 +124,7 @@ def main():
130124
)
131125
print("[INFO] Custom resource `test-crontab` patched to apply new metadata labels!\n")
132126
print("%s\t\t%s" % ("NAME", "PATCHED_LABELS"))
133-
print(
134-
"%s\t%s\n" %
135-
(patched_resource["metadata"]["name"],
136-
patched_resource["metadata"]["labels"]))
127+
print(f"{patched_resource['metadata']['name']}\t{patched_resource['metadata']['labels']}\n")
137128

138129
# delete the custom resource "test-crontab"
139130
api.delete_cluster_custom_object(

examples/deployment_create.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ def main():
2929
# default location.
3030
config.load_kube_config()
3131

32-
with open(path.join(path.dirname(__file__), "nginx-deployment.yaml")) as f:
32+
with open(path.join(path.dirname(__file__), "yaml_dir/nginx-deployment.yaml")) as f:
3333
dep = yaml.safe_load(f)
3434
k8s_apps_v1 = client.AppsV1Api()
3535
resp = k8s_apps_v1.create_namespaced_deployment(
3636
body=dep, namespace="default")
37-
print("Deployment created. status='%s'" % resp.metadata.name)
37+
print(f"Deployment created. Status='{resp.metadata.name}'")
3838

3939

4040
if __name__ == '__main__':

examples/in_cluster_config.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ def main():
5858
print("Listing pods with their IPs:")
5959
ret = v1.list_pod_for_all_namespaces(watch=False)
6060
for i in ret.items:
61-
print("%s\t%s\t%s" %
62-
(i.status.pod_ip, i.metadata.namespace, i.metadata.name))
61+
print(f"{i.status.pod_ip}\t{i.metadata.namespace}\t{i.metadata.name}")
6362

6463

6564
if __name__ == '__main__':

examples/job_crud.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828

2929
def create_job_object():
30-
# Configureate Pod template container
30+
# Configure Pod template container
3131
container = client.V1Container(
3232
name="pi",
3333
image="perl",
@@ -54,7 +54,7 @@ def create_job(api_instance, job):
5454
api_response = api_instance.create_namespaced_job(
5555
body=job,
5656
namespace="default")
57-
print("Job created. status='%s'" % str(api_response.status))
57+
print(f"Job created. status='{str(api_response.status)}'")
5858
get_job_status(api_instance)
5959

6060

@@ -68,7 +68,7 @@ def get_job_status(api_instance):
6868
api_response.status.failed is not None:
6969
job_completed = True
7070
sleep(1)
71-
print("Job status='%s'" % str(api_response.status))
71+
print(f"Job status='{str(api_response.status)}'")
7272

7373

7474
def update_job(api_instance, job):
@@ -78,7 +78,7 @@ def update_job(api_instance, job):
7878
name=JOB_NAME,
7979
namespace="default",
8080
body=job)
81-
print("Job updated. status='%s'" % str(api_response.status))
81+
print(f"Job updated. status='{str(api_response.status)}'")
8282

8383

8484
def delete_job(api_instance):
@@ -88,7 +88,7 @@ def delete_job(api_instance):
8888
body=client.V1DeleteOptions(
8989
propagation_policy='Foreground',
9090
grace_period_seconds=5))
91-
print("Job deleted. status='%s'" % str(api_response.status))
91+
print(f"Job deleted. status='{str(api_response.status)}'")
9292

9393

9494
def main():

examples/multiple_clusters.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,11 @@ def main():
4343

4444
print("\nList of pods on %s:" % cluster1)
4545
for i in client1.list_pod_for_all_namespaces().items:
46-
print("%s\t%s\t%s" %
47-
(i.status.pod_ip, i.metadata.namespace, i.metadata.name))
46+
print(f"{i.status.pod_ip}\t{i.metadata.namespace}\t{i.metadata.name}")
4847

49-
print("\n\nList of pods on %s:" % cluster2)
48+
print(f"\n\nList of pods on {cluster2}:")
5049
for i in client2.list_pod_for_all_namespaces().items:
51-
print("%s\t%s\t%s" %
52-
(i.status.pod_ip, i.metadata.namespace, i.metadata.name))
50+
print(f"{i.status.pod_ip}\t{i.metadata.namespace}\t{i.metadata.name}")
5351

5452

5553
if __name__ == '__main__':

examples/node_labels.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def main():
4444
# Patching the node labels
4545
for node in node_list.items:
4646
api_response = api_instance.patch_node(node.metadata.name, body)
47-
print("%s\t%s" % (node.metadata.name, node.metadata.labels))
47+
print(f"{node.metadata.name}\t{node.metadata.labels}")
4848

4949

5050
if __name__ == '__main__':

examples/out_of_cluster_config.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
"""
16-
Shows how to load a Kubernetes config from outside of the cluster.
16+
Shows how to load a Kubernetes config from outside the cluster.
1717
"""
1818

1919
from kubernetes import client, config
@@ -29,8 +29,7 @@ def main():
2929
print("Listing pods with their IPs:")
3030
ret = v1.list_pod_for_all_namespaces(watch=False)
3131
for i in ret.items:
32-
print("%s\t%s\t%s" %
33-
(i.status.pod_ip, i.metadata.namespace, i.metadata.name))
32+
print(f"{i.status.pod_ip}\t{i.metadata.namespace}\t{i.metadata.name}")
3433

3534

3635
if __name__ == '__main__':

examples/pick_kube_config_context.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def main():
3737
# utility
3838
config.load_kube_config(context=option)
3939

40-
print("Active host is %s" % configuration.Configuration().host)
40+
print(f"Active host is {configuration.Configuration().host}")
4141

4242
v1 = client.CoreV1Api()
4343
print("Listing pods with their IPs:")

examples/pod_config_list.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def main():
3838
# utility
3939
config.load_kube_config(context=option)
4040

41-
print("Active host is %s" % configuration.Configuration().host)
41+
print(f"Active host is {configuration.Configuration().host}")
4242

4343
v1 = client.CoreV1Api()
4444
print("Listing pods with their IPs:")

examples/pod_exec.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ def exec_commands(api_instance):
3333
namespace='default')
3434
except ApiException as e:
3535
if e.status != 404:
36-
print("Unknown error: %s" % e)
36+
print(f"Unknown error: {e}")
3737
exit(1)
3838

3939
if not resp:
40-
print("Pod %s does not exist. Creating it..." % name)
40+
print(f"Pod {name} does not exist. Creating it...")
4141
pod_manifest = {
4242
'apiVersion': 'v1',
4343
'kind': 'Pod',
@@ -98,22 +98,22 @@ def exec_commands(api_instance):
9898
while resp.is_open():
9999
resp.update(timeout=1)
100100
if resp.peek_stdout():
101-
print("STDOUT: %s" % resp.read_stdout())
101+
print(f"STDOUT: {resp.read_stdout()}")
102102
if resp.peek_stderr():
103-
print("STDERR: %s" % resp.read_stderr())
103+
print(f"STDERR: {resp.read_stderr()}")
104104
if commands:
105105
c = commands.pop(0)
106-
print("Running command... %s\n" % c)
106+
print(f"Running command... {c}\n")
107107
resp.write_stdin(c + "\n")
108108
else:
109109
break
110110

111111
resp.write_stdin("date\n")
112112
sdate = resp.readline_stdout(timeout=3)
113-
print("Server date command returns: %s" % sdate)
113+
print(f"Server date command returns: {sdate}")
114114
resp.write_stdin("whoami\n")
115115
user = resp.readline_stdout(timeout=3)
116-
print("Server user is: %s" % user)
116+
print(f"Server user is: {user}")
117117
resp.close()
118118

119119

0 commit comments

Comments
 (0)