nyl 0.10.2__tar.gz → 0.10.3__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.10.3/.changelog/0.10.3.toml +13 -0
- {nyl-0.10.2 → nyl-0.10.3}/PKG-INFO +1 -1
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/changelog.md +11 -0
- {nyl-0.10.2 → nyl-0.10.3}/pyproject.toml +1 -1
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/commands/__init__.py +4 -1
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/commands/template.py +2 -1
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/kubernetes.py +14 -0
- {nyl-0.10.2 → nyl-0.10.3}/uv.lock +1 -1
- {nyl-0.10.2 → nyl-0.10.3}/.changelog/0.10.0.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.changelog/0.10.1.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.changelog/0.10.2.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.changelog/0.7.0.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.changelog/0.7.1.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.changelog/0.7.2.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.changelog/0.8.0.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.changelog/0.8.1.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.changelog/0.9.0.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.changelog/0.9.1.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.changelog/0.9.2.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.changelog/0.9.3.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.changelog/0.9.4.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.envrc +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.github/workflows/docker.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.github/workflows/docs.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.github/workflows/python.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.github/workflows/update-flake-lock.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/.gitignore +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/README.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/argocd-cmp/Dockerfile +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/argocd-cmp/README.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/argocd-cmp/plugin.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/argocd-with-nyl/.envrc +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/argocd-with-nyl/.secrets.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/argocd-with-nyl/.sops.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/argocd-with-nyl/README.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/argocd-with-nyl/argocd.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/argocd-with-nyl/nyl-project.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/argocd-with-nyl/nyl-secrets.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/index.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/applysets.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/argocd-plugin.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/cluster-connectivity.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/configuration/environment.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/configuration/profiles.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/configuration/projects.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/configuration/secrets.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/configuration-api/profiles.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/configuration-api/secrets.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/glossary.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/templating/basics.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/templating/components.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/templating/inlining/helmcharts.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/templating/inlining/overview.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/templating/inlining/postprocessor.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/templating/locals.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/content/reference/templating/secrets.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/mkdocs.yml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/pyproject.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/docs/uv.lock +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/example/manifests/postgres.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/example/nyl-profiles.toml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/example/nyl-profiles.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/example/nyl-secrets.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/example/secrets.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/flake.lock +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/flake.nix +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/nix/uv.nix +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/renovate.json +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/kubernetes/README.md +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/kubernetes/__init__.pyi +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/kubernetes/dynamic/__init__.pyi +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/kubernetes/dynamic/client.pyi +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/kubernetes/dynamic/discovery.pyi +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/kubernetes/dynamic/exceptions.pyi +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/kubernetes/dynamic/resource.pyi +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/kubernetes/watch/__init__.pyi +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/kubernetes/watch/watch.pyi +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/__init__.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/commands/add.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/commands/crds.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/commands/new.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/commands/profile.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/commands/run.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/commands/secrets.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/commands/tools/__init__.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/commands/tools/bcrypt.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/commands/tools/sops.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/commands/tun.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/daemon.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/generator/__init__.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/generator/components.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/generator/dispatch.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/generator/dispatch_test.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/generator/helmchart.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/generator/helmchart_test.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/generator/statefulsecret.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/profiles/__init__.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/profiles/config.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/profiles/config_test.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/profiles/kubeconfig.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/profiles/tunnel.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/project/config.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/resources/__init__.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/resources/applyset.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/resources/applyset_test.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/resources/helmchart.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/resources/helmchart_test.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/resources/placeholder.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/resources/postprocessor.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/resources/postprocessor_test.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/resources/statefulsecret.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/secrets/__init__.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/secrets/config.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/secrets/config_test.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/secrets/kubernetes.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/secrets/null.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/secrets/sops.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/secrets/sops_test.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/templating.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/templating_test.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/di.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/fs.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/fs_test.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/kubectl.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/kvstore.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/loads.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/logging.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/pyroscope.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/shell.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/testing.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/typer.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/types.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/url.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/nyl/tools/yaml.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/src/pyroscope/__init__.pyi +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/testdata/helm-test-chart/Chart.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/testdata/helm-test-chart/templates/sa.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/testdata/helm-test-chart/values.yaml +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/tests/__init__.py +0 -0
- {nyl-0.10.2 → nyl-0.10.3}/tests/conftest.py +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
release-date = "2025-05-08"
|
|
2
|
+
|
|
3
|
+
[[entries]]
|
|
4
|
+
id = "67d4932f-0e84-4299-90ae-333cf7774ee0"
|
|
5
|
+
type = "improvement"
|
|
6
|
+
description = "Further improve filtering of env vars that start with ARGOCD_ but are Kubernetes-specific"
|
|
7
|
+
author = "@NiklasRosenstein"
|
|
8
|
+
|
|
9
|
+
[[entries]]
|
|
10
|
+
id = "5b794574-bca0-4160-b2ff-3f5d68e296a9"
|
|
11
|
+
type = "improvement"
|
|
12
|
+
description = "Automatically drop empty `.metadata.labels` fields from resources generated with `nyl template` to prevent resources with such labels to immediately be `OutOfSync` after apply in ArgoCD"
|
|
13
|
+
author = "@NiklasRosenstein"
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 0.10.3 (2025-05-08)
|
|
2
|
+
|
|
3
|
+
<table><tr><th>Type</th><th>Description</th><th>PR</th><th>Issues</th><th>Author</th></tr>
|
|
4
|
+
<tr><td>Improvement</td><td>
|
|
5
|
+
|
|
6
|
+
Further improve filtering of env vars that start with ARGOCD_ but are Kubernetes-specific</td><td></td><td></td><td>@NiklasRosenstein</td></tr>
|
|
7
|
+
<tr><td>Improvement</td><td>
|
|
8
|
+
|
|
9
|
+
Automatically drop empty `.metadata.labels` fields from resources generated with `nyl template` to prevent resources with such labels to immediately be `OutOfSync` after apply in ArgoCD</td><td></td><td></td><td>@NiklasRosenstein</td></tr>
|
|
10
|
+
</table>
|
|
11
|
+
|
|
1
12
|
## 0.10.2 (2025-05-08)
|
|
2
13
|
|
|
3
14
|
<table><tr><th>Type</th><th>Description</th><th>PR</th><th>Issues</th><th>Author</th></tr>
|
|
@@ -88,7 +88,10 @@ def _callback(
|
|
|
88
88
|
for key, value in os.environ.items():
|
|
89
89
|
if (
|
|
90
90
|
# Keep ARGOCD_ environment variables but filter out those that are likely set by Kubernetes.
|
|
91
|
-
(
|
|
91
|
+
(
|
|
92
|
+
key.startswith("ARGOCD_")
|
|
93
|
+
and not any(x in key for x in ["_PORT", "_PROTO", "_SERVER", "_HOST", "_SERVICE", "_TCP", "_UDP"])
|
|
94
|
+
)
|
|
92
95
|
or key.startswith("NYL_")
|
|
93
96
|
or key.startswith("KUBE_")
|
|
94
97
|
):
|
|
@@ -27,7 +27,7 @@ from nyl.secrets.config import SecretsConfig
|
|
|
27
27
|
from nyl.templating import NylTemplateEngine
|
|
28
28
|
from nyl.tools import yaml
|
|
29
29
|
from nyl.tools.kubectl import Kubectl
|
|
30
|
-
from nyl.tools.kubernetes import populate_namespace_to_resources
|
|
30
|
+
from nyl.tools.kubernetes import drop_empty_metadata_labels, populate_namespace_to_resources
|
|
31
31
|
from nyl.tools.logging import lazy_str
|
|
32
32
|
from nyl.tools.types import Resource, ResourceList
|
|
33
33
|
|
|
@@ -365,6 +365,7 @@ def template(
|
|
|
365
365
|
labels[APPLYSET_LABEL_PART_OF] = applyset.id
|
|
366
366
|
|
|
367
367
|
populate_namespace_to_resources(source.resources, current_default_namespace)
|
|
368
|
+
drop_empty_metadata_labels(source.resources)
|
|
368
369
|
|
|
369
370
|
# Now apply the post-processor.
|
|
370
371
|
source.resources = PostProcessor.apply_all(source.resources, post_processors, source.file)
|
|
@@ -51,6 +51,20 @@ def populate_namespace_to_resources(resources: list[Resource], namespace: str) -
|
|
|
51
51
|
resource["metadata"]["namespace"] = namespace
|
|
52
52
|
|
|
53
53
|
|
|
54
|
+
def drop_empty_metadata_labels(resources: list[Resource]) -> None:
|
|
55
|
+
"""
|
|
56
|
+
Drop the `metadata.labels` field from all resources that have it but are empty.
|
|
57
|
+
|
|
58
|
+
This gets applied to resources after templating as it can cause the resources to be OutOfSync immediately
|
|
59
|
+
after apply as the Kubernetes API stores the empty labels as `null` instead of `{}`.
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
for resource in resources:
|
|
63
|
+
if "metadata" in resource and "labels" in resource["metadata"]:
|
|
64
|
+
if not resource["metadata"]["labels"]:
|
|
65
|
+
del resource["metadata"]["labels"]
|
|
66
|
+
|
|
67
|
+
|
|
54
68
|
def is_cluster_scoped_resource(manifest: Resource) -> bool:
|
|
55
69
|
"""
|
|
56
70
|
Check if a manifest is a cluster scoped resource.
|
|
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
|
{nyl-0.10.2 → nyl-0.10.3}/.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|