kubernator 1.0.20.dev20250520010054__tar.gz → 1.0.21__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/PKG-INFO +4 -4
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/__init__.py +1 -1
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/api.py +36 -6
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/app.py +7 -3
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/plugins/k8s.py +1 -1
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/plugins/minikube.py +10 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/proc.py +24 -2
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator.egg-info/PKG-INFO +4 -4
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator.egg-info/requires.txt +1 -1
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/setup.py +4 -4
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/MANIFEST.in +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/LICENSE +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/__main__.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/_json_path.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/_k8s_client_patches.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/merge.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/plugins/__init__.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/plugins/awscli.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/plugins/eks.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/plugins/helm.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/plugins/istio.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/plugins/k8s_api.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/plugins/kops.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/plugins/kubeconfig.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/plugins/kubectl.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/plugins/template.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/plugins/terraform.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator/plugins/terragrunt.py +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator.egg-info/SOURCES.txt +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator.egg-info/dependency_links.txt +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator.egg-info/entry_points.txt +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator.egg-info/namespace_packages.txt +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator.egg-info/top_level.txt +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator.egg-info/zip-safe +0 -0
- {kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/setup.cfg +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kubernator
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.21
|
|
4
4
|
Summary: Kubernator is the a pluggable framework for K8S provisioning
|
|
5
5
|
Home-page: https://github.com/karellen/kubernator
|
|
6
6
|
Author: Express Systems USA, Inc.
|
|
7
7
|
Author-email:
|
|
8
8
|
Maintainer: Karellen, Inc., Arcadiy Ivanov
|
|
9
9
|
Maintainer-email: supervisor@karellen.co,arcadiy@karellen.co
|
|
10
|
-
License: Apache
|
|
10
|
+
License: Apache-2.0
|
|
11
11
|
Project-URL: Bug Tracker, https://github.com/karellen/kubernator/issues
|
|
12
12
|
Project-URL: Documentation, https://github.com/karellen/kubernator/
|
|
13
13
|
Project-URL: Source Code, https://github.com/karellen/kubernator/
|
|
14
14
|
Keywords: kubernetes k8s kube top provisioning kOps terraform tf AWS
|
|
15
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
21
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
22
22
|
Classifier: Operating System :: POSIX
|
|
23
23
|
Classifier: Operating System :: POSIX :: Linux
|
|
@@ -45,7 +45,7 @@ Requires-Dist: kubernetes~=32.0
|
|
|
45
45
|
Requires-Dist: openapi-schema-validator~=0.1
|
|
46
46
|
Requires-Dist: openapi-spec-validator~=0.3
|
|
47
47
|
Requires-Dist: platformdirs~=4.2
|
|
48
|
-
Requires-Dist: requests
|
|
48
|
+
Requires-Dist: requests>=2.31.0
|
|
49
49
|
Dynamic: author
|
|
50
50
|
Dynamic: classifier
|
|
51
51
|
Dynamic: description
|
|
@@ -768,7 +768,8 @@ class KubernatorPlugin:
|
|
|
768
768
|
pass
|
|
769
769
|
|
|
770
770
|
|
|
771
|
-
def install_python_k8s_client(run, package_major, logger, logger_stdout, logger_stderr, disable_patching
|
|
771
|
+
def install_python_k8s_client(run, package_major, logger, logger_stdout, logger_stderr, disable_patching,
|
|
772
|
+
fallback=False):
|
|
772
773
|
cache_dir = get_cache_dir("python")
|
|
773
774
|
package_major_dir = cache_dir / str(package_major)
|
|
774
775
|
package_major_dir_str = str(package_major_dir)
|
|
@@ -780,14 +781,43 @@ def install_python_k8s_client(run, package_major, logger, logger_stdout, logger_
|
|
|
780
781
|
str(package_major), package_major_dir)
|
|
781
782
|
rmtree(package_major_dir)
|
|
782
783
|
|
|
783
|
-
if not package_major_dir.exists():
|
|
784
|
+
if not package_major_dir.exists() or not len(os.listdir(package_major_dir)):
|
|
784
785
|
package_major_dir.mkdir(parents=True, exist_ok=True)
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
786
|
+
try:
|
|
787
|
+
run([sys.executable, "-m", "pip", "install", "--no-deps", "--no-input",
|
|
788
|
+
"--root-user-action=ignore", "--break-system-packages", "--disable-pip-version-check",
|
|
789
|
+
"--target", package_major_dir_str, f"kubernetes>={package_major!s}dev0,<{int(package_major) + 1!s}"],
|
|
790
|
+
logger_stdout, logger_stderr)
|
|
791
|
+
except CalledProcessError as e:
|
|
792
|
+
if not fallback and "No matching distribution found for" in e.stderr:
|
|
793
|
+
logger.warning("Kubernetes Client %s (%s) failed to install because the version wasn't found. "
|
|
794
|
+
"Falling back to a client of the previous version - %s",
|
|
795
|
+
str(package_major), package_major_dir, int(package_major) - 1)
|
|
796
|
+
return install_python_k8s_client(run,
|
|
797
|
+
int(package_major) - 1,
|
|
798
|
+
logger,
|
|
799
|
+
logger_stdout,
|
|
800
|
+
logger_stderr,
|
|
801
|
+
disable_patching,
|
|
802
|
+
fallback=True)
|
|
803
|
+
else:
|
|
804
|
+
raise
|
|
789
805
|
|
|
790
806
|
if not patch_indicator.exists() and not disable_patching:
|
|
807
|
+
if not fallback and not len(os.listdir(package_major_dir)):
|
|
808
|
+
# Directory is empty
|
|
809
|
+
logger.warning("Kubernetes Client %s (%s) directory is empty - the client was not installed. "
|
|
810
|
+
"Falling back to a client of the previous version - %s",
|
|
811
|
+
str(package_major), package_major_dir, int(package_major) - 1)
|
|
812
|
+
|
|
813
|
+
return install_python_k8s_client(run,
|
|
814
|
+
int(package_major) - 1,
|
|
815
|
+
logger,
|
|
816
|
+
logger_stdout,
|
|
817
|
+
logger_stderr,
|
|
818
|
+
disable_patching,
|
|
819
|
+
fallback=True)
|
|
820
|
+
|
|
791
821
|
for patch_text, target_file, skip_if_found, min_version, max_version, name in (
|
|
792
822
|
URLLIB_HEADERS_PATCH, CUSTOM_OBJECT_PATCH_23, CUSTOM_OBJECT_PATCH_25):
|
|
793
823
|
patch_target = package_major_dir / target_file
|
|
@@ -35,7 +35,7 @@ import kubernator
|
|
|
35
35
|
from kubernator.api import (KubernatorPlugin, Globs, scan_dir, PropertyDict, config_as_dict, config_parent,
|
|
36
36
|
download_remote_file, load_remote_file, Repository, StripNL, jp, get_app_cache_dir,
|
|
37
37
|
get_cache_dir, install_python_k8s_client)
|
|
38
|
-
from kubernator.proc import run, run_capturing_out
|
|
38
|
+
from kubernator.proc import run, run_capturing_out, run_pass_through_capturing
|
|
39
39
|
|
|
40
40
|
TRACE = 5
|
|
41
41
|
|
|
@@ -215,7 +215,7 @@ class App(KubernatorPlugin):
|
|
|
215
215
|
self.context = self._top_dir_context
|
|
216
216
|
context = self.context
|
|
217
217
|
self._run_handlers(KubernatorPlugin.handle_shutdown, True, context, None)
|
|
218
|
-
except:
|
|
218
|
+
except: # noqa E722
|
|
219
219
|
raise
|
|
220
220
|
else:
|
|
221
221
|
self.context = self._top_dir_context
|
|
@@ -348,6 +348,7 @@ class App(KubernatorPlugin):
|
|
|
348
348
|
jp=jp,
|
|
349
349
|
run=self._run,
|
|
350
350
|
run_capturing_out=self._run_capturing_out,
|
|
351
|
+
run_passthrough_capturing=self._run_passthrough_capturing,
|
|
351
352
|
repository=self.repository,
|
|
352
353
|
StripNL=StripNL,
|
|
353
354
|
default_includes=Globs(["*"], True),
|
|
@@ -465,6 +466,9 @@ class App(KubernatorPlugin):
|
|
|
465
466
|
def _run_capturing_out(self, *args, **kwargs):
|
|
466
467
|
return run_capturing_out(*args, **kwargs)
|
|
467
468
|
|
|
469
|
+
def _run_passthrough_capturing(self, *args, **kwargs):
|
|
470
|
+
return run_pass_through_capturing(*args, **kwargs)
|
|
471
|
+
|
|
468
472
|
def __repr__(self):
|
|
469
473
|
return "Kubernator"
|
|
470
474
|
|
|
@@ -493,7 +497,7 @@ def pre_cache_k8s_clients(*versions, disable_patching=False):
|
|
|
493
497
|
for v in versions:
|
|
494
498
|
logger.info("Caching K8S client library ~=v%s.0%s...", v,
|
|
495
499
|
" (no patches)" if disable_patching else "")
|
|
496
|
-
install_python_k8s_client(
|
|
500
|
+
install_python_k8s_client(run_pass_through_capturing, v, logger, stdout_logger, stderr_logger, disable_patching)
|
|
497
501
|
|
|
498
502
|
|
|
499
503
|
def main():
|
|
@@ -164,7 +164,7 @@ class KubernetesPlugin(KubernatorPlugin, K8SResourcePluginMixin):
|
|
|
164
164
|
|
|
165
165
|
logger.info("Using Kubernetes client version =~%s.0 for server version %s",
|
|
166
166
|
server_minor, ".".join(k8s.server_version))
|
|
167
|
-
pkg_dir = install_python_k8s_client(self.context.app.
|
|
167
|
+
pkg_dir = install_python_k8s_client(self.context.app.run_passthrough_capturing, server_minor, logger,
|
|
168
168
|
stdout_logger, stderr_logger, k8s.disable_client_patches)
|
|
169
169
|
|
|
170
170
|
modules_to_delete = []
|
|
@@ -35,6 +35,8 @@ proc_logger = logger.getChild("proc")
|
|
|
35
35
|
stdout_logger = StripNL(proc_logger.info)
|
|
36
36
|
stderr_logger = StripNL(proc_logger.warning)
|
|
37
37
|
|
|
38
|
+
MINIKUBE_MAX_VERSION_LEGACY = "1.36.0"
|
|
39
|
+
|
|
38
40
|
|
|
39
41
|
class MinikubePlugin(KubernatorPlugin):
|
|
40
42
|
logger = logger
|
|
@@ -99,9 +101,17 @@ class MinikubePlugin(KubernatorPlugin):
|
|
|
99
101
|
logger.critical(msg)
|
|
100
102
|
raise RuntimeError(msg)
|
|
101
103
|
|
|
104
|
+
k8s_version_tuple = tuple(map(int, k8s_version.split(".")))
|
|
105
|
+
|
|
102
106
|
if not minikube_version:
|
|
103
107
|
minikube_version = self.get_latest_minikube_version()
|
|
104
108
|
logger.info("No minikube version is specified, latest is %s", minikube_version)
|
|
109
|
+
if k8s_version_tuple < (1, 28, 0):
|
|
110
|
+
logger.info("While latest minikube version is %s, "
|
|
111
|
+
"the requested K8S version %s requires %s or earlier - choosing %s",
|
|
112
|
+
minikube_version, k8s_version, MINIKUBE_MAX_VERSION_LEGACY,
|
|
113
|
+
MINIKUBE_MAX_VERSION_LEGACY)
|
|
114
|
+
minikube_version = MINIKUBE_MAX_VERSION_LEGACY
|
|
105
115
|
|
|
106
116
|
minikube_dl_file, _ = context.app.download_remote_file(logger,
|
|
107
117
|
f"https://github.com/kubernetes/minikube/releases"
|
|
@@ -108,7 +108,7 @@ class ProcessRunner:
|
|
|
108
108
|
raise RuntimeError("not available")
|
|
109
109
|
return self._proc.stdin
|
|
110
110
|
|
|
111
|
-
def wait(self, fail=True, timeout=None, _out_func=None):
|
|
111
|
+
def wait(self, fail=True, timeout=None, _out_func=None, _stderr_func=None):
|
|
112
112
|
with Timeout(timeout, TimeoutExpired):
|
|
113
113
|
retcode = self._proc.wait()
|
|
114
114
|
if self._stdin_writer:
|
|
@@ -119,9 +119,12 @@ class ProcessRunner:
|
|
|
119
119
|
self._stderr_reader.join()
|
|
120
120
|
if fail and retcode:
|
|
121
121
|
output = None
|
|
122
|
+
stderr = None
|
|
122
123
|
if _out_func:
|
|
123
124
|
output = _out_func()
|
|
124
|
-
|
|
125
|
+
if _stderr_func:
|
|
126
|
+
stderr = _stderr_func()
|
|
127
|
+
raise CalledProcessError(retcode, self._safe_args, output=output, stderr=stderr)
|
|
125
128
|
return retcode
|
|
126
129
|
|
|
127
130
|
def terminate(self):
|
|
@@ -134,6 +137,25 @@ class ProcessRunner:
|
|
|
134
137
|
run = ProcessRunner
|
|
135
138
|
|
|
136
139
|
|
|
140
|
+
def run_pass_through_capturing(args, stdout_logger, stderr_logger, stdin=DEVNULL, *, safe_args=None,
|
|
141
|
+
universal_newlines=True, **kwargs):
|
|
142
|
+
out = StringIO(trimmed=False) if universal_newlines else BytesIO()
|
|
143
|
+
err = StringIO(trimmed=False) if universal_newlines else BytesIO()
|
|
144
|
+
|
|
145
|
+
def write_out(data):
|
|
146
|
+
out.write(data)
|
|
147
|
+
stdout_logger(data)
|
|
148
|
+
|
|
149
|
+
def write_err(data):
|
|
150
|
+
err.write(data)
|
|
151
|
+
stderr_logger(data)
|
|
152
|
+
|
|
153
|
+
proc = run(args, write_out, write_err, stdin, safe_args=safe_args, universal_newlines=universal_newlines,
|
|
154
|
+
**kwargs)
|
|
155
|
+
proc.wait(_out_func=lambda: out.getvalue(), _stderr_func=lambda: err.getvalue())
|
|
156
|
+
return out.getvalue(), err.getvalue()
|
|
157
|
+
|
|
158
|
+
|
|
137
159
|
def run_capturing_out(args, stderr_logger, stdin=DEVNULL, *, safe_args=None, universal_newlines=True, **kwargs):
|
|
138
160
|
out = StringIO(trimmed=False) if universal_newlines else BytesIO()
|
|
139
161
|
proc = run(args, out.write, stderr_logger, stdin, safe_args=safe_args, universal_newlines=universal_newlines,
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kubernator
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.21
|
|
4
4
|
Summary: Kubernator is the a pluggable framework for K8S provisioning
|
|
5
5
|
Home-page: https://github.com/karellen/kubernator
|
|
6
6
|
Author: Express Systems USA, Inc.
|
|
7
7
|
Author-email:
|
|
8
8
|
Maintainer: Karellen, Inc., Arcadiy Ivanov
|
|
9
9
|
Maintainer-email: supervisor@karellen.co,arcadiy@karellen.co
|
|
10
|
-
License: Apache
|
|
10
|
+
License: Apache-2.0
|
|
11
11
|
Project-URL: Bug Tracker, https://github.com/karellen/kubernator/issues
|
|
12
12
|
Project-URL: Documentation, https://github.com/karellen/kubernator/
|
|
13
13
|
Project-URL: Source Code, https://github.com/karellen/kubernator/
|
|
14
14
|
Keywords: kubernetes k8s kube top provisioning kOps terraform tf AWS
|
|
15
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
21
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
22
22
|
Classifier: Operating System :: POSIX
|
|
23
23
|
Classifier: Operating System :: POSIX :: Linux
|
|
@@ -45,7 +45,7 @@ Requires-Dist: kubernetes~=32.0
|
|
|
45
45
|
Requires-Dist: openapi-schema-validator~=0.1
|
|
46
46
|
Requires-Dist: openapi-spec-validator~=0.3
|
|
47
47
|
Requires-Dist: platformdirs~=4.2
|
|
48
|
-
Requires-Dist: requests
|
|
48
|
+
Requires-Dist: requests>=2.31.0
|
|
49
49
|
Dynamic: author
|
|
50
50
|
Dynamic: classifier
|
|
51
51
|
Dynamic: description
|
|
@@ -21,17 +21,17 @@ class install(_install):
|
|
|
21
21
|
if __name__ == '__main__':
|
|
22
22
|
setup(
|
|
23
23
|
name = 'kubernator',
|
|
24
|
-
version = '1.0.
|
|
24
|
+
version = '1.0.21',
|
|
25
25
|
description = 'Kubernator is the a pluggable framework for K8S provisioning',
|
|
26
26
|
long_description = '# Kubernator\n\nKubernator™ (Ktor™) is an integrated solution for the Kubernetes state management. It operates on directories,\nprocessing their content via a collection of plugins, generating Kubernetes resources in the process, validating them,\ntransforming them and then applying against the Kubernetes cluster.\n\n[](https://gitter.im/karellen/Lobby)\n[](https://github.com/karellen/kubernator/actions/workflows/kubernator.yml)\n[](https://coveralls.io/r/karellen/kubernator?branch=master)\n\n[](https://pypi.org/project/kubernator/)\n[](https://pypi.org/project/kubernator/)\n[](https://pypi.org/project/kubernator/)\n[](https://pypi.org/project/kubernator/)\n[](https://pypi.org/project/kubernator/)\n\n## Notices\n\n### Beta Software\n\nWhile fully functional in the current state and used in production, this software is in **BETA**. A lot of things\nare expected to change rapidly, including main APIs, initialization procedures and some core features. Documentation at\nthis stage is basically non-existent.\n\n### License\n\nThe product is licensed under the Apache License, Version 2.0. Please see LICENSE for further details.\n\n### Warranties and Liability\n\nKubernator and its plugins are provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\nexpress or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,\nMERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of\nusing or redistributing Kubernator and assume any risks associated with doing so.\n\n### Trademarks\n\n"Kubernator" and "Ktor" are trademarks or registered trademarks of Express Systems USA, Inc and Karellen, Inc. All other\ntrademarks are property of their respective owners.\n\n## Problem Statement\n\n## Solution\n\n## Using Kubernator with Docker\n\nA simple example is as follows:\n```\n$ docker run --mount type=bind,source="$(pwd)",target=/root,readonly -t ghcr.io/karellen/kubernator:latest\n```\n\n## Using Kubernator on MacOS\n\n```\n$ brew install python3.11\n$ pip3.11 install \'kubernator~=1.0.9\'\n$ kubernator --version\n```\n\nPlease note, that some plugins (e.g. `awscli`, `eks`) may require additional volume mounts or environmental\nvariables to be passed for credentials and other external configuration.\n\n## Mode of Operation\n\nKubernator is a command line utility. Upon startup and processing of the command line arguments and initializing\nlogging, Kubernator initializes plugins. Current plugins include:\n\n0. Kubernator App\n1. Terraform\n2. kOps\n3. Kubernetes\n4. Helm\n5. Template\n\nThe order of initialization matters as it\'s the order the plugin handlers are executed!\n\nThe entire application operates in the following stages by invoking each plugin\'s stage handler in sequence:\n\n1. Plugin Init Stage\n2. Pre-start script (if specified)\n3. Plugin Start Stage\n4. For each directory in the pipeline:\n 1. Plugin Before Directory Stage\n 2. If `.kubernator.py` is present in the directory:\n 1. Plugin Before Script Stage\n 2. `.kubernator.py` script\n 3. Plugin After Script Stage\n 3. Plugin After Directory Stage\n5. Plugin End Stage\n\nEach plugin individually plays a specific role and performs a specific function which will be described in a later\nsection.\n\n## State/Context\n\nThere is a global state that is carried through as the application is running. It is a hierarchy of objects (`context`)\nthat follows the parent-child relationship as the application traverses the directory structure. For example, given the\ndirectory structure `/a/b`, `/a/c`, and `/a/c/d` any value of the context set or modified in context scoped to\ndirectory `/a` is visible in directories `/a/b`, `/a/c` and `/a/c/d`, while the same modified or set in `/a/b` is only\nvisible there, while one in `/a/c` is visible in `/a/c` and in `/a/c/d` but not `/a` or `/a/b`.\n\nAdditionally, there is a `context.globals` which is the top-most context that is available in all stages that are not\nassociated with the directory structure.\n\nNote, that in cases where the directory structure traversal moves to remote directories (that are actualized by local\ntemporary directories), such remote directory structure enters the context hierarchy as a child of the directory in\nwhich remote was registered.\n\nAlso note, that context carries not just data by references to essential functions.\n\nIn pre-start and `.kubernator.py` scripts the context is fully available as a global variable `ktor`.\n\n### Plugins\n\n#### Kubernator App Plugin\n\nThe role of the Kubernator App Plugin is to traverse the directory structure, expose essential functions through context\nand to run Kubernator scripts.\n\nIn the *After Directory Stage* Kubernator app scans the directories immediately available in the current, sorts them in\nthe alphabetic order, excludes those matching any of the patterns in `context.app.excludes` and then queues up the\nremaining directories in the order the match the patterns in `context.app.includes`.\n\nThus, for a directory content `/a/foo`, `/a/bal`, `/a/bar`, `/a/baz`, excludes `f*`, and includes `baz` and `*`, the\nresulting queue of directories to traverse will be `/a/baz`, `/a/bal`, `/a/bar`.\n\nNotice, that user can further interfere with processing order of the directory queue by asking Kubernator to walk\narbitrary paths, both local and remote.\n\n##### Context\n\n* `ktor.app.args`\n > Namespace containing command line argument values\n* `ktor.app.walk_local(*paths: Union[Path, str, bytes])`\n > Immediately schedules the paths to be traversed after the current directory by adding them to the queue\n > Relative path is relative to the current directory\n* `ktor.app.walk_remote(repo, *path_prefixes: Union[Path, str, bytes])`\n > Immediately schedules the path prefixes under the remote repo URL to be traversed after the current directory by\n > adding them to the queue. Only Git URLs are currently supported.\n > All absolute path prefixes are relativized based on the repository.\n* `ktor.app.repository_credentials_provider(func: Callable)`\n > Sets a repository credentials provider function `func` that sets/overwrites credentials for URLs being specified by\n > `walk_remote`. The callable `func` accepts a single argument containing a parsed URL in a form of tuple. The `func`\n > is expected to return a tuple of three elements representing URL schema, username and password. If the value should\n > not be changed it should be None. To convert from `git://repo.com/hello` to HTTPS authentication one should write\n > a function returning `("https", "username", "password")`. The best utility is achieved by logic that allows running\n > the plan both in CI and local environments using different authentication mechanics in different environments.\n\n#### Terraform\n\nThis is exclusively designed to pull the configuration options out of Terraform and to allow scripts and plugins to\nutilize that data.\n\n##### Context\n\n* `ktor.tf`\n > A dictionary containing the values from Terraform output\n\n#### Kops\n\n##### Context\n\n#### Kubernetes\n\n##### Context\n\n#### Helm\n\n##### Context\n\n#### Templates\n\n##### Context\n\n## Examples\n\n### Adding Remote Directory\n\n```python\nktor.app.repository_credentials_provider(lambda r: ("ssh", "git", None))\nktor.app.walk_remote("git://repo.example.com/org/project?ref=dev", "/project")\n```\n\n### Adding Local Directory\n\n```python\nktor.app.walk_local("/home/username/local-dir")\n```\n\n### Using Transformers\n\n```python\ndef remove_replicas(resources, r: "K8SResource"):\n if (r.group == "apps" and r.kind in ("StatefulSet", "Deployment")\n and "replicas" in r.manifest["spec"]):\n logger.warning("Resource %s in %s contains `replica` specification that will be removed. Use HPA!!!",\n r, r.source)\n del r.manifest["spec"]["replicas"]\n\n\nktor.k8s.add_transformer(remove_replicas)\n```\n',
|
|
27
27
|
long_description_content_type = 'text/markdown',
|
|
28
28
|
classifiers = [
|
|
29
|
-
'License :: OSI Approved :: Apache Software License',
|
|
30
29
|
'Programming Language :: Python :: 3.9',
|
|
31
30
|
'Programming Language :: Python :: 3.10',
|
|
32
31
|
'Programming Language :: Python :: 3.11',
|
|
33
32
|
'Programming Language :: Python :: 3.12',
|
|
34
33
|
'Programming Language :: Python :: 3.13',
|
|
34
|
+
'Programming Language :: Python :: 3.14',
|
|
35
35
|
'Operating System :: MacOS :: MacOS X',
|
|
36
36
|
'Operating System :: POSIX',
|
|
37
37
|
'Operating System :: POSIX :: Linux',
|
|
@@ -52,7 +52,7 @@ if __name__ == '__main__':
|
|
|
52
52
|
maintainer = 'Karellen, Inc., Arcadiy Ivanov',
|
|
53
53
|
maintainer_email = 'supervisor@karellen.co,arcadiy@karellen.co',
|
|
54
54
|
|
|
55
|
-
license = 'Apache
|
|
55
|
+
license = 'Apache-2.0',
|
|
56
56
|
|
|
57
57
|
url = 'https://github.com/karellen/kubernator',
|
|
58
58
|
project_urls = {
|
|
@@ -89,7 +89,7 @@ if __name__ == '__main__':
|
|
|
89
89
|
'openapi-schema-validator~=0.1',
|
|
90
90
|
'openapi-spec-validator~=0.3',
|
|
91
91
|
'platformdirs~=4.2',
|
|
92
|
-
'requests
|
|
92
|
+
'requests>=2.31.0'
|
|
93
93
|
],
|
|
94
94
|
dependency_links = [],
|
|
95
95
|
zip_safe = True,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{kubernator-1.0.20.dev20250520010054 → kubernator-1.0.21}/kubernator.egg-info/namespace_packages.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|