Closed dwertent closed 1 year ago
config.Namespace()
, which retrieves the currently configured namespace. This change affects multiple files and functions within the codebase.To invoke the PR-Agent, add a comment using one of the following commands: /review [-i]: Request a review of your Pull Request. For an incremental review, which only considers changes since the last review, include the '-i' option. /describe: Modify the PR title and description based on the contents of the PR. /improve [--extended]: Suggest improvements to the code in the PR. Extended mode employs several calls, and provides a more thorough feedback. /ask \<QUESTION>: Pose a question about the PR. /update_changelog: Update the changelog based on the PR's contents.
To edit any configuration parameter from configuration.toml, add --config_path=new_value For example: /review --pr_reviewer.extra_instructions="focus on the file: ..." To list the possible configuration parameters, use the /config command.
Summary:
PR Type:
Bug fix
PR Description:
This PR addresses issue #173 by ensuring that the namespace configured in the application is used for all Kubernetes operations. Previously, the namespace was hardcoded as
armotypes.KubescapeNamespace
, which could lead to issues if the application was configured to use a different namespace. The changes involve replacing the hardcoded namespace with a call toconfig.Namespace()
, which retrieves the currently configured namespace.PR Main Files Walkthrough:
files:
`mainhandler/imageregistryhandler.go`: Replaced hardcoded namespace with the configured one in various Kubernetes operations such as creating secrets, configmaps, and cronjobs, and getting registry scan secrets and workloads. `mainhandler/imageregistryhandlerhelper.go`: Updated the namespace used in operations like updating secrets, configmaps, and cronjobs, and deleting registry scan cronjobs. `mainhandler/vulnscan.go`: Adjusted the namespace used when getting registry scan secrets.User Description:
Overview
This PR fixes #173
Signed Commits