Skip to content

Commit e07298d

Browse files
committed
resolve review comments
1 parent 1c09885 commit e07298d

File tree

18 files changed

+3374
-2971
lines changed

18 files changed

+3374
-2971
lines changed

changelog/+config.removed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Removed the ability to override minion configuration in function parameters (`context`, `kubeconfig`, `kubeconfig_data`)

changelog/+context.breaking.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Reused the removed parameter for Jinja2 context variables! Take care when upgrading from earlier versions.

changelog/10.added.md

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1 @@
1-
# Added Comprehensive Testing Suite and Enhanced State Module Functionality
2-
3-
Renamed the state module kubernetesmod to kubernetes due to a conflict with the salt core state module kubernetes
4-
5-
## Testing Infrastructure
6-
Implemented pytest-based testing framework with pytest-kind
7-
Added pytest fixtures for handling Kubernetes resources:
8-
- Template management
9-
- Configurable Kubernetes version testing
10-
11-
## Resource Management Tests
12-
Added functional and integration tests covering:
13-
- Namespace management (creation, deletion, templating)
14-
- Pod lifecycle (creation, deletion, template support)
15-
- Deployment operations (creation, updates, deletion)
16-
- Secret handling (creation, updates, base64 encoding)
17-
- Service configuration (ports, selectors, types)
18-
- ConfigMap management (data handling, updates)
19-
- Node label operations (single labels and folder-based management)
20-
21-
## Template Support
22-
Added Jinja2 template support for all resource types
23-
Implemented context-based resource creation:
24-
- Namespace templates with label support
25-
- Pod templates with container configuration
26-
- Deployment templates with replica and selector support
27-
- Service templates with flexible port configuration
28-
- ConfigMap templates with multi-line data support
29-
- Secret templates with data encoding support
30-
31-
## Spec Validation Enhancements
32-
- Base64 encoding validation for secrets
33-
- Service port configuration validation
34-
- ConfigMap data consistency checks
35-
- Namespace state validation
36-
- Deployment spec verification
37-
- Container configuration validation
38-
39-
## Documentation
40-
Added detailed docstrings for all test functions
41-
- Included usage examples in test cases
42-
- Documented template structures and context usage
43-
- Added comments explaining complex operations
1+
Added support for specifying template context variables and improved spec validation.

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def _lint(session, rcfile, flags, paths, tee_output=True):
290290
stdout.seek(0)
291291
contents = stdout.read()
292292
if contents:
293-
contents.decode("utf-8")
293+
contents = contents.decode("utf-8")
294294
sys.stdout.write(contents)
295295
sys.stdout.flush()
296296
if pylint_report_path:

pyproject.toml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ dynamic = ["version"]
3636
dependencies = [
3737
"salt>=3006",
3838
"kubernetes>=19.15.0; platform_system == 'Linux'",
39-
"PyYAML>=5.3.1",
40-
"docker>=6.0.0",
4139
]
4240

4341
[project.readme]
@@ -73,14 +71,12 @@ lint = [
7371
]
7472
tests = [
7573
"pytest>=7.2.0",
76-
"pytest-salt-factories>=1.0.0rc19",
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",
7777
"pytest-helpers-namespace>=2019.1.8",
7878
"pytest-subtests",
7979
"pytest-timeout",
80-
"kubernetes>=19.15.0",
81-
"PyYAML>=5.3.1",
82-
"mock>=4.0.3",
83-
"pytest-custom-exit-code>=0.3",
8480
"pytest-kind>=22.8.0",
8581
"cryptography>=42.0.0",
8682
]

0 commit comments

Comments
 (0)