kubescape / storage

Apache License 2.0
1 stars 6 forks source link

support ephemeral containers #106

Closed amirmalka closed 3 months ago

amirmalka commented 3 months ago

Type

enhancement


Description


Changes walkthrough

Relevant files
Enhancement
8 files
types.go
Support for Ephemeral Containers in ApplicationProfileSpec

pkg/apis/softwarecomposition/types.go
  • Added EphemeralContainers field to ApplicationProfileSpec struct.
  • +3/-2     
    types.go
    Add EphemeralContainers Field to ApplicationProfileSpec with JSON Tags

    pkg/apis/softwarecomposition/v1beta1/types.go
  • Added EphemeralContainers field with JSON tags and patch strategies to
    ApplicationProfileSpec struct.
  • +3/-0     
    zz_generated.conversion.go
    Autogenerated Conversion for EphemeralContainers                 

    pkg/apis/softwarecomposition/v1beta1/zz_generated.conversion.go
  • Added conversion logic for EphemeralContainers between internal and
    v1beta1 versions.
  • +2/-0     
    zz_generated.deepcopy.go
    Autogenerated DeepCopy for EphemeralContainers                     

    pkg/apis/softwarecomposition/v1beta1/zz_generated.deepcopy.go - Implemented deep copy logic for `EphemeralContainers`.
    +7/-0     
    zz_generated.deepcopy.go
    Support DeepCopy for EphemeralContainers                                 

    pkg/apis/softwarecomposition/zz_generated.deepcopy.go
  • Added deep copy logic for EphemeralContainers in
    ApplicationProfileSpec.
  • +7/-0     
    discovery.go
    Discover Ephemeral Containers in Workloads                             

    pkg/cleanup/discovery.go
  • Added logic to fetch workload identifiers from running ephemeral
    containers.
  • Included ephemeral container image IDs in the discovery process.
  • +29/-0   
    zz_generated.openapi.go
    OpenAPI Schema for EphemeralContainers                                     

    pkg/generated/openapi/zz_generated.openapi.go - Added OpenAPI schema properties for `EphemeralContainers`.
    +19/-0   
    processor.go
    Process EphemeralContainers in ApplicationProfile PreSave

    pkg/registry/file/processor.go - Extended `PreSave` logic to process `EphemeralContainers`.
    +4/-2     
    Tests
    1 files
    processor_test.go
    Test Processing of EphemeralContainers                                     

    pkg/registry/file/processor_test.go - Added test cases for processing `EphemeralContainers`.
    +22/-3   

    PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

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

    PR Description updated to latest commit (https://github.com/kubescape/storage/commit/c3e80ea669ea19f8e6a8cd5072fafc8862f0de94)

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

    PR Review

    ⏱️ Estimated effort to review [1-5] 3, because the PR involves multiple files and touches on various aspects of the system including API changes, deep copy logic, conversion functions, discovery logic, and unit tests. The complexity is moderate, requiring a good understanding of the system's architecture and the implications of adding ephemeral containers support.
    🧪 Relevant tests Yes
    🔍 Possible issues Missing Validation: There's no explicit mention or addition of validation logic for the new `EphemeralContainers` field. It's important to ensure that the input for ephemeral containers meets the system's expectations and security policies.
    Update Documentation: The PR does not mention updating the documentation to reflect the changes and guide users on how to use ephemeral containers with the system. This is crucial for adoption and correct usage.
    🔒 Security concerns No

    ✨ Review tool usage guide:
    **Overview:** The `review` tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be [added](https://pr-agent-docs.codium.ai/tools/review/#general-configurations) by configuring the tool. The tool can be triggered [automatically](https://pr-agent-docs.codium.ai/usage-guide/automations_and_usage/#github-app-automatic-tools-when-a-new-pr-is-opened) every time a new PR is opened, or can be invoked manually by commenting on any PR. - When commenting, to edit [configurations](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L23) related to the review tool (`pr_reviewer` section), use the following template: ``` /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=... ``` - With a [configuration file](https://pr-agent-docs.codium.ai/usage-guide/configuration_options/), use the following template: ``` [pr_reviewer] some_config1=... some_config2=... ``` See the review [usage page](https://pr-agent-docs.codium.ai/tools/review/) for a comprehensive guide on using this tool.
    github-actions[bot] commented 3 months ago

    Summary: