Skip to content

Commit 37fd5b9

Browse files
committed
Added high-level diagrams
1 parent ba728cc commit 37fd5b9

11 files changed

+1390
-0
lines changed

.codeboarding/APIClientCore.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
```mermaid
2+
graph LR
3+
API_Client_Core["API Client Core"]
4+
Client_Configuration["Client Configuration"]
5+
REST_Client["REST Client"]
6+
Kubernetes_API_Clients["Kubernetes API Clients"]
7+
Kubernetes_Exceptions["Kubernetes Exceptions"]
8+
Kubernetes_Models["Kubernetes Models"]
9+
Kubernetes_API_Clients -- "initializes with" --> API_Client_Core
10+
API_Client_Core -- "uses" --> Client_Configuration
11+
API_Client_Core -- "uses" --> REST_Client
12+
API_Client_Core -- "raises" --> Kubernetes_Exceptions
13+
API_Client_Core -- "uses" --> Kubernetes_Models
14+
REST_Client -- "raises" --> Kubernetes_Exceptions
15+
Kubernetes_Models -- "uses" --> Client_Configuration
16+
```
17+
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%[email protected]?style=flat-square)](mailto:[email protected])
18+
19+
## Component Details
20+
21+
This graph illustrates the core components of the Kubernetes Python client's API interaction subsystem. The API Client Core acts as the central hub, managing HTTP requests, data serialization, and integrating with other components. It relies on the Client Configuration for connection details and the REST Client for actual HTTP communication. High-level Kubernetes API Clients utilize the API Client Core to interact with specific Kubernetes resources, which are represented by Kubernetes Models for data handling. Errors during these interactions are managed through Kubernetes Exceptions.
22+
23+
### API Client Core
24+
The foundational component for interacting with the Kubernetes API. It manages HTTP requests, responses, and handles data serialization/deserialization. It integrates with the Client Configuration for authentication and connection details and utilizes the REST Client for actual HTTP communication. It also handles and raises Kubernetes Exceptions.
25+
26+
27+
**Related Classes/Methods**:
28+
29+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/api_client.py#L33-L647" target="_blank" rel="noopener noreferrer">`kubernetes.client.api_client.ApiClient` (33:647)</a>
30+
31+
32+
### Client Configuration
33+
Manages the configuration settings for the Kubernetes client, such as API host, authentication details (API keys, tokens), and client-side validation. It provides methods to retrieve and set default configurations and is used by the API Client Core and data models.
34+
35+
36+
**Related Classes/Methods**:
37+
38+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/configuration.py#L25-L405" target="_blank" rel="noopener noreferrer">`kubernetes.client.configuration.Configuration` (25:405)</a>
39+
40+
41+
### REST Client
42+
A low-level HTTP client that performs the actual HTTP requests (GET, POST, PUT, DELETE, etc.) to the Kubernetes API. It is utilized by the API Client Core to send requests and receive raw responses and can raise Kubernetes Exceptions.
43+
44+
45+
**Related Classes/Methods**:
46+
47+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/rest.py#L51-L305" target="_blank" rel="noopener noreferrer">`kubernetes.client.rest.RESTClientObject` (51:305)</a>
48+
49+
50+
### Kubernetes API Clients
51+
A collection of high-level API classes, each providing an interface for interacting with specific groups of Kubernetes resources (e.g., Core, Apps, RBAC, Networking, Batch, Storage, etc.). These classes abstract the underlying HTTP requests and data serialization, making it easier to manage Kubernetes objects. They initialize with and use the API Client Core.
52+
53+
54+
**Related Classes/Methods**:
55+
56+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/api/core_v1_api.py#L27-L30454" target="_blank" rel="noopener noreferrer">`kubernetes.client.api.core_v1_api.CoreV1Api` (27:30454)</a>
57+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/api/apps_v1_api.py#L27-L9529" target="_blank" rel="noopener noreferrer">`kubernetes.client.api.apps_v1_api.AppsV1Api` (27:9529)</a>
58+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/api/rbac_authorization_v1_api.py#L27-L4736" target="_blank" rel="noopener noreferrer">`kubernetes.client.api.rbac_authorization_v1_api.RbacAuthorizationV1Api` (27:4736)</a>
59+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/api/networking_v1_api.py#L27-L6628" target="_blank" rel="noopener noreferrer">`kubernetes.client.api.networking_v1_api.NetworkingV1Api` (27:6628)</a>
60+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/api/storage_v1_api.py#L27-L5964" target="_blank" rel="noopener noreferrer">`kubernetes.client.api.storage_v1_api.StorageV1Api` (27:5964)</a>
61+
62+
63+
### Kubernetes Exceptions
64+
A set of custom exception classes used to signal various errors that can occur during interactions with the Kubernetes API, such as invalid input, network issues, or API server errors. These exceptions are raised by the API Client Core and REST Client.
65+
66+
67+
**Related Classes/Methods**:
68+
69+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/exceptions.py#L84-L109" target="_blank" rel="noopener noreferrer">`kubernetes.client.exceptions.ApiException` (84:109)</a>
70+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/exceptions.py#L49-L64" target="_blank" rel="noopener noreferrer">`kubernetes.client.exceptions.ApiValueError` (49:64)</a>
71+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/exceptions.py#L20-L46" target="_blank" rel="noopener noreferrer">`kubernetes.client.exceptions.ApiTypeError` (20:46)</a>
72+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/exceptions.py#L67-L81" target="_blank" rel="noopener noreferrer">`kubernetes.client.exceptions.ApiKeyError` (67:81)</a>
73+
74+
75+
### Kubernetes Models
76+
A comprehensive set of Python classes that represent the various Kubernetes API objects (e.g., Pod, Deployment, Service, ConfigMap, etc.). These models are used for data serialization and deserialization when interacting with the Kubernetes API. They depend on the Client Configuration for their internal workings (e.g., type validation, default values).
77+
78+
79+
**Related Classes/Methods**:
80+
81+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/v1_pod.py#L21-L228" target="_blank" rel="noopener noreferrer">`kubernetes.client.models.v1_pod.V1Pod` (21:228)</a>
82+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/v1_deployment.py#L21-L228" target="_blank" rel="noopener noreferrer">`kubernetes.client.models.v1_deployment.V1Deployment` (21:228)</a>
83+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/v1_service.py#L21-L228" target="_blank" rel="noopener noreferrer">`kubernetes.client.models.v1_service.V1Service` (21:228)</a>
84+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/v1_config_map.py#L21-L260" target="_blank" rel="noopener noreferrer">`kubernetes.client.models.v1_config_map.V1ConfigMap` (21:260)</a>
85+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/v1_secret.py#L21-L288" target="_blank" rel="noopener noreferrer">`kubernetes.client.models.v1_secret.V1Secret` (21:288)</a>
86+
87+
88+
89+
90+
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

