nyl 0.0.5__tar.gz → 0.0.7__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.0.5 → nyl-0.0.7}/PKG-INFO +1 -1
- {nyl-0.0.5 → nyl-0.0.7}/pyproject.toml +1 -1
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/commands/template.py +15 -6
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/project/config.py +6 -5
- {nyl-0.0.5 → nyl-0.0.7}/README.md +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/__init__.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/commands/__init__.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/commands/crds.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/commands/new.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/commands/profile.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/commands/secrets.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/commands/tun.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/generator/__init__.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/generator/dispatch.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/generator/dispatch_test.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/generator/helmchart.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/generator/statefulsecret.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/profiles/__init__.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/profiles/config.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/profiles/kubeconfig.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/profiles/tunnel.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/resources/__init__.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/resources/applyset.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/resources/applyset_test.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/resources/helmchart.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/resources/statefulsecret.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/secrets/__init__.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/secrets/config.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/secrets/null.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/secrets/sops.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/secrets/sops_test.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/tools/fs.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/tools/kubectl.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/tools/kvstore.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/tools/shell.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/tools/typer.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/src/nyl/tools/types.py +0 -0
- {nyl-0.0.5 → nyl-0.0.7}/tests/__init__.py +0 -0
{nyl-0.0.5 → nyl-0.0.7}/PKG-INFO
RENAMED
|
@@ -48,9 +48,10 @@ def template(
|
|
|
48
48
|
),
|
|
49
49
|
automatic_applyset: Optional[bool] = Option(
|
|
50
50
|
None,
|
|
51
|
-
help="Specify
|
|
52
|
-
"
|
|
53
|
-
"
|
|
51
|
+
help="Specify the default value for the `automatic_applyset` option in the configuration that is loaded from "
|
|
52
|
+
"the `nyl-project.yaml` configuration file. If the configuration is not set, it will default to this option. "
|
|
53
|
+
"If the option is not set, the default will be `true`. Note that you need the Nyl `ApplySet` CRD installed in "
|
|
54
|
+
"order to use Nyl's applyset support.",
|
|
54
55
|
),
|
|
55
56
|
applyset_part_of: bool = Option(
|
|
56
57
|
True,
|
|
@@ -90,8 +91,16 @@ def template(
|
|
|
90
91
|
load_kube_config()
|
|
91
92
|
|
|
92
93
|
project = ProjectConfig.load()
|
|
93
|
-
if automatic_applyset is None:
|
|
94
|
-
automatic_applyset
|
|
94
|
+
if project.config.automatic_applyset is None:
|
|
95
|
+
if automatic_applyset is None:
|
|
96
|
+
automatic_applyset = True
|
|
97
|
+
project.config.automatic_applyset = automatic_applyset
|
|
98
|
+
elif automatic_applyset is not None:
|
|
99
|
+
logger.opt(ansi=True).warning(
|
|
100
|
+
"<yellow>nyl-project.yaml</> sets <green>automatic_applyset: {}</>, the <cyan>--[no-]automatic-applyset</>"
|
|
101
|
+
"will be ignored.",
|
|
102
|
+
str(project.config.automatic_applyset).lower(),
|
|
103
|
+
)
|
|
95
104
|
|
|
96
105
|
if project.file:
|
|
97
106
|
state_dir = project.file.parent / ".nyl"
|
|
@@ -143,7 +152,7 @@ def template(
|
|
|
143
152
|
applyset = ApplySet.load(manifest)
|
|
144
153
|
source.manifests.remove(manifest)
|
|
145
154
|
|
|
146
|
-
if not applyset and automatic_applyset:
|
|
155
|
+
if not applyset and project.config.automatic_applyset:
|
|
147
156
|
if len(namespaces) > 1:
|
|
148
157
|
logger.opt(ansi=True).error(
|
|
149
158
|
"Multiple namespaces defined in <yellow>{}</>, but automatic ApplySet generation is enabled. "
|
|
@@ -12,13 +12,14 @@ class Project:
|
|
|
12
12
|
Configuration for a Nyl project that is stored in a `nyl-project.toml` file.
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
|
-
automatic_applyset: bool =
|
|
15
|
+
automatic_applyset: bool | None = None
|
|
16
16
|
"""
|
|
17
|
-
|
|
18
|
-
unless there is namespace defined in the template file, in which case the applyset will be named
|
|
19
|
-
namespace.
|
|
17
|
+
If enabled, automatically generate an ApplySet for every template file. The applyset will be named after the
|
|
18
|
+
template file, unless there is namespace defined in the template file, in which case the applyset will be named
|
|
19
|
+
after the namespace.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
If the option is not set, it will usually default to `True`, but that default may be overwritten with the
|
|
22
|
+
`--[no-]automatic-applyset` option to `nyl template`.
|
|
22
23
|
"""
|
|
23
24
|
|
|
24
25
|
search_path: list[Path] = field(default_factory=list)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|