The Kubeconfig plugin is used to input a kubernetes or openshift kubeconfig file and parse and extract components of the kubeconfig file
such as cluster name, user, server url, client certificate, client token etc.
The plugin expects a kubeconfig inputed as a string, as defined in the InputParams dataclass in kubeconfig_plugin.py file.
You define your test parameters in a YAML file to be passed to the plugin command as shown in kubeconfig_example.yaml.
Create the container with docker build -t arca-kubeconfig -f Dockerfile
Run cat kubeconfig_example.yaml | docker run -i arca-kubeconfig -f - to run the plugin
Native
Clone this repository
Create a venv in the current directory with python3 -m venv $(pwd)/venv
Activate the venv by running source venv/bin/activate
Run pip install poetry
Run poetry install
Run ./kubeconfig_plugin.py -f kubeconfig_example.yaml to run the plugin
Image Building
You can change this plugin's image version tag in
.github/workflows/carpenter.yaml by editing the
IMAGE_TAG variable, and pushing that change to the
branch designated in that workflow.
kubeconfig plugin (kubeconfig)
Inputs a kubeconfig, parses it and extracts the kubernetes cluster details
$ poetry buildBuilding arcaflow-plugin-kubeconfig (0.1.0)No file/folder found for package arcaflow-plugin-kubeconfig
and
$ python -m build* Creating virtualenv isolated environment...* Installing packages in isolated environment... (poetry-core)* Getting dependencies for sdist...* Building sdist...Traceback (most recent call last): File "~/upstream/arcaflow-plugin-kubeconfig/venv/lib64/python3.9/site-packages/pep517/in_process/_in_process.py", line 351, in <module> main() File "~/upstream/arcaflow-plugin-kubeconfig/venv/lib64/python3.9/site-packages/pep517/in_process/_in_process.py", line 333, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "~/upstream/arcaflow-plugin-kubeconfig/venv/lib64/python3.9/site-packages/pep517/in_process/_in_process.py", line 302, in build_sdist return backend.build_sdist(sdist_directory, config_settings) File "/tmp/build-env-7zcvow2i/lib/python3.9/site-packages/poetry/core/masonry/api.py", line 76, in build_sdist path = SdistBuilder(poetry).build(Path(sdist_directory)) File "/tmp/build-env-7zcvow2i/lib/python3.9/site-packages/poetry/core/masonry/builders/builder.py", line 83, in __init__ self._module = Module( File "/tmp/build-env-7zcvow2i/lib/python3.9/site-packages/poetry/core/masonry/utils/module.py", line 69, in __init__ raise ModuleOrPackageNotFound(poetry.core.masonry.utils.module.ModuleOrPackageNotFound: No file/folder found for package arcaflow-plugin-kubeconfigERROR Backend subprocess exited when trying to invoke build_sdist
building support is needed in order to publish to pypi.