kubescape / storage

Apache License 2.0
1 stars 6 forks source link

Network neighbors #56

Closed Daniel-GrunbergerCA closed 10 months ago

Daniel-GrunbergerCA commented 10 months ago

PR Type:

Enhancement


PR Description:

This PR introduces a new Custom Resource Definition (CRD) called NetworkNeighbors. This CRD will be used by the node-agent to save network communication information. The PR includes the addition of new types, registry, and merge strategy for the NetworkNeighbors CRD. It also includes the necessary changes in the generated files for the new CRD.


PR Main Files Walkthrough:

files: `pkg/apis/softwarecomposition/v1beta1/network_types.go`: The new types related to the `NetworkNeighbors` CRD are defined here. This includes `NetworkNeighbors`, `NetworkNeighborsList`, `NetworkNeighborsSpec`, `IngressEntry`, `EgressEntry`, and `NetworkPort`. `pkg/registry/softwarecomposition/networkneighbors/strategy.go`: The strategy for the `NetworkNeighbors` CRD is defined here. This includes the strategy for creating, updating, and resetting the `NetworkNeighbors` object. `pkg/registry/softwarecomposition/networkneighbors/etcd.go`: The storage and registry settings for the `NetworkNeighbors` CRD are defined here. `pkg/generated/openapi/zz_generated.openapi.go`: The OpenAPI definitions for the new types are added here. `pkg/apis/softwarecomposition/v1beta1/zz_generated.deepcopy.go`: The auto-generated deep copy functions for the new types are added here. `pkg/generated/informers/externalversions/softwarecomposition/v1beta1/interface.go`: The informer for the `NetworkNeighbors` CRD is added here. `pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_softwarecomposition_client.go`: The fake client for the `NetworkNeighbors` CRD for testing purposes is added here. `pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/networkneighbors.go`: The client for the `NetworkNeighbors` CRD is added here. `pkg/apiserver/apiserver.go`: The `NetworkNeighbors` CRD is registered in the API server. `artifacts/networkneighborses/01-example.yaml`: An example YAML file for the `NetworkNeighbors` CRD is added here.

User Description:

This PR adds a new CRD - NetworkNeighbors. This CRD will be used by the node-agent to save network communication information.

codiumai-pr-agent[bot] commented 10 months ago

PR Analysis

How to use

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.

github-actions[bot] commented 10 months ago

Summary:

github-actions[bot] commented 10 months ago

Summary:

github-actions[bot] commented 10 months ago

Summary:

github-actions[bot] commented 10 months ago

Summary:

github-actions[bot] commented 10 months ago

Summary:

github-actions[bot] commented 10 months ago

Summary:

vladklokun commented 10 months ago

Oh, and please make sure to rebase on main and squash the commits into something with a sensible commit message. I would suggest:

feat: add and expose the NetworkNeighbors custom resource

We should keep our commit history clear for checking at a glance. Having 10 commits named along the lines of "add types", "pr fixes" and a merge from main would pollute it.

github-actions[bot] commented 10 months ago

Summary:

github-actions[bot] commented 10 months ago

Summary: