nyl 0.7.2__tar.gz → 0.8.1__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.
- nyl-0.8.1/.changelog/0.8.0.toml +7 -0
- nyl-0.8.1/.changelog/0.8.1.toml +7 -0
- {nyl-0.7.2 → nyl-0.8.1}/PKG-INFO +1 -1
- {nyl-0.7.2 → nyl-0.8.1}/pyproject.toml +1 -1
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/commands/template.py +11 -2
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/generator/__init__.py +2 -2
- {nyl-0.7.2 → nyl-0.8.1}/uv.lock +1 -1
- {nyl-0.7.2 → nyl-0.8.1}/.changelog/0.7.0.toml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/.changelog/0.7.1.toml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/.changelog/0.7.2.toml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/.envrc +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/.github/workflows/docker.yaml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/.github/workflows/docs.yaml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/.github/workflows/python.yaml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/.github/workflows/update-flake-lock.yaml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/.gitignore +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/README.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/argocd-cmp/Dockerfile +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/argocd-cmp/README.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/argocd-cmp/plugin.yaml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/argocd-with-nyl/.envrc +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/argocd-with-nyl/.secrets.yaml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/argocd-with-nyl/.sops.yaml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/argocd-with-nyl/README.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/argocd-with-nyl/argocd.yaml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/argocd-with-nyl/nyl-project.yaml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/argocd-with-nyl/nyl-secrets.yaml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/changelog.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/index.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/applysets.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/argocd-plugin.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/cluster-connectivity.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/configuration/environment.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/configuration/profiles.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/configuration/projects.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/configuration/secrets.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/configuration-api/profiles.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/configuration-api/secrets.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/glossary.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/templating/basics.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/templating/components.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/templating/inlining/helmcharts.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/templating/inlining/overview.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/templating/inlining/postprocessor.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/content/reference/templating/secrets.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/mkdocs.yml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/pyproject.toml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/docs/uv.lock +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/example/manifests/postgres.yaml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/example/nyl-profiles.yaml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/example/nyl-secrets.yaml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/example/secrets.yaml +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/flake.lock +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/flake.nix +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/nix/uv.nix +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/renovate.json +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/kubernetes/README.md +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/kubernetes/__init__.pyi +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/kubernetes/dynamic/__init__.pyi +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/kubernetes/dynamic/client.pyi +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/kubernetes/dynamic/discovery.pyi +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/kubernetes/dynamic/exceptions.pyi +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/kubernetes/dynamic/resource.pyi +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/kubernetes/watch/__init__.pyi +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/kubernetes/watch/watch.pyi +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/__init__.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/commands/__init__.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/commands/add.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/commands/argocd.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/commands/crds.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/commands/new.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/commands/profile.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/commands/run.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/commands/secrets.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/commands/tools/__init__.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/commands/tools/bcrypt.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/commands/tools/sops.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/commands/tun.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/generator/components.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/generator/dispatch.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/generator/dispatch_test.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/generator/helmchart.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/generator/statefulsecret.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/profiles/__init__.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/profiles/config.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/profiles/config_test.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/profiles/kubeconfig.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/profiles/tunnel.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/project/config.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/resources/__init__.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/resources/applyset.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/resources/applyset_test.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/resources/helmchart.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/resources/helmchart_test.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/resources/placeholder.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/resources/postprocessor.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/resources/postprocessor_test.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/resources/statefulsecret.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/secrets/__init__.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/secrets/config.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/secrets/config_test.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/secrets/kubernetes.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/secrets/null.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/secrets/sops.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/secrets/sops_test.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/templating.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/templating_test.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/tools/di.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/tools/fs.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/tools/fs_test.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/tools/kubectl.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/tools/kubernetes.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/tools/kvstore.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/tools/loads.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/tools/logging.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/tools/shell.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/tools/testing.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/tools/typer.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/tools/types.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/src/nyl/tools/yaml.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/tests/__init__.py +0 -0
- {nyl-0.7.2 → nyl-0.8.1}/tests/conftest.py +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
release-date = "2025-01-22"
|
|
2
|
+
|
|
3
|
+
[[entries]]
|
|
4
|
+
id = "9b3b0ac8-767d-4207-8f87-2ed578b73147"
|
|
5
|
+
type = "improvement"
|
|
6
|
+
description = "Further improve on #56 by populating the namespace of resources earlier than later (e.g. before the `HelmChart` gets rendered, instead of only applying it to the resources generated by the `HelmChart` at the end)."
|
|
7
|
+
author = "@NiklasRosenstein"
|
{nyl-0.7.2 → nyl-0.8.1}/PKG-INFO
RENAMED
|
@@ -210,12 +210,22 @@ def template(
|
|
|
210
210
|
for source in load_manifests(paths):
|
|
211
211
|
logger.opt(colors=True).info("Rendering manifests from <blue>{}</>.", source.file)
|
|
212
212
|
|
|
213
|
+
# Begin populating the default namespace to resources.
|
|
214
|
+
current_default_namespace = get_default_namespace_for_manifest(source, default_namespace)
|
|
215
|
+
populate_namespace_to_resources(source.manifests, current_default_namespace)
|
|
216
|
+
|
|
213
217
|
source.manifests = template_engine.evaluate(source.manifests)
|
|
214
218
|
if inline:
|
|
219
|
+
|
|
220
|
+
def new_generation(manifest: Manifest) -> Manifests:
|
|
221
|
+
manifests = template_engine.evaluate(Manifests([manifest]))
|
|
222
|
+
populate_namespace_to_resources(manifests, current_default_namespace)
|
|
223
|
+
return manifests
|
|
224
|
+
|
|
215
225
|
source.manifests = reconcile_generator(
|
|
216
226
|
generator,
|
|
217
227
|
source.manifests,
|
|
218
|
-
|
|
228
|
+
new_generation_callback=new_generation,
|
|
219
229
|
skip_resources=[PostProcessor],
|
|
220
230
|
)
|
|
221
231
|
|
|
@@ -242,7 +252,6 @@ def template(
|
|
|
242
252
|
applyset = ApplySet.load(manifest)
|
|
243
253
|
source.manifests.remove(manifest)
|
|
244
254
|
|
|
245
|
-
current_default_namespace = get_default_namespace_for_manifest(source, default_namespace)
|
|
246
255
|
if not applyset and project.config.settings.generate_applysets:
|
|
247
256
|
if not current_default_namespace:
|
|
248
257
|
logger.opt(colors=True).error(
|
|
@@ -37,7 +37,7 @@ class Generator(ABC, Generic[T]):
|
|
|
37
37
|
def reconcile_generator(
|
|
38
38
|
generator: Generator[Manifest],
|
|
39
39
|
manifests: Manifests,
|
|
40
|
-
|
|
40
|
+
new_generation_callback: Callable[[Manifest], Manifests],
|
|
41
41
|
skip_resources: Sequence[type[NylResource]] = (),
|
|
42
42
|
) -> Manifests:
|
|
43
43
|
"""
|
|
@@ -70,7 +70,7 @@ def reconcile_generator(
|
|
|
70
70
|
queue.append(resource)
|
|
71
71
|
else:
|
|
72
72
|
for manifest in generator.generate(resource):
|
|
73
|
-
queue.extend(
|
|
73
|
+
queue.extend(new_generation_callback(manifest))
|
|
74
74
|
loops += 1
|
|
75
75
|
|
|
76
76
|
return result
|
{nyl-0.7.2 → nyl-0.8.1}/uv.lock
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nyl-0.7.2 → nyl-0.8.1}/.envrc
RENAMED
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|