Codebase
Navigate the Codebase using the tree view. Use the filters to highlight where various files are grouped to aid understanding.
Getting Started Commands
Project Structure
Below is a short description of the key directories of the project to aid you when understanding where key files are located.
.git/ - This directory contains the Git repository metadata and files. It includes branches, hooks, info, logs, objects, and refs.
.git/branches/ - This directory contains the local branches of the Git repository.
.git/hooks/ - This directory contains scripts that Git runs before or after events such as commit or push.
.git/info/ - This directory contains files that provide information about the Git repository, such as the current branch and the commit messages.
.git/logs/ - This directory contains the commit logs for the Git repository.
.git/logs/refs/ - This directory contains the ref logs, which record the history of references in the Git repository.
.git/objects/ - This directory contains the Git object database, which stores the actual content of the files in the Git repository.
.git/objects/info/ - This directory contains information about the Git objects, such as their size and type.
.git/objects/pack/ - This directory contains Git pack files, which are compressed and indexed collections of Git objects.
.git/refs/ - This directory contains the references to the Git branches, tags, and remote repositories.
.git/refs/heads/ - This directory contains the references to the local branches.
.git/refs/remotes/ - This directory contains the references to the remote repositories.
.git/refs/tags/ - This directory contains the references to the Git tags.
.github/ - This directory contains GitHub-specific configuration files and directories.
.github/ISSUE_TEMPLATE/ - This directory contains issue templates for the project.
.github/workflows/ - This directory contains YAML files that define GitHub Actions workflows.
.github/workflows/kind-configs/ - This directory contains configuration files for using Kind as a Kubernetes cluster manager in the workflows.
devel/ - This directory contains development files and scripts.
doc/ - This directory contains documentation files for the project.
doc/source/ - This directory contains the source files for the documentation.
examples/ - This directory contains example usage of the Kubernetes client library.
examples/dynamic-client/ - This directory contains examples of using the dynamic client to interact with Kubernetes.
examples/notebooks/ - This directory contains Jupyter Notebook examples.
examples/notebooks/docker/ - This directory contains Dockerfiles and instructions for running the Notebooks in Docker containers.
examples/watch/ - This directory contains examples of using the watch function to monitor Kubernetes resources.
examples/yaml_dir/ - This directory contains YAML files used in the examples.
kubernetes/ - This directory contains the main Kubernetes client library.
kubernetes/.openapi-generator/ - This directory contains files generated by the OpenAPI Generator.
kubernetes/base/ - This directory contains the base Kubernetes client library.
kubernetes/base/.github/ - This directory contains GitHub-specific configuration files for the base library.
kubernetes/base/config/ - This directory contains configuration files for the base library.
kubernetes/base/dynamic/ - This directory contains the dynamic client implementation for the base library.
kubernetes/base/hack/ - This directory contains hack files for the base library.
kubernetes/base/leaderelection/ - This directory contains the leader election implementation for the base library.
kubernetes/base/stream/ - This directory contains the stream implementation for the base library.
kubernetes/base/watch/ - This directory contains the watch implementation for the base library.
kubernetes/client/ - This directory contains the top-level client for the Kubernetes client library.
kubernetes/client/api/ - This directory contains the API definitions for the client library.
kubernetes/client/apis/ - This directory contains the API implementations for the client library.
kubernetes/client/models/ - This directory contains the data models used by the client library.
kubernetes/config/ - This directory contains the configuration files for the Kubernetes client.
kubernetes/dynamic/ - This directory contains the dynamic client implementation for the Kubernetes client.
kubernetes/e2e_test/ - This directory contains end-to-end tests for the Kubernetes client library.
kubernetes/e2e_test/test_yaml/ - This directory contains YAML files used in the end-to-end tests.
kubernetes/leaderelection/ - This directory contains the leader election implementation for the Kubernetes client.
kubernetes/leaderelection/resourcelock/ - This directory contains the resource lock implementation for the leader election.
kubernetes/stream/ - This directory contains the stream implementation for the Kubernetes client.
kubernetes/test/ - This directory contains unit tests for the Kubernetes client library.
kubernetes/utils/ - This directory contains utility functions for the Kubernetes client library.
kubernetes/watch/ - This directory contains the watch implementation for the Kubernetes client.
scripts/ - This directory contains scripts used in the development and build process.
scripts/util/ - This directory contains utility scripts.
Entrypoints
Below are files we identified as entrypoints for to the codebase. This is where the application starts and a good place to start when learning.
Filename - kubernetes/leaderelection/leaderelection_test.py - Contains tests for Kubernetes leader election.
Filename - kubernetes/base/leaderelection/leaderelection_test.py - Contains tests for base leader election.
Filename - kubernetes/base/stream/ws_client_test.py - Contains tests for WebSocket client.
Filename - kubernetes/base/watch/watch_test.py - Contains tests for Kubernetes watch.
Filename - kubernetes/base/config/incluster_config_test.py - Contains tests for in-cluster configuration.
Filename - kubernetes/base/config/exec_provider_test.py - Contains tests for exec provider.
Filename - kubernetes/base/config/kube_config_test.py - Contains tests for Kubernetes config.
Filename - kubernetes/e2e_test/port_server.py - Contains tests for port server in end-to-end tests.
Filename - kubernetes/stream/ws_client_test.py - Contains tests for stream WebSocket client.
Filename - kubernetes/watch/watch_test.py - Contains tests for watch functionality.
Filename - kubernetes/config/incluster_config_test.py - Contains tests for in-cluster configuration.
Filename - kubernetes/config/exec_provider_test.py - Contains tests for exec provider.
Filename - kubernetes/config/kube_config_test.py - Contains tests for Kubernetes config.
Filename - examples/cronjob_crud.py - Contains examples for creating, deleting, patching, and getting cron jobs.
Filename - examples/in_cluster_config.py - Contains an example of using in-cluster configuration.
Filename - examples/api_discovery.py - Contains an example of using API discovery.
Filename - examples/multiple_clusters.py - Contains an example of using multiple clusters.
Filename - examples/pod_config_list.py - Contains an example of getting pod configuration list.
Filename - examples/out_of_cluster_config.py - Contains an example of using out-of-cluster configuration.
Filename - examples/pod_portforward.py - Contains an example of using pod port forwarding.
Filename - examples/remote_cluster.py - Contains an example of using a remote cluster.
Filename - examples/apply_from_dict.py - Contains an example of applying configuration from a dictionary.
Filename - examples/pod_exec.py - Contains an example of executing commands in a pod.
Filename - examples/job_crud.py - Contains examples for creating, getting, updating, and deleting jobs.
Filename - examples/node_labels.py - Contains an example of managing node labels.
Filename - examples/deployment_create.py - Contains an example of creating a deployment.
Filename - examples/pick_kube_config_context.py - Contains an example of picking a Kubernetes config context.
Filename - examples/watch/pod_namespace_watch.py - Contains an example of watching pods in a namespace.
Filename - scripts/constants.py - Contains scripts with constants.