Skip to content

Commit 93651ce

Browse files
committed
fixed target mode value
Signed-off-by: Sylvain Hellegouarch <sh@defuze.org>
1 parent 016a8e3 commit 93651ce

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22

33
## [Unreleased][]
44

5-
[Unreleased]: https://github.com/chaostoolkit/chaostoolkit-kubernetes/compare/0.31.0...HEAD
5+
[Unreleased]: https://github.com/chaostoolkit/chaostoolkit-kubernetes/compare/0.31.1...HEAD
6+
7+
## [0.31.1][] - 2023-10-02
8+
9+
[0.31.1]: https://github.com/chaostoolkit/chaostoolkit-kubernetes/compare/0.31.0...0.31.1
10+
11+
### Fixed
12+
13+
* Set target mode value in chaos mesh network actions
614

715
## [0.31.0][] - 2023-10-02
816

chaosk8s/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from logzero import logger
1313

1414
__all__ = ["create_k8s_api_client", "discover", "__version__"]
15-
__version__ = "0.31.0"
15+
__version__ = "0.31.1"
1616

1717

1818
def get_config_path() -> str:

chaosk8s/chaosmesh/network/actions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,10 @@ def add_common_spec(
597597
s["externalTargets"] = targets
598598

599599
if target_mode:
600-
target = {"mode": target_mode_value, "selector": {}}
600+
target = {"mode": target_mode, "selector": {}}
601+
602+
if target_mode in ("fixed", "fixed-percent", "random-max-percent"):
603+
target["value"] = target_mode_value
601604

602605
if target_namespaces_selectors:
603606
if isinstance(target_namespaces_selectors, str):

0 commit comments

Comments
 (0)