.codeboarding/APIModels.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
```mermaid
2+
graph LR
3+
Kubernetes_API_Models["Kubernetes API Models"]
4+
Kubernetes_Client_Configuration["Kubernetes Client Configuration"]
5+
Kubernetes_E2E_Test_Utilities["Kubernetes E2E Test Utilities"]
6+
Kubernetes_API_Models -- "depends on" --> Kubernetes_Client_Configuration
7+
Kubernetes_E2E_Test_Utilities -- "interacts with" --> Kubernetes_API_Models
8+
Kubernetes_E2E_Test_Utilities -- "configures with" --> Kubernetes_Client_Configuration
9+
```
10+
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%[email protected]?style=flat-square)](mailto:[email protected])
11+
12+
## Component Details
13+
14+
This graph illustrates the core components involved in representing and interacting with Kubernetes API objects. The central component, 'Kubernetes API Models', defines the data structures for various Kubernetes resources. These models rely on the 'Kubernetes Client Configuration' for their initialization and overall client settings. The 'Kubernetes E2E Test Utilities' component leverages both the API models to create and manage test resources and the client configuration to establish the testing environment, ensuring end-to-end functionality.
15+
16+
### Kubernetes API Models
17+
This component encompasses all the Python classes that represent various Kubernetes API objects (e.g., Pods, Deployments, Services, Namespaces). These classes are primarily responsible for data serialization and deserialization to and from dictionary representations, and for initializing themselves using the client configuration. They provide the structured data models for interacting with the Kubernetes API.
18+
19+
20+
**Related Classes/Methods**:
21+
22+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/v1_pod.py#L21-L228" target="_blank" rel="noopener noreferrer">`kubernetes.client.models.v1_pod.V1Pod` (21:228)</a>
23+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/v1_service.py#L21-L228" target="_blank" rel="noopener noreferrer">`kubernetes.client.models.v1_service.V1Service` (21:228)</a>
24+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/v1_object_meta.py#L21-L514" target="_blank" rel="noopener noreferrer">`kubernetes.client.models.v1_object_meta.V1ObjectMeta` (21:514)</a>
25+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/v1_namespace.py#L21-L228" target="_blank" rel="noopener noreferrer">`kubernetes.client.models.v1_namespace.V1Namespace` (21:228)</a>
26+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/v1_deployment.py#L21-L228" target="_blank" rel="noopener noreferrer">`kubernetes.client.models.v1_deployment.V1Deployment` (21:228)</a>
27+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/v1_config_map.py#L21-L260" target="_blank" rel="noopener noreferrer">`kubernetes.client.models.v1_config_map.V1ConfigMap` (21:260)</a>
28+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/v1_secret.py#L21-L288" target="_blank" rel="noopener noreferrer">`kubernetes.client.models.v1_secret.V1Secret` (21:288)</a>
29+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/v1_pod_spec.py#L21-L1205" target="_blank" rel="noopener noreferrer">`kubernetes.client.models.v1_pod_spec.V1PodSpec` (21:1205)</a>
30+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/v1_pod_status.py#L21-L570" target="_blank" rel="noopener noreferrer">`kubernetes.client.models.v1_pod_status.V1PodStatus` (21:570)</a>
31+
32+
33+
### Kubernetes Client Configuration
34+
This component is responsible for managing the configuration settings for the Kubernetes client, such as API host, SSL verification, and API keys. It provides the necessary context for other client components to interact with the Kubernetes API server.
35+
36+
37+
**Related Classes/Methods**:
38+
39+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/client/configuration.py#L25-L405" target="_blank" rel="noopener noreferrer">`kubernetes.client.configuration.Configuration` (25:405)</a>
40+
41+
42+
### Kubernetes E2E Test Utilities
43+
This component provides utility functions and classes specifically designed for end-to-end testing of Kubernetes functionalities. It includes methods for setting up and tearing down test environments, often by creating and managing Kubernetes resources.
44+
45+
46+
**Related Classes/Methods**:
47+
48+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/e2e_test/test_utils.py#L27-L609" target="_blank" rel="noopener noreferrer">`kubernetes.e2e_test.test_utils.TestUtils` (27:609)</a>
49+
- <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/utils/create_from_yaml.py#L99-L181" target="_blank" rel="noopener noreferrer">`kubernetes.utils.create_from_yaml` (99:181)</a>
50+
- `kubernetes.utils.create_from_dict` (full file reference)
51+
52+
53+
54+
55+
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

0 commit comments

Comments
 (0)