From 2d299b7a57ee5ebbbfe03295c03c5aa987452ee6 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Fri, 27 Jan 2023 11:10:29 +0800 Subject: [PATCH] Fix typos Found via `codespell -S CHANGELOG.md,*.json,*.unprocessed -L querys,couldn` --- doc/source/usage.rst | 2 +- examples/README.md | 2 +- examples/deployment_crud.py | 2 +- examples/dynamic-client/cluster_scoped_custom_resource.py | 2 +- examples/notebooks/create_pod.ipynb | 2 +- examples/notebooks/create_secret.ipynb | 2 +- examples/rollout-daemonset.py | 2 +- examples/rollout-statefulset.py | 8 ++++---- kubernetes/base/config/kube_config.py | 2 +- kubernetes/base/dynamic/resource.py | 2 +- .../base/leaderelection/resourcelock/configmaplock.py | 2 +- kubernetes/base/stream/ws_client.py | 2 +- kubernetes/client/models/discovery_v1_endpoint_port.py | 4 ++-- kubernetes/docs/DiscoveryV1EndpointPort.md | 2 +- kubernetes/docs/V1PersistentVolumeClaimCondition.md | 2 +- kubernetes/docs/V1PodDisruptionBudgetStatus.md | 2 +- scripts/util/kube_changelog.sh | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) diff --git a/doc/source/usage.rst b/doc/source/usage.rst index 114306a8c..a70bad048 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -14,7 +14,7 @@ Here is a simple usage of creating a deployment from a yaml file: .. literalinclude:: ../../examples/create_deployment.py -The following example demostrates how to create, update and delete deployments +The following example demonstrates how to create, update and delete deployments without the need to read a file from the disk: .. literalinclude:: ../../examples/deployment_examples.py diff --git a/examples/README.md b/examples/README.md index 0c4d513e8..618e840ea 100644 --- a/examples/README.md +++ b/examples/README.md @@ -2,7 +2,7 @@ This directory contains various examples of how to use the Python client. Please read the description at the top of each example for more information -about what the script does and any prequisites. Most scripts also include +about what the script does and any prerequisites. Most scripts also include comments throughout the code. ## Setup diff --git a/examples/deployment_crud.py b/examples/deployment_crud.py index 0fe717891..45a759786 100644 --- a/examples/deployment_crud.py +++ b/examples/deployment_crud.py @@ -64,7 +64,7 @@ def create_deployment_object(): def create_deployment(api, deployment): - # Create deployement + # Create deployment resp = api.create_namespaced_deployment( body=deployment, namespace="default" ) diff --git a/examples/dynamic-client/cluster_scoped_custom_resource.py b/examples/dynamic-client/cluster_scoped_custom_resource.py index 532a76361..78ea91d7e 100644 --- a/examples/dynamic-client/cluster_scoped_custom_resource.py +++ b/examples/dynamic-client/cluster_scoped_custom_resource.py @@ -17,7 +17,7 @@ This example demonstrates the following: - Creation of a custom resource definition (CRD) using dynamic-client - Creation of cluster scoped custom resources (CR) using the above created CRD - List, patch (update), delete the custom resources - - Delete the custom resource defintion (CRD) + - Delete the custom resource definition (CRD) """ from kubernetes import config, dynamic diff --git a/examples/notebooks/create_pod.ipynb b/examples/notebooks/create_pod.ipynb index ac863ca53..a4691a9e8 100644 --- a/examples/notebooks/create_pod.ipynb +++ b/examples/notebooks/create_pod.ipynb @@ -98,7 +98,7 @@ "editable": true }, "source": [ - "In this example, we only start one container in the Pod. The container is an instnace of the _V1Container_ class. " + "In this example, we only start one container in the Pod. The container is an instance of the _V1Container_ class. " ] }, { diff --git a/examples/notebooks/create_secret.ipynb b/examples/notebooks/create_secret.ipynb index 426c2eb92..2f291aa7d 100644 --- a/examples/notebooks/create_secret.ipynb +++ b/examples/notebooks/create_secret.ipynb @@ -246,7 +246,7 @@ "source": [ "### View secret being used within the pod\n", "\n", - "Wait for atleast 10 seconds to ensure pod is running before executing this section." + "Wait for at least 10 seconds to ensure pod is running before executing this section." ] }, { diff --git a/examples/rollout-daemonset.py b/examples/rollout-daemonset.py index 649924705..649486370 100644 --- a/examples/rollout-daemonset.py +++ b/examples/rollout-daemonset.py @@ -98,7 +98,7 @@ def main(): # Wait for finishing creation of controller revision import time time.sleep(15) - # List the controller revison + # List the controller revision controller_revisions = list_controller_revision( apps_v1_api, "default", "daemonset-redis") rollout_namespaced_daemon_set( diff --git a/examples/rollout-statefulset.py b/examples/rollout-statefulset.py index 86f91c726..fb1afdc54 100644 --- a/examples/rollout-statefulset.py +++ b/examples/rollout-statefulset.py @@ -3,11 +3,11 @@ This example covers the following: - Create headless server - Create statefulset - Update statefulset - - List contoller revisions which belong to specified statefulset + - List controller revisions which belong to specified statefulset - Roll out statefulset Note: - If your kubernetes version is lower than 1.22(exclude 1.22), the kubernetes-client version must be lower than 1.22(alse exclude 1.22). - Because new feature 'AvailableReplicas' for StatefulSetStatus is supported in native kubernetes since version 1.22, mismatch version between kubernetes and kubernetes-client will raise execption ValueError + If your kubernetes version is lower than 1.22(exclude 1.22), the kubernetes-client version must be lower than 1.22(also exclude 1.22). + Because new feature 'AvailableReplicas' for StatefulSetStatus is supported in native kubernetes since version 1.22, mismatch version between kubernetes and kubernetes-client will raise exception ValueError """ @@ -128,7 +128,7 @@ def main(): # Wait for finishing creation of controller revision import time time.sleep(15) - # List the controller revison + # List the controller revision controller_revisions = list_controller_revision( apps_v1_api, "default", "statefulset-redis") rollout_namespaced_stateful_set( diff --git a/kubernetes/base/config/kube_config.py b/kubernetes/base/config/kube_config.py index f72890982..a62df4105 100644 --- a/kubernetes/base/config/kube_config.py +++ b/kubernetes/base/config/kube_config.py @@ -665,7 +665,7 @@ class ConfigNode(object): class KubeConfigMerger: """Reads and merges configuration from one or more kube-config's. - The propery `config` can be passed to the KubeConfigLoader as config_dict. + The property `config` can be passed to the KubeConfigLoader as config_dict. It uses a path attribute from ConfigNode to store the path to kubeconfig. This path is required to load certs from relative paths. diff --git a/kubernetes/base/dynamic/resource.py b/kubernetes/base/dynamic/resource.py index ca923a3e7..05a945521 100644 --- a/kubernetes/base/dynamic/resource.py +++ b/kubernetes/base/dynamic/resource.py @@ -150,7 +150,7 @@ class ResourceList(Resource): raise ValueError('The `items` field in the body must be populated when calling methods on a ResourceList') if self.kind != kind: - raise ValueError('Methods on a {} must be called with a body containing the same kind. Receieved {} instead'.format(self.kind, kind)) + raise ValueError('Methods on a {} must be called with a body containing the same kind. Received {} instead'.format(self.kind, kind)) return { 'api_version': api_version, diff --git a/kubernetes/base/leaderelection/resourcelock/configmaplock.py b/kubernetes/base/leaderelection/resourcelock/configmaplock.py index 54a7bb43b..a4ccf49d2 100644 --- a/kubernetes/base/leaderelection/resourcelock/configmaplock.py +++ b/kubernetes/base/leaderelection/resourcelock/configmaplock.py @@ -94,7 +94,7 @@ class ConfigMapLock: :param name: name of the lock to be updated :param namespace: namespace the lock is in :param updated_record: the updated election record - :return: True if update is succesful False if it fails + :return: True if update is successful False if it fails """ try: # Set the updated record diff --git a/kubernetes/base/stream/ws_client.py b/kubernetes/base/stream/ws_client.py index 15cc3945f..13043d62e 100644 --- a/kubernetes/base/stream/ws_client.py +++ b/kubernetes/base/stream/ws_client.py @@ -256,7 +256,7 @@ class PortForward: Port Forward command sends on 2 channels per port, a read/write data channel and a read only error channel. Both channels are sent an - initial frame contaning the port number that channel is associated with. + initial frame containing the port number that channel is associated with. """ self.websocket = websocket diff --git a/kubernetes/client/models/discovery_v1_endpoint_port.py b/kubernetes/client/models/discovery_v1_endpoint_port.py index 19e20de6f..96f183fe6 100644 --- a/kubernetes/client/models/discovery_v1_endpoint_port.py +++ b/kubernetes/client/models/discovery_v1_endpoint_port.py @@ -94,7 +94,7 @@ class DiscoveryV1EndpointPort(object): def name(self): """Gets the name of this DiscoveryV1EndpointPort. # noqa: E501 - The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. # noqa: E501 + The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. # noqa: E501 :return: The name of this DiscoveryV1EndpointPort. # noqa: E501 :rtype: str @@ -105,7 +105,7 @@ class DiscoveryV1EndpointPort(object): def name(self, name): """Sets the name of this DiscoveryV1EndpointPort. - The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. # noqa: E501 + The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. # noqa: E501 :param name: The name of this DiscoveryV1EndpointPort. # noqa: E501 :type: str diff --git a/kubernetes/docs/DiscoveryV1EndpointPort.md b/kubernetes/docs/DiscoveryV1EndpointPort.md index fc5bf7a56..740dab7e0 100644 --- a/kubernetes/docs/DiscoveryV1EndpointPort.md +++ b/kubernetes/docs/DiscoveryV1EndpointPort.md @@ -5,7 +5,7 @@ EndpointPort represents a Port used by an EndpointSlice Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **app_protocol** | **str** | The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. | [optional] -**name** | **str** | The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. | [optional] +**name** | **str** | The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. | [optional] **port** | **int** | The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. | [optional] **protocol** | **str** | The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. | [optional] diff --git a/kubernetes/docs/V1PersistentVolumeClaimCondition.md b/kubernetes/docs/V1PersistentVolumeClaimCondition.md index 3709313ca..eb1577977 100644 --- a/kubernetes/docs/V1PersistentVolumeClaimCondition.md +++ b/kubernetes/docs/V1PersistentVolumeClaimCondition.md @@ -1,6 +1,6 @@ # V1PersistentVolumeClaimCondition -PersistentVolumeClaimCondition contails details about state of pvc +PersistentVolumeClaimCondition contains details about state of pvc ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/kubernetes/docs/V1PodDisruptionBudgetStatus.md b/kubernetes/docs/V1PodDisruptionBudgetStatus.md index d97ac4248..d4041bd87 100644 --- a/kubernetes/docs/V1PodDisruptionBudgetStatus.md +++ b/kubernetes/docs/V1PodDisruptionBudgetStatus.md @@ -4,7 +4,7 @@ PodDisruptionBudgetStatus represents information about the status of a PodDisrup ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**conditions** | [**list[V1Condition]**](V1Condition.md) | Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute the number of allowed disruptions. Therefore no disruptions are allowed and the status of the condition will be False. - InsufficientPods: The number of pods are either at or below the number required by the PodDisruptionBudget. No disruptions are allowed and the status of the condition will be False. - SufficientPods: There are more pods than required by the PodDisruptionBudget. The condition will be True, and the number of allowed disruptions are provided by the disruptionsAllowed property. | [optional] +**conditions** | [**list[V1Condition]**](V1Condition.md) | Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't't able to compute the number of allowed disruptions. Therefore no disruptions are allowed and the status of the condition will be False. - InsufficientPods: The number of pods are either at or below the number required by the PodDisruptionBudget. No disruptions are allowed and the status of the condition will be False. - SufficientPods: There are more pods than required by the PodDisruptionBudget. The condition will be True, and the number of allowed disruptions are provided by the disruptionsAllowed property. | [optional] **current_healthy** | **int** | current number of healthy pods | **desired_healthy** | **int** | minimum desired number of healthy pods | **disrupted_pods** | **dict(str, datetime)** | DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. | [optional] diff --git a/scripts/util/kube_changelog.sh b/scripts/util/kube_changelog.sh index 745e70aa5..f0ada7260 100755 --- a/scripts/util/kube_changelog.sh +++ b/scripts/util/kube_changelog.sh @@ -20,7 +20,7 @@ # find_latest_patch_version finds the latest released patch version for the # given branch. # We use the version to track what API surface the generated Python client -# cooresponds to, and collect all API change release notes up to that version. +# corresponds to, and collect all API change release notes up to that version. # There is one tricky point: the code generator we use pulls the latest OpenAPI # spec from the given branch. The spec may contain API changes that aren't # documented in the Kubernetes release notes. Until the code generator pulls