Skip to content

Commit 9a9caee

Browse files
djiveylkubb
andauthored
[Feature] add support for context variables for better use of templating (#11)
Co-authored-by: jeanluc <lkubb@protonmail.com>
1 parent 0a7b269 commit 9a9caee

File tree

20 files changed

+7077
-1393
lines changed

20 files changed

+7077
-1393
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ coverage.xml
5050
*.py,cover
5151
.hypothesis/
5252
.pytest_cache/
53+
.pytest-kind/
5354

5455
# Translations
5556
*.mo

changelog/+changed.breaking.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Dropped legacy connection setup. Either `kubeconfig` or `kubeconfig-data` and (always) `context` configuration is required now. This change affects backwards compatibility and may not work on very old versions of kubernetes.

changelog/+configmap.breaking.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`kubernetes.create_configmap` with `source` parameter now expects to receive a properly formatted spec with the configmap data in the `data` key. Previously, the loaded data was used as the data directly.

changelog/10.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added enhanced functionality including Jinja2 templating via `template_context` parameter, `wait` and `timeout` parameters for resource operations, `secret_type` and `metadata` parameters for secrets, and improved parameter validation across resource types.

docs/ref/states/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ _____________
99
.. autosummary::
1010
:toctree:
1111

12-
kubernetesmod
12+
kubernetes
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
``kubernetes``
2+
==============
3+
4+
.. automodule:: saltext.kubernetes.states.kubernetes
5+
:members:

docs/ref/states/saltext.kubernetes.states.kubernetesmod.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,14 @@ lint = [
7171
]
7272
tests = [
7373
"pytest>=7.2.0",
74-
"pytest-salt-factories>=1.0.0",
75-
"pytest-custom-exit-code>=0.3",
74+
"pytest-salt-factories>=1.0.0; sys_platform == 'win32'",
75+
"pytest-salt-factories[docker]>=1.0.0; sys_platform != 'win32'",
76+
"kubernetes>=19.15.0",
7677
"pytest-helpers-namespace>=2019.1.8",
7778
"pytest-subtests",
7879
"pytest-timeout",
80+
"pytest-kind>=22.8.0",
81+
"cryptography>=42.0.0",
7982
]
8083

8184
[project.entry-points."salt.loader"]

0 commit comments

Comments
 (0)