Closed amirmalka closed 3 months ago
PR Description updated to latest commit (https://github.com/kubescape/storage/commit/c3e80ea669ea19f8e6a8cd5072fafc8862f0de94)
⏱️ 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 |
Summary:
Type
enhancement
Description
ApplicationProfileSpec
, including JSON tags, deep copy, conversion, and OpenAPI schema definitions.ApplicationProfileProcessor
to process ephemeral containers, ensuring they are included in pre-save operations.Changes walkthrough
8 files
types.go
Support for Ephemeral Containers in ApplicationProfileSpec
pkg/apis/softwarecomposition/types.go
EphemeralContainers
field toApplicationProfileSpec
struct.types.go
Add EphemeralContainers Field to ApplicationProfileSpec with JSON Tags
pkg/apis/softwarecomposition/v1beta1/types.go
EphemeralContainers
field with JSON tags and patch strategies toApplicationProfileSpec
struct.zz_generated.conversion.go
Autogenerated Conversion for EphemeralContainers
pkg/apis/softwarecomposition/v1beta1/zz_generated.conversion.go
EphemeralContainers
between internal andv1beta1 versions.
zz_generated.deepcopy.go
Autogenerated DeepCopy for EphemeralContainers
pkg/apis/softwarecomposition/v1beta1/zz_generated.deepcopy.go - Implemented deep copy logic for `EphemeralContainers`.
zz_generated.deepcopy.go
Support DeepCopy for EphemeralContainers
pkg/apis/softwarecomposition/zz_generated.deepcopy.go
EphemeralContainers
inApplicationProfileSpec.
discovery.go
Discover Ephemeral Containers in Workloads
pkg/cleanup/discovery.go
containers.
zz_generated.openapi.go
OpenAPI Schema for EphemeralContainers
pkg/generated/openapi/zz_generated.openapi.go - Added OpenAPI schema properties for `EphemeralContainers`.
processor.go
Process EphemeralContainers in ApplicationProfile PreSave
pkg/registry/file/processor.go - Extended `PreSave` logic to process `EphemeralContainers`.
1 files
processor_test.go
Test Processing of EphemeralContainers
pkg/registry/file/processor_test.go - Added test cases for processing `EphemeralContainers`.