- Introduced a new `.golangci.yml` file to configure GolangCI-Lint for the project.
- Set the version to 2 and disabled test file analysis to streamline linting processes.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- 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>
- Introduced a step to download and verify Go module dependencies in the CI workflow, ensuring all required packages are available for the build process.
- This enhancement improves the reliability of the build environment by ensuring dependencies are properly managed.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Updated log formatting in the Kubectl function for better readability.
- Replaced deprecated string replacement method with `strings.ReplaceAll` in EditFile and EditKeyValue functions for improved performance.
- Enhanced error handling by wrapping deferred close calls in anonymous functions to ensure proper error logging in DownloadFile, createInfrastructureViaRegisterInfra, applyInfrastructureManifest, and checkInfrastructureStatusViaGraphQL functions.
- Simplified condition check in PodStatusCheck for better clarity.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Removed direct requirement for sigs.k8s.io/yaml v1.4.0 and added it as an indirect dependency to streamline module management.
- This change helps maintain cleaner dependency tracking in the go.mod file.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Updated the Go version from 1.14 to 1.24 in the build, push, and release workflows to ensure compatibility with the latest features and improvements.
- This change enhances the development environment and aligns with current best practices.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Changed the release workflow trigger from `create` to `push` for tags matching the pattern `v*`, ensuring proper versioning during releases.
- Removed unused code and debug log functions from the container-kill experiment test file to enhance clarity and maintainability.
- Updated default application namespace and label in the experiment configuration for better alignment with standard practices.
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>
- Replaced GitHub secrets for `LITMUS_ENDPOINT`, `LITMUS_USERNAME`, `LITMUS_PASSWORD`, and `LITMUS_PROJECT_ID` with hardcoded values to facilitate local development and testing.
- Updated the `LITMUS_PROBE_NAME` from "ci-http-probe-78-container-kill" to "ci-http-probe-container-kill" for consistency in chaos experiment configurations.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Changed the `LITMUS_PROBE_NAME` from "ci-http-probe-88-container-kill" to "ci-http-probe-78-container-kill" in the GitHub Actions workflow to maintain alignment with the updated naming convention.
- This update ensures consistency in probe identification for chaos experiments.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Added configuration for `configMaps`, `secrets`, and `hostFileVolumes` to the workflow, allowing for better management of resources during chaos experiments.
- Updated `securityContext` to enable privileged access and additional capabilities, enhancing the flexibility and control over the execution environment.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Changed the `LITMUS_PROBE_NAME` from "ci-http-probe-99-container-kill" to "ci-http-probe-88-container-kill" in the GitHub Actions workflow to align with the new naming convention.
- This update ensures consistency in probe identification for chaos experiments.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replaced hardcoded values for `LITMUS_ENDPOINT`, `LITMUS_USERNAME`, `LITMUS_PASSWORD`, and `LITMUS_PROJECT_ID` with GitHub secrets to enhance security.
- Updated the `LITMUS_PROBE_NAME` from "ci-http-probe-9-container-kill" to "ci-http-probe-99-container-kill" for consistency in chaos experiment configurations.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Changed the `LITMUS_PROBE_NAME` from "ci-http-probe-container-kill" to "ci-http-probe-9-container-kill" in the GitHub Actions workflow to align with the new naming convention.
- This update ensures consistency in probe identification for chaos experiments.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replaced GitHub secrets for `LITMUS_ENDPOINT`, `LITMUS_USERNAME`, `LITMUS_PASSWORD`, and `LITMUS_PROJECT_ID` with hardcoded values to facilitate local development and testing.
- Updated the `LITMUS_PROBE_NAME` from "ci-http-probe-99-container-kill" to "ci-http-probe-container-kill" for consistency in chaos experiment configurations.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Changed the `LITMUS_PROBE_NAME` variable from "ci-http-probe-container-kill" to "ci-http-probe-99-container-kill" in the GitHub Actions workflow to reflect the new naming convention.
- This update ensures consistency in probe identification for chaos experiments.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replaced hardcoded values for `LITMUS_ENDPOINT`, `LITMUS_USERNAME`, `LITMUS_PASSWORD`, and `LITMUS_PROJECT_ID` with GitHub secrets to enhance security and protect sensitive information.
- This change improves the security posture of the workflow by ensuring that sensitive credentials are not exposed in the codebase.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Introduced new environment variables `SOCKET_PATH` and `CONTAINER_RUNTIME` in the GitHub Actions workflow to support containerd as the runtime for chaos experiments.
- Updated the `GetDefaultExperimentConfig` function to retrieve these values from the environment, ensuring flexibility in configuration.
- Adjusted experiment manifests to utilize the new variables for socket path and container runtime, enhancing the adaptability of chaos experiments.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Updated the `INFRA_SCOPE` environment variable from "namespace" to "cluster" across multiple jobs to reflect the new infrastructure configuration for chaos experiments.
- This change ensures that the chaos experiments are executed at the cluster level, enhancing the scope of testing.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replaced GitHub secrets with hardcoded values for `LITMUS_ENDPOINT`, `LITMUS_USERNAME`, `LITMUS_PASSWORD`, and `LITMUS_PROJECT_ID` across multiple jobs to facilitate local development and testing.
- Adjusted `LITMUS_PROBE_NAME` variables to remove version suffixes for clarity and consistency in chaos experiment configurations.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Renamed multiple `LITMUS_PROBE_NAME` variables from "ci-http-probe-3" to "ci-http-probe-4" across various jobs to reflect the new versioning scheme.
- This change ensures unique identification of probes and maintains consistency in chaos experiment configurations.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Eliminated the redundant uninstall step for Litmus across various chaos experiment jobs in the GitHub Actions workflow to streamline the process.
- This change enhances the efficiency of the workflow by reducing unnecessary commands during execution.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Renamed multiple `LITMUS_PROBE_NAME` variables from "ci-http-probe-2" to "ci-http-probe-3" across various jobs to reflect the new versioning scheme.
- This change ensures unique identification of probes and maintains consistency in chaos experiment configurations.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Introduced new `APP_LABEL` environment variable in the GitHub Actions workflow for various chaos experiments to enhance identification and management.
- Updated the `GetDefaultExperimentConfig` function to retrieve `APP_LABEL` from environment variables, ensuring flexibility and consistency across deployments.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Removed an incomplete line for `APP_LABEL` in the workflow configuration.
- Ensured proper formatting and consistency in the environment variable definitions for the Litmus deployment.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Renamed multiple `LITMUS_PROBE_NAME` variables to include a version suffix "2" for consistency across chaos experiment jobs.
- This change ensures unique identification of probes and aligns with recent updates in the deployment configurations.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Changed the application namespace to "litmus" for all jobs to ensure consistency.
- Updated deployment names and service configurations for chaos experiments to ensure uniqueness, including modifications to probe names and URLs.
- Enhanced the deployment process by downloading and modifying the nginx deployment YAML for each chaos experiment, ensuring proper application to the litmus namespace.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replaced hardcoded Litmus configuration values with GitHub secrets for enhanced security across multiple jobs.
- Updated the application namespace to "litmus" and modified deployment names and service configurations for chaos experiments to ensure uniqueness.
- Adjusted probe names and URLs to reflect the new deployment configurations for improved clarity and maintainability.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replaced GitHub secrets with hardcoded values for Litmus configuration across multiple jobs in the workflow, setting `LITMUS_ENDPOINT`, `LITMUS_USERNAME`, `LITMUS_PASSWORD`, and `LITMUS_PROJECT_ID` to specific local values for testing purposes.
- This change is intended for local development and testing scenarios.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Changed the environment variable `LITMUS_PROBE_NAME` from "ci-http-probe" to "ci-http-probe-2" across multiple jobs in the workflow to ensure consistency in probe naming.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Changed the default AppNamespace from "litmus" to "default" in the experiment configuration for consistency.
- Replaced hardcoded Litmus configuration values with GitHub secrets across multiple jobs in the workflow to enhance security and maintainability.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replaced hardcoded Litmus configuration values with GitHub secrets for enhanced security.
- Updated the workflow to install and configure a KinD cluster instead of Minikube for running end-to-end tests, improving compatibility and performance.
- Removed Minikube installation steps and streamlined the cluster setup process.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Updated the GitHub Actions workflow to install and configure a Minikube cluster instead of a KinD cluster for running end-to-end tests.
- Added steps to download and install Minikube, and configured it to start with specified resources for improved testing performance.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Moved the `getSubscriberPodLogs` function call to ensure logs are retrieved consistently during polling for experiment run status and when the experiment is stuck in the queued state.
- This change enhances the visibility of logs during error scenarios, aiding in debugging efforts.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Changed the default AppNamespace and experiment manifest namespace from "litmus-2" to "litmus" for consistency across configurations.
- This update ensures that the experiment configurations align with the current namespace structure, improving clarity and maintainability.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Integrated the `getSubscriberPodLogs` function to fetch and log subscriber pod logs when an error occurs while fetching the experiment run status.
- This enhancement improves error visibility and aids in debugging during the container-kill experiment.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Introduced a new helper function `getSubscriberPodLogs` to retrieve and log the status of various components in the Litmus namespace, including subscriber pod logs, workflow controller logs, chaos operator logs, and the status of pods and workflows.
- Improved debugging capabilities by providing detailed logs for better visibility during the container-kill experiment.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Improved logging for experiment creation and polling for experiment runs, providing detailed information about the experiment ID, infrastructure ID, and project ID.
- Increased the maximum number of polling retries from 10 to 20 and adjusted the polling interval from 3 seconds to 5 seconds for better reliability.
- Added detailed logging of experiment run attempts, including specific run details for improved debugging and visibility.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Added the environment variable `LITMUS_USE_EXISTING_PROBE` set to "false" across multiple jobs to ensure a fresh probe is created for chaos experiments.
- Renamed the experiment steps from "pod-network-corruption" to "pod-network-latency" and "pod-network-loss" to better reflect their functionality.
- Enhanced clarity and consistency in the workflow for improved chaos experiment execution.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Added new environment variables for HTTP probe configuration in the GitHub Actions workflow, enhancing the monitoring capabilities during chaos experiments.
- Implemented a service exposure for the NGINX deployment to facilitate probe connectivity, ensuring that the HTTP probe can effectively monitor the service.
- Updated the `ExperimentDetails` struct to store the manifest returned by the `registerInfra` mutation, improving infrastructure management during activation.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Added functions to ensure the existence of the specified namespace and to apply Litmus CRDs as part of the infrastructure activation process.
- Updated the `ActivateInfrastructure` function to include steps for namespace verification and CRD application before retrieving and applying the infrastructure manifest.
- Improved logging for each step to provide better visibility during the activation process.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Updated the `getInfrastructureManifestViaGraphQL` function to first attempt fetching the infrastructure manifest using the `getInfraManifest` query.
- Added a new helper function `getExistingInfrastructureManifest` to handle the GraphQL query and response parsing.
- Implemented comprehensive logging for both successful and failed attempts to retrieve the manifest.
- Enhanced the `applyInfrastructureManifest` function to check and replace incorrect infrastructure IDs in the manifest content.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Replaced the SDK method for checking infrastructure status with a direct GraphQL query to improve reliability.
- Implemented a new function `checkInfrastructureStatusViaGraphQL` to handle GraphQL requests and responses.
- Added comprehensive logging for both GraphQL and SDK methods, including error handling and fallback mechanisms.
- Improved the overall robustness of the infrastructure status verification process during activation.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Added a new function `checkInfrastructureStatus` to verify the active status of infrastructure using the SDK.
- Updated the `waitForInfrastructureActivation` function to utilize the new status check, providing informative logs for both active and inactive states.
- Enhanced error handling for infrastructure status retrieval, improving robustness during activation processes.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Introduced new environment variables `ACTIVATE_INFRA` and `INFRA_ACTIVATION_TIMEOUT` to control infrastructure activation during chaos experiments.
- Updated the `SetupInfrastructure` function to include infrastructure activation by deploying manifests.
- Implemented the `ActivateInfrastructure` function to handle the activation process, including manifest retrieval and application.
- Enhanced `ExperimentDetails` struct to accommodate new fields for activation control.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Updated environment variables for multiple jobs to enable installation and configuration of Litmus ChaosCenter.
- Added steps to install Litmus ChaosCenter locally, including Helm repository setup, namespace creation, and service configuration.
- Implemented port forwarding for local access to ChaosCenter, ensuring readiness checks for frontend and backend services.
- Streamlined chaos experiment deployment processes across various infrastructure setups.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>
- Added environment variables INSTALL_CHAOS_CENTER, CONNECT_INFRA, and INSTALL_INFRA with default values set to "false" across multiple jobs in the GitHub Actions workflow.
- Removed the installation step for Litmus in each job to streamline the workflow process.
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com>