nyl 0.9.2__tar.gz → 0.9.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.9.3/.changelog/0.9.3.toml +7 -0
- {nyl-0.9.2 → nyl-0.9.3}/PKG-INFO +1 -1
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/changelog.md +8 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/configuration/environment.md +4 -0
- {nyl-0.9.2 → nyl-0.9.3}/pyproject.toml +1 -1
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/commands/__init__.py +0 -7
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/commands/template.py +11 -3
- {nyl-0.9.2 → nyl-0.9.3}/.changelog/0.7.0.toml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/.changelog/0.7.1.toml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/.changelog/0.7.2.toml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/.changelog/0.8.0.toml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/.changelog/0.8.1.toml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/.changelog/0.9.0.toml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/.changelog/0.9.1.toml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/.changelog/0.9.2.toml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/.envrc +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/.github/workflows/docker.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/.github/workflows/docs.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/.github/workflows/python.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/.github/workflows/update-flake-lock.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/.gitignore +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/DEPRECATION_NOTICE.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/README.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/argocd-cmp/Dockerfile +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/argocd-cmp/README.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/argocd-cmp/plugin.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/argocd-with-nyl/.envrc +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/argocd-with-nyl/.secrets.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/argocd-with-nyl/.sops.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/argocd-with-nyl/README.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/argocd-with-nyl/argocd.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/argocd-with-nyl/nyl-project.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/argocd-with-nyl/nyl-secrets.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/index.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/applysets.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/argocd-plugin.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/cluster-connectivity.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/configuration/profiles.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/configuration/projects.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/configuration/secrets.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/configuration-api/profiles.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/configuration-api/secrets.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/glossary.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/templating/basics.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/templating/components.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/templating/inlining/helmcharts.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/templating/inlining/overview.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/templating/inlining/postprocessor.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/templating/locals.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/content/reference/templating/secrets.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/mkdocs.yml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/pyproject.toml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/docs/uv.lock +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/example/manifests/postgres.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/example/nyl-profiles.toml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/example/nyl-profiles.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/example/nyl-secrets.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/example/secrets.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/flake.lock +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/flake.nix +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/nix/uv.nix +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/renovate.json +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/slap.toml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/kubernetes/README.md +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/kubernetes/__init__.pyi +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/kubernetes/dynamic/__init__.pyi +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/kubernetes/dynamic/client.pyi +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/kubernetes/dynamic/discovery.pyi +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/kubernetes/dynamic/exceptions.pyi +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/kubernetes/dynamic/resource.pyi +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/kubernetes/watch/__init__.pyi +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/kubernetes/watch/watch.pyi +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/__init__.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/commands/add.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/commands/argocd.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/commands/crds.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/commands/new.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/commands/profile.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/commands/run.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/commands/secrets.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/commands/tools/__init__.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/commands/tools/bcrypt.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/commands/tools/sops.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/commands/tun.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/generator/__init__.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/generator/components.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/generator/dispatch.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/generator/dispatch_test.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/generator/helmchart.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/generator/helmchart_test.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/generator/statefulsecret.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/profiles/__init__.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/profiles/config.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/profiles/config_test.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/profiles/kubeconfig.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/profiles/tunnel.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/project/config.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/resources/__init__.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/resources/applyset.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/resources/applyset_test.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/resources/helmchart.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/resources/helmchart_test.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/resources/placeholder.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/resources/postprocessor.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/resources/postprocessor_test.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/resources/statefulsecret.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/secrets/__init__.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/secrets/config.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/secrets/config_test.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/secrets/kubernetes.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/secrets/null.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/secrets/sops.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/secrets/sops_test.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/templating.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/templating_test.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/tools/di.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/tools/fs.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/tools/fs_test.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/tools/kubectl.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/tools/kubernetes.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/tools/kvstore.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/tools/loads.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/tools/logging.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/tools/shell.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/tools/testing.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/tools/typer.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/tools/types.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/src/nyl/tools/yaml.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/testdata/helm-test-chart/Chart.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/testdata/helm-test-chart/templates/sa.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/testdata/helm-test-chart/values.yaml +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/tests/__init__.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/tests/conftest.py +0 -0
- {nyl-0.9.2 → nyl-0.9.3}/uv.lock +0 -0
{nyl-0.9.2 → nyl-0.9.3}/PKG-INFO
RENAMED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 0.9.3 (2025-04-22)
|
|
2
|
+
|
|
3
|
+
<table><tr><th>Type</th><th>Description</th><th>PR</th><th>Issues</th><th>Author</th></tr>
|
|
4
|
+
<tr><td>Feature</td><td>
|
|
5
|
+
|
|
6
|
+
add support for `ARGOCD_ENV_NYL_PROFILE` environment variable</td><td></td><td></td><td>@NiklasRosenstein</td></tr>
|
|
7
|
+
</table>
|
|
8
|
+
|
|
1
9
|
## 0.9.2 (2025-04-22)
|
|
2
10
|
|
|
3
11
|
<table><tr><th>Type</th><th>Description</th><th>PR</th><th>Issues</th><th>Author</th></tr>
|
|
@@ -34,6 +34,10 @@ This page summarizes all environment variables that are used by Nyl.
|
|
|
34
34
|
> ArgoCD permits passing environment variables to CustomManagementPlugins. These get prefixed with `ARGOCD_ENV` to
|
|
35
35
|
> ensure that only specifically supported variables can be set. The following such variables are supported by Nyl:
|
|
36
36
|
|
|
37
|
+
- `ARGOCD_ENV_NYL_PROFILE` – Same as `NYL_PROFILE`, only that the profile's connection details will be ignored.
|
|
38
|
+
This should be used to pass the profile name to the Nyl plugin, as there is no way for it to automatically understand
|
|
39
|
+
what profile to use if the `default` profile does not apply. This variable is only recognized by the `nyl template`
|
|
40
|
+
command. The `NYL_PROFILE` variable takes precedence.
|
|
37
41
|
- `ARGOCD_ENV_NYL_ARGS` – Same as `NYL_ARGS`, but is taken into account after.
|
|
38
42
|
- `ARGOCD_ENV_NYL_CMP_TEMPLATE_INPUT` — This variable is only recognized by `nyl template` when the only positional argument
|
|
39
43
|
it receives is `.` (i.e. the current working directory). The variable should be a comma-separated list of filenames
|
|
@@ -20,7 +20,6 @@ from typer import Option, Typer
|
|
|
20
20
|
from kubernetes.client.api_client import ApiClient
|
|
21
21
|
from nyl import __version__
|
|
22
22
|
from nyl.profiles import ProfileManager
|
|
23
|
-
from nyl.profiles.config import Profile
|
|
24
23
|
from nyl.project.config import ProjectConfig
|
|
25
24
|
from nyl.secrets.config import SecretsConfig
|
|
26
25
|
from nyl.tools.di import DependenciesProvider
|
|
@@ -111,12 +110,6 @@ def _callback(
|
|
|
111
110
|
PROVIDER.get(ProfileManager), PROVIDER.get(ApiClientConfig).profile
|
|
112
111
|
),
|
|
113
112
|
)
|
|
114
|
-
PROVIDER.set_lazy(
|
|
115
|
-
Profile,
|
|
116
|
-
lambda: PROVIDER.get(ProfileManager).config.profiles[
|
|
117
|
-
PROVIDER.get(ApiClientConfig).profile or template.DEFAULT_PROFILE
|
|
118
|
-
],
|
|
119
|
-
)
|
|
120
113
|
|
|
121
114
|
|
|
122
115
|
@app.command()
|
|
@@ -16,7 +16,6 @@ from nyl.commands import PROVIDER, ApiClientConfig, app
|
|
|
16
16
|
from nyl.generator import reconcile_generator
|
|
17
17
|
from nyl.generator.dispatch import DispatchingGenerator
|
|
18
18
|
from nyl.profiles import ProfileManager
|
|
19
|
-
from nyl.profiles.config import Profile
|
|
20
19
|
from nyl.project.config import ProjectConfig
|
|
21
20
|
from nyl.resources import API_VERSION_INLINE, NylResource
|
|
22
21
|
from nyl.resources.applyset import APPLYSET_LABEL_PART_OF, ApplySet
|
|
@@ -143,6 +142,11 @@ def template(
|
|
|
143
142
|
Render a package template into full Kubernetes resources.
|
|
144
143
|
"""
|
|
145
144
|
|
|
145
|
+
connect_with_profile = True
|
|
146
|
+
if not profile and "ARGOCD_ENV_NYL_PROFILE" in os.environ:
|
|
147
|
+
profile = os.environ["ARGOCD_ENV_NYL_PROFILE"]
|
|
148
|
+
connect_with_profile = False
|
|
149
|
+
|
|
146
150
|
if paths == [Path(".")] and (env_paths := os.getenv("ARGOCD_ENV_NYL_CMP_TEMPLATE_INPUT")) is not None:
|
|
147
151
|
paths = [Path(p) for p in env_paths.split(",")]
|
|
148
152
|
if not paths:
|
|
@@ -175,7 +179,9 @@ def template(
|
|
|
175
179
|
# plugin without granting it access to the Kubernetes API. Most relevant bits of information that Nyl requires
|
|
176
180
|
# about the cluster are passed via the environment variables.
|
|
177
181
|
# See https://argo-cd.readthedocs.io/en/stable/user-guide/build-environment/
|
|
178
|
-
PROVIDER.set(
|
|
182
|
+
PROVIDER.set(
|
|
183
|
+
ApiClientConfig, ApiClientConfig(in_cluster=in_cluster, profile=profile if connect_with_profile else None)
|
|
184
|
+
)
|
|
179
185
|
client = PROVIDER.get(ApiClient)
|
|
180
186
|
|
|
181
187
|
project = PROVIDER.get(ProjectConfig)
|
|
@@ -212,7 +218,9 @@ def template(
|
|
|
212
218
|
)
|
|
213
219
|
|
|
214
220
|
# Seed the template engine with the profile values.
|
|
215
|
-
vars(template_engine.values).update(
|
|
221
|
+
vars(template_engine.values).update(
|
|
222
|
+
PROVIDER.get(ProfileManager).config.profiles[profile or DEFAULT_PROFILE].values
|
|
223
|
+
)
|
|
216
224
|
|
|
217
225
|
# Look for objects that contain local variables and feed them into the template engine.
|
|
218
226
|
for manifest in source.manifests[:]:
|
|
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.9.2 → nyl-0.9.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
|
{nyl-0.9.2 → nyl-0.9.3}/uv.lock
RENAMED
|
File without changes
|