- Updated Ginkgo from v1.16.5 to v2.19.0 for improved features and compatibility.
- Added new indirect dependencies including `github.com/go-logr/logr`, `github.com/go-task/slim-sprig/v3`, and `github.com/google/pprof`.
- Ensured consistency in dependency management within go.mod and go.sum files.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Added spaces after comment slashes for better readability in various experiment test files, including container-kill, disk-fill, node-cpu-hog, and others.
- Ensured consistent formatting across all test files to enhance code clarity and maintainability.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Eliminated the logic for manually setting ConnectedInfraID from ExistingInfraID in multiple chaos experiment tests (container-kill, disk-fill, node-cpu-hog, node-io-stress, node-memory-hog, pod-autoscaler, pod-cpu-hog, pod-memory-hog, pod-network-corruption, pod-network-duplication, pod-network-latency, pod-network-loss, pod-delete).
- This change simplifies the infrastructure setup process by relying on the updated logic in the SetupInfrastructure function, enhancing code clarity and maintainability.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Eliminated HTTP fetching and YAML parsing logic from the chaos experiment request construction functions in multiple tests (container-kill, node-cpu-hog, node-io-stress, node-memory-hog, pod-cpu-hog, pod-memory-hog).
- Streamlined the experiment request construction process by removing unnecessary dependencies and simplifying the code structure.
- Improved overall maintainability and clarity of chaos experiment tests by focusing on essential functionalities.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replaced environment.ClientSets with Litmus SDK client in various chaos experiment tests (container-kill, disk-fill, node-cpu-hog, node-io-stress, node-memory-hog, pod-autoscaler, pod-cpu-hog, pod-memory-hog, pod-network-corruption, pod-network-duplication, pod-network-latency, pod-network-loss) for improved clarity and maintainability.
- Updated SetupInfrastructure and DisconnectInfrastructure functions to utilize the new SDK client, enhancing infrastructure management.
- Streamlined experiment run polling and status checking by leveraging the SDK client, ensuring consistent error handling and logging.
- Enhanced CreateProbe function to utilize the SDK client for probe creation, improving flexibility in chaos experiment configurations.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Added support for probe configuration in various chaos experiment tests (container-kill, disk-fill, node-cpu-hog, node-io-stress, node-memory-hog, pod-autoscaler, pod-cpu-hog, pod-memory-hog, pod-network-corruption, pod-network-duplication, pod-network-latency, pod-network-loss).
- Implemented logic to create and validate probes before running experiments, enhancing flexibility and reliability.
- Included cleanup procedures for probes after experiment execution to ensure proper resource management.
- Enhanced logging for probe setup and cleanup processes to improve traceability during test execution.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Updated multiple chaos experiment tests (container-kill, disk-fill, node-cpu-hog, node-io-stress, node-memory-hog, pod-cpu-hog, pod-memory-hog) to replace ioutil.ReadAll with io.ReadAll for improved performance and consistency.
- Modified file handling in pkg/file.go and pkg/install.go to utilize os.ReadFile and os.WriteFile, enhancing clarity and maintainability.
- Ensured consistent error handling and logging across all updated tests.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Updated various chaos experiment tests (container-kill, disk-fill, pod-autoscaler, pod-cpu-hog, pod-memory-hog, pod-network-corruption, pod-network-duplication, pod-network-latency, pod-network-loss) to include a polling mechanism for checking the availability of experiment runs.
- Enhanced logging to provide detailed insights during the polling process, including retry attempts and found experiment run IDs.
- Removed commented-out kubeconfig retrieval and clientset generation for improved clarity and maintainability.
- Ensured consistent error handling and expectations during experiment run status checks across all updated tests.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Commented out kubeconfig retrieval and clientset generation in both pod-cpu-hog and pod-memory-hog tests for clarity.
- Enhanced logging by replacing log with klog for better consistency across experiments.
- Modularized experiment request construction by utilizing the workflow package for generating unique experiment names and IDs.
- Improved error handling during experiment creation and run status polling, ensuring dynamic fetching of the latest experiment run ID.
- Updated the test descriptions for better readability and consistency.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Introduce a new utility function, ContainsString, in the pkg module to streamline the checking of final phases in various experiment tests.
- Replace the previous manual phase checking logic with the new utility function across multiple experiment test files, enhancing code clarity and maintainability.
- Ensure consistent handling of final phase validation for improved status checks in experiments.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Refactor experiment test files to utilize dynamic timeout and polling interval values from environment variables.
- Enhance error messages to reflect the actual timeout duration for better debugging.
- Extend final phase checks to include "Completed_With_Error" and "Terminated" for improved status validation.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replace usage of final status object with final phase string for polling experiment run status.
- Enhance validation checks to ensure final phase is not empty and equals "Completed" after polling.
- Improve code clarity and maintainability by simplifying the status handling in both experiment tests.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Introduce a new `infrastructure` package to handle setup and disconnection of infrastructure for chaos experiments.
- Update experiment test files to utilize the new infrastructure management functions, improving code clarity and maintainability.
- Add new environment variables for controlling infrastructure installation and usage of existing infrastructure.
- Update `go.mod` and `go.sum` to reflect changes in dependencies.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Add support for the `github.com/google/uuid` package to generate unique identifiers in experiments.
- Update experiment test files to utilize the Litmus SDK for constructing and executing chaos experiments.
- Refactor YAML manifest construction logic to dynamically set experiment parameters based on input details.
- Introduce new environment variables and enhance error handling for manifest generation.
- Update `go.mod` to include the latest version of `github.com/google/uuid` and `sigs.k8s.io/yaml`.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>