kubernator 1.0.20.dev20250518194115__py3-none-any.whl → 1.0.20.dev20250520010054__py3-none-any.whl

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.

Potentially problematic release.


This version of kubernator might be problematic. Click here for more details.

kubernator/__init__.py CHANGED
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- __version__ = "1.0.20.dev20250518194115"
19
+ __version__ = "1.0.20.dev20250520010054"
20
20
 
21
21
 
22
22
  def _main():
@@ -27,7 +27,7 @@ from shutil import which, copy
27
27
  from typing import Sequence
28
28
 
29
29
  import yaml
30
- from jsonschema import Draft7Validator, draft7_format_checker
30
+ from jsonschema import Draft7Validator
31
31
 
32
32
  from kubernator.api import (KubernatorPlugin, Globs, StripNL,
33
33
  scan_dir,
@@ -90,7 +90,7 @@ HELM_SCHEMA = {
90
90
 
91
91
  Draft7Validator.check_schema(HELM_SCHEMA)
92
92
  HELM_VALIDATOR_CLS = validator_with_defaults(Draft7Validator)
93
- HELM_VALIDATOR = HELM_VALIDATOR_CLS(HELM_SCHEMA, format_checker=draft7_format_checker)
93
+ HELM_VALIDATOR = HELM_VALIDATOR_CLS(HELM_SCHEMA, format_checker=Draft7Validator.FORMAT_CHECKER)
94
94
 
95
95
 
96
96
  class HelmPlugin(KubernatorPlugin):
@@ -29,11 +29,10 @@ from typing import Union, Optional
29
29
 
30
30
  import yaml
31
31
  from jsonschema._format import FormatChecker
32
- from jsonschema._types import int_types, str_types
33
- from jsonschema._validators import required
32
+ from jsonschema._keywords import required
34
33
  from jsonschema.exceptions import ValidationError
35
- from jsonschema.validators import extend, Draft7Validator, RefResolver
36
- from openapi_schema_validator import OAS30Validator
34
+ from jsonschema.validators import extend, Draft7Validator
35
+ from openapi_schema_validator import OAS31Validator
37
36
 
38
37
  from kubernator.api import load_file, FileType, load_remote_file, calling_frame_source
39
38
 
@@ -89,11 +88,11 @@ def is_integer(instance):
89
88
  # bool inherits from int, so ensure bools aren't reported as ints
90
89
  if isinstance(instance, bool):
91
90
  return False
92
- return isinstance(instance, int_types)
91
+ return isinstance(instance, int)
93
92
 
94
93
 
95
94
  def is_string(instance):
96
- return isinstance(instance, str_types)
95
+ return isinstance(instance, str)
97
96
 
98
97
 
99
98
  def type_validator(validator, data_type, instance, schema):
@@ -107,7 +106,7 @@ def type_validator(validator, data_type, instance, schema):
107
106
  yield ValidationError("%r is not of type %s" % (instance, data_type))
108
107
 
109
108
 
110
- K8SValidator = extend(OAS30Validator, validators={
109
+ K8SValidator = extend(OAS31Validator, validators={
111
110
  "type": type_validator,
112
111
  "required": required
113
112
  })
@@ -148,10 +147,6 @@ def check_int_or_string(value):
148
147
  return check_int32(value) if is_integer(value) else is_string(value)
149
148
 
150
149
 
151
- # def make_api_version(group, version):
152
- # return f"{group}/{version}" if group else version
153
-
154
-
155
150
  def to_group_and_version(api_version):
156
151
  group, _, version = api_version.partition("/")
157
152
  if not version:
@@ -663,10 +658,8 @@ class K8SResourcePluginMixin:
663
658
  yield error
664
659
  else:
665
660
  rdef = error
666
- # schema = ChainMap(manifest, self.resource_definitions_schema)
667
661
  k8s_validator = K8SValidator(rdef.schema,
668
- format_checker=k8s_format_checker,
669
- resolver=RefResolver.from_schema(self.resource_definitions_schema))
662
+ format_checker=k8s_format_checker)
670
663
  yield from k8s_validator.iter_errors(manifest)
671
664
 
672
665
  def _get_manifest_rdef(self, manifest):
@@ -744,6 +737,8 @@ class K8SResourcePluginMixin:
744
737
  rdef_paths[path] = actions
745
738
 
746
739
  for k, schema in k8s_def["definitions"].items():
740
+ # This short-circuits the resolution of the references to the top of the document
741
+ schema["definitions"] = k8s_def["definitions"]
747
742
  for key in k8s_resource_def_key(schema):
748
743
  for rdef in K8SResourceDef.from_manifest(key, schema, self.resource_paths):
749
744
  self.resource_definitions[key] = rdef
@@ -20,7 +20,7 @@ import logging
20
20
  from collections.abc import Mapping
21
21
  from pathlib import Path
22
22
 
23
- from jsonschema import Draft7Validator, draft7_format_checker
23
+ from jsonschema import Draft7Validator
24
24
 
25
25
  from kubernator.api import (KubernatorPlugin, Globs, scan_dir, load_file, FileType, calling_frame_source,
26
26
  validator_with_defaults, TemplateEngine, Template)
@@ -86,7 +86,7 @@ TEMPLATE_SCHEMA = {
86
86
 
87
87
  Draft7Validator.check_schema(TEMPLATE_SCHEMA)
88
88
  TEMPLATE_VALIDATOR_CLS: type[Draft7Validator] = validator_with_defaults(Draft7Validator)
89
- TEMPLATE_VALIDATOR: Draft7Validator = TEMPLATE_VALIDATOR_CLS(TEMPLATE_SCHEMA, format_checker=draft7_format_checker)
89
+ TEMPLATE_VALIDATOR: Draft7Validator = TEMPLATE_VALIDATOR_CLS(TEMPLATE_SCHEMA, format_checker=Draft7Validator.FORMAT_CHECKER)
90
90
 
91
91
 
92
92
  class TemplatePlugin(KubernatorPlugin):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kubernator
3
- Version: 1.0.20.dev20250518194115
3
+ Version: 1.0.20.dev20250520010054
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.
@@ -38,9 +38,9 @@ Requires-Dist: durationpy>=0.7
38
38
  Requires-Dist: gevent>=21.1.2
39
39
  Requires-Dist: jinja2~=3.1
40
40
  Requires-Dist: json-log-formatter~=0.3
41
- Requires-Dist: jsonpatch~=1.32
42
- Requires-Dist: jsonpath-ng~=1.6.1
43
- Requires-Dist: jsonschema<4.0
41
+ Requires-Dist: jsonpatch~=1.33
42
+ Requires-Dist: jsonpath-ng~=1.7.0
43
+ Requires-Dist: jsonschema~=4.23
44
44
  Requires-Dist: kubernetes~=32.0
45
45
  Requires-Dist: openapi-schema-validator~=0.1
46
46
  Requires-Dist: openapi-spec-validator~=0.3
@@ -1,5 +1,5 @@
1
1
  kubernator/LICENSE,sha256=wKKdOCMTCPQRV5gDkVLAsXX8qSnRJ5owk7yWPO1KZNo,11387
2
- kubernator/__init__.py,sha256=3I8NxAiSeKmmDgyNzoooHnO6JlQ6jMZq5KqCGjYos7M,933
2
+ kubernator/__init__.py,sha256=ivydfXghrndJH9DkXmi9vUK5oRwsDaxUPKsgZh-UYOQ,933
3
3
  kubernator/__main__.py,sha256=f0S60wgpLu--1UlOhzfWail-xt8zyIuODodX98_yPN0,707
4
4
  kubernator/_json_path.py,sha256=pjQKXxgbpQWETYBIrIuJZHgugF92IbEAM19AC7JUmAQ,3162
5
5
  kubernator/_k8s_client_patches.py,sha256=PEeWPInnW38NDyK7G24_Dmw-x7xHpN3vJWZeckdqgK0,76892
@@ -10,21 +10,21 @@ kubernator/proc.py,sha256=8YlgbppyHic_51fVTPD7OP8x5yuRuL8j1kThR8MJjNI,5119
10
10
  kubernator/plugins/__init__.py,sha256=h9TLYK8UFEi53ipZSZsTBjp0ljKhisWsgPpt_PkWrO8,670
11
11
  kubernator/plugins/awscli.py,sha256=S6X7-qFiaZ7NDVDl2Jg0t-ih9KAJ45cUjjzd5Qe93ZM,4252
12
12
  kubernator/plugins/eks.py,sha256=xe7vyPHNwuP8gEYDSzPyBkm-RkAtP64wCOqs9U5I7xI,2273
13
- kubernator/plugins/helm.py,sha256=8oa2LJoGd1-b9_e-PW2c5--zNaYZTykIFtgX0u5VHIw,11136
13
+ kubernator/plugins/helm.py,sha256=R5hrDDhQ8b5BYYswvxJaM9-KsHKWPBKqHVtTRa1eSuA,11122
14
14
  kubernator/plugins/istio.py,sha256=oERwbVtIk9vMJp_miBXK3-XJKF6SDbh6PPe0p3QIekY,14924
15
15
  kubernator/plugins/k8s.py,sha256=Zj3q_bUmbOADfjSHy2X0BhgrbXuH-fM8Vq75sYFy0nE,24496
16
- kubernator/plugins/k8s_api.py,sha256=w2aB7CU0rPqRgzhI5mLMJUUSpWlJGCsX_bHl4SjfzM8,27594
16
+ kubernator/plugins/k8s_api.py,sha256=PDa7MB9q3WMm_9tr8T6LY_ojrHpyGYiNTlvBZinbgFY,27379
17
17
  kubernator/plugins/kops.py,sha256=QsrQJUF6wGJo2QRVqP92pG5vmOTYQIc25PD_DWCzrAA,9635
18
18
  kubernator/plugins/kubeconfig.py,sha256=uwtHmF2I6LiTPrC3M88G5SfYxDWtuh0MqcMfrHHoNRA,2178
19
19
  kubernator/plugins/kubectl.py,sha256=IgNghW1Q6s8V2o08eNY2NWfkkdV9Z6X2A3YFQinFr4g,4028
20
20
  kubernator/plugins/minikube.py,sha256=FFGW8Rkap4CPEydEgxXhIuK3A263khjli0adC5j09MA,10393
21
- kubernator/plugins/template.py,sha256=KEiPfI7TbYXmF4a8ATWuFhxxWbcASHttFM_ekYEZ8Ps,8371
21
+ kubernator/plugins/template.py,sha256=542nyS4ZNgdwJHEoIA5aLP1d4C312ydd7sPM9ZFbHuI,8357
22
22
  kubernator/plugins/terraform.py,sha256=a1MPl9G8Rznjd28uMRdYWrjpFDLlFAVmLFH4hFEsMsQ,5285
23
23
  kubernator/plugins/terragrunt.py,sha256=-qN8tTqPUXJ9O7CEiJVUB0GSUQU3DUTkv-aWdIIsm7Q,5051
24
- kubernator-1.0.20.dev20250518194115.dist-info/METADATA,sha256=4EpIoRQfCd8qIruzqksTd6DwfElkEN9LswQWSotwswE,10867
25
- kubernator-1.0.20.dev20250518194115.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
26
- kubernator-1.0.20.dev20250518194115.dist-info/entry_points.txt,sha256=IWDtHzyTleRqDSuVRXEr5GImrI7z_kh21t5DWZ8ldcQ,47
27
- kubernator-1.0.20.dev20250518194115.dist-info/namespace_packages.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
28
- kubernator-1.0.20.dev20250518194115.dist-info/top_level.txt,sha256=_z1CxWeKMI55ckf2vC8HqjbCn_E2Y_P5RdrhE_QWcIs,11
29
- kubernator-1.0.20.dev20250518194115.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
30
- kubernator-1.0.20.dev20250518194115.dist-info/RECORD,,
24
+ kubernator-1.0.20.dev20250520010054.dist-info/METADATA,sha256=1D3wxl0e8OzBZlR5EKQFpv58Om4h6aURQNve7QIqbU8,10869
25
+ kubernator-1.0.20.dev20250520010054.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
26
+ kubernator-1.0.20.dev20250520010054.dist-info/entry_points.txt,sha256=IWDtHzyTleRqDSuVRXEr5GImrI7z_kh21t5DWZ8ldcQ,47
27
+ kubernator-1.0.20.dev20250520010054.dist-info/namespace_packages.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
28
+ kubernator-1.0.20.dev20250520010054.dist-info/top_level.txt,sha256=_z1CxWeKMI55ckf2vC8HqjbCn_E2Y_P5RdrhE_QWcIs,11
29
+ kubernator-1.0.20.dev20250520010054.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
30
+ kubernator-1.0.20.dev20250520010054.dist-info/RECORD,,