1 # Kubernetes Binaries Versions Inspector
3 **Kubernetes Binaries Versions Inspector** (`k8s_bin_versions_inspector`) is a
4 python module for verifying versions of CPython and OpenJDK binaries installed
5 in the kubernetes cluster containers.
9 ### Creating environment
11 All development and testing process, should be done in prepared virtual machine,
12 that is containing development environment for this project. Vagrant plugins,
13 that are required to start virtual machine: `vagrant-libvirt`, `vagrant-reload`,
22 ### Install dependencies
24 To install dependencies for normal usage of script, run this command.
27 pip3 install -r env/requirements.txt
36 ### Code static analysis
44 To running the automated tests is required to have properly configured
45 kubernetes cluster, which is in the virtual machine, that is containing
46 development environment.
49 PYTHONPATH=src pytest -vv -s tests
55 find -name __pycache__ -exec rm -Rf {} +
56 find -name .pytest_cache -exec rm -Rf {} +
61 Example of the acceptable file format:
73 Commands to research for the paths
74 of the software binaries in multiple docker images:
77 docker run --entrypoint /bin/sh python:buster -c "which python"
78 docker run --entrypoint /bin/sh python:alpine -c "which python"
79 docker run --entrypoint /bin/sh python:slim -c "which python"
80 docker run --entrypoint /bin/sh python:2-buster -c "which python"
81 docker run --entrypoint /bin/sh python:2-alpine -c "which python"
82 docker run --entrypoint /bin/sh python:2-slim -c "which python"
83 docker run --entrypoint /bin/sh ubuntu:bionic -c "apt-get update && apt-get install -y python && which python"
84 docker run --entrypoint /bin/sh ubuntu:bionic -c "apt-get update && apt-get install -y python3 && which python3"
85 docker run --entrypoint /bin/sh openjdk -c "type java"
90 List of features, that should be implemented:
92 - Complete license and copyrights variables.
93 - Find a way, to safe searching of the container files from Kubernetes API.
94 - Parallelization of executing binaries on the single container.
95 - Parallelization of versions determination in multiple containers.
96 - Support for determination the old versions of OpenJDK (attribute `-version`).
97 - Deleting namespace from cluster in development environment (for example,
98 during cluster reset), cause hanging in namespace terminating state.
99 - Find a nicer way to extracting exit code from execution result.
103 - <https://github.com/kubernetes-client/python>
104 - <https://github.com/kubernetes-client/python/issues/812>
105 - <https://success.docker.com/article/kubernetes-namespace-stuck-in-terminating>