kubescape / storage

Apache License 2.0
1 stars 6 forks source link

Cleanup resources #70

Closed amirmalka closed 8 months ago

amirmalka commented 9 months ago

type:

Enhancement


description:

This PR introduces a new feature for cleaning up resources. The main changes include:


main_files_walkthrough:

files: - `pkg/cleanup/cleanup.go`: This file contains the main logic for the cleanup task. It introduces a new `ResourcesCleanupHandler` struct and various functions to handle the cleanup of different types of resources. - `main.go`: The cleanup task is started in this file using the `ResourcesCleanupHandler` struct from the `cleanup` package. - `pkg/cleanup/cleanup_test.go`: This file contains the unit tests for the cleanup functionality. - `pkg/registry/file/storage.go`: The visibility of the `IsMetadataFile` function has been changed to public. - `pkg/cleanup/discovery.go`: This file contains functions to fetch running resources from the cluster. These resources are used to decide which files to delete during the cleanup task. - `pkg/cleanup/utils.go`: This file contains utility functions to support the cleanup task, such as creating a new Kubernetes client and getting the configuration.
codiumai-pr-agent[bot] commented 9 months ago

PR Analysis

How to use

Instructions > To invoke the PR-Agent, add a comment using one of the following commands: > **/review**: Request a review of your Pull Request. > **/describe**: Update the PR title and description based on the contents of the PR. > **/improve [--extended]**: Suggest code improvements. Extended mode provides a higher quality feedback. > **/ask \**: Ask a question about the PR. > **/update_changelog**: Update the changelog based on the PR's contents. > **/add_docs**: Generate docstring for new components introduced in the PR. > **/generate_labels**: Generate labels for the PR based on the PR's contents. > see the [tools guide](https://github.com/Codium-ai/pr-agent/blob/main/docs/TOOLS_GUIDE.md) for more details. >To edit any configuration parameter from the [configuration.toml](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml), add --config_path=new_value. >For example: /review --pr_reviewer.extra_instructions="focus on the file: ..." >To list the possible configuration parameters, add a **/config** comment.
github-actions[bot] commented 9 months ago

Summary:

github-actions[bot] commented 9 months ago

Summary:

github-actions[bot] commented 8 months ago

Summary:

github-actions[bot] commented 8 months ago

Summary:

github-actions[bot] commented 8 months ago

Summary:

github-actions[bot] commented 8 months ago

Summary:

github-actions[bot] commented 8 months ago

Summary:

github-actions[bot] commented 8 months ago

Summary:

github-actions[bot] commented 8 months ago

Summary:

github-actions[bot] commented 8 months ago

Summary: