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 ### Install dependencies
11 To install dependencies for normal usage of script, run this command.
14 pip3 install -r requirements.txt
23 ### Code static analysis
31 To running the automated tests is required to have properly configured
32 kubernetes cluster, which is in the virtual machine, that is containing
33 development environment.
36 PYTHONPATH=src pytest -vv -s tests
42 find -name __pycache__ -exec rm -Rf {} +
43 find -name .pytest_cache -exec rm -Rf {} +
48 Example of the acceptable file format:
60 Commands to research for the paths
61 of the software binaries in multiple docker images:
64 docker run --entrypoint /bin/sh python:buster -c "which python"
65 docker run --entrypoint /bin/sh python:alpine -c "which python"
66 docker run --entrypoint /bin/sh python:slim -c "which python"
67 docker run --entrypoint /bin/sh python:2-buster -c "which python"
68 docker run --entrypoint /bin/sh python:2-alpine -c "which python"
69 docker run --entrypoint /bin/sh python:2-slim -c "which python"
70 docker run --entrypoint /bin/sh ubuntu:bionic -c "apt-get update && apt-get install -y python && which python"
71 docker run --entrypoint /bin/sh ubuntu:bionic -c "apt-get update && apt-get install -y python3 && which python3"
72 docker run --entrypoint /bin/sh openjdk -c "type java"
77 List of features, that should be implemented:
79 - Complete license and copyrights variables.
80 - Find a way, to safe searching of the container files from Kubernetes API.
81 - Parallelization of executing binaries on the single container.
82 - Parallelization of versions determination in multiple containers.
83 - Support for determination the old versions of OpenJDK (attribute `-version`).
84 - Deleting namespace from cluster in development environment (for example,
85 during cluster reset), cause hanging in namespace terminating state.
86 - Find a nicer way to extracting exit code from execution result.
90 - <https://github.com/kubernetes-client/python>
91 - <https://github.com/kubernetes-client/python/issues/812>
92 - <https://success.docker.com/article/kubernetes-namespace-stuck-in-terminating>