Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add known servers #72

Merged
merged 3 commits into from
Dec 11, 2023
Merged

Add known servers #72

merged 3 commits into from
Dec 11, 2023

Conversation

Daniel-GrunbergerCA
Copy link
Contributor

@Daniel-GrunbergerCA Daniel-GrunbergerCA commented Dec 11, 2023

Type

Enhancement


Description

This PR enhances the functionality of the application by implementing the retrieval of known servers from storage. The changes include:

  • Addition of a new constant knownServersResource in the generatednetworkpolicy.go file.
  • Modification of the Get and GetList methods in the generatednetworkpolicy.go file to fetch known servers from the real store and use them in generating network policies.
  • Addition of a new method GetClusterScopedResource in the storage.go file to fetch all objects in a given cluster, given their API version and kind.

PR changes walkthrough

Relevant files                                                                                                                                 
Enhancement
2 files
generatednetworkpolicy.go                                                                     
    pkg/registry/file/generatednetworkpolicy.go

    The `Get` and `GetList` methods were modified to fetch known
    servers from the real store and use them in generating
    network policies. A new constant `knownServersResource` was
    also added.
+15/-3
storage.go                                                                                                   
    pkg/registry/file/storage.go

    A new method `GetClusterScopedResource` was added to fetch
    all objects in a given cluster, given their API version and
    kind.
+48/-0
___ ## User description retrieve known servers from real storage

Daniel Grunberger added 3 commits December 10, 2023 20:17
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io>
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io>
Signed-off-by: Daniel Grunberger <danielgrunberger@armosec.io>
@codiumai-pr-agent-free codiumai-pr-agent-free bot added the enhancement New feature or request label Dec 11, 2023
Copy link

PR Description updated to latest commit (900b24a)

Copy link

PR Analysis

  • 🎯 Main theme: Adding functionality to retrieve known servers from storage
  • 📝 PR summary: This PR enhances the application by implementing the retrieval of known servers from storage. It modifies the Get and GetList methods in the generatednetworkpolicy.go file to fetch known servers from the real store and use them in generating network policies. It also adds a new method GetClusterScopedResource in the storage.go file to fetch all objects in a given cluster, given their API version and kind.
  • 📌 Type of PR: Enhancement
  • 🧪 Relevant tests added: No
  • ⏱️ Estimated effort to review [1-5]: 3, because the PR involves changes in the core functionality of the application and requires a good understanding of the existing codebase to review effectively.
  • 🔒 Security concerns: No security concerns found

PR Feedback

  • 💡 General suggestions: It would be beneficial to add unit tests for the new functionality to ensure it works as expected and prevent future regressions. Additionally, consider handling potential errors that may occur when calling the new GetClusterScopedResource method.

  • 🤖 Code feedback:

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 <QUESTION>: 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 for more details.

To edit any configuration parameter from the 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.

Copy link

Summary:

  • License scan: failure
  • Credentials scan: success
  • Vulnerabilities scan: success
  • Unit test: success
  • Go linting: success

@Daniel-GrunbergerCA Daniel-GrunbergerCA merged commit 173535d into main Dec 11, 2023
6 checks passed
@Daniel-GrunbergerCA Daniel-GrunbergerCA deleted the add-known-servers branch December 11, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants