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

Implement DevfileRegistry CRD MemoryLimit field #76

Merged
merged 9 commits into from
Mar 6, 2024

Conversation

thepetk
Copy link
Contributor

@thepetk thepetk commented Feb 22, 2024

Please specify the area for this PR

/area registry-operator

What does does this PR do / why we need it:

This PR introduces the MemoryLimit resource field for the DevfileRegistrySpecContainer - part of the DevfileRegistrySpec.

For each one of the DevfileRegistrySpecContainer included inside the DevfileRegistrySpec (e.g. DevfileIndex, OciRegistry & RegistryViewer) creates a getter function which assigns the default value in case the given value is nil or invalid.

New test cases have been added for the three getter functions.

Which issue(s) this PR fixes:

Fixes devfile/api#1428

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?
  • Gosec scans

Documentation

  • Does the registry operator documentation need to be updated with your changes?

How to test changes / Special notes to the reviewer:

Copy link

openshift-ci bot commented Feb 22, 2024

@thepetk: The label(s) area/registry-operator cannot be applied, because the repository doesn't have them.

In response to this:

Please specify the area for this PR

/area registry-operator

What does does this PR do / why we need it:

This PR introduces the MemoryLimit resource field for the DevfileRegistrySpecContainer - part of the DevfileRegistrySpec.

For each one of the DevfileRegistrySpecContainer included inside the DevfileRegistrySpec (e.g. DevfileIndex, OciRegistry & RegistryViewer) creates a getter function which assigns the default value in case the given value is nil or invalid.

New test cases have been added for the three getter functions.

Which issue(s) this PR fixes:

Fixes devfile/api#1428

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?
  • Gosec scans
  • Fix all MEDIUM and higher findings and/or annotate a finding per gosec instructions: https://github.com/securego/gosec#annotating-code to address why a finding is not a security issue

Documentation

  • Does the registry operator documentation need to be updated with your changes?

How to test changes / Special notes to the reviewer:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
This reverts commit 47dd095.

Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
@thepetk thepetk force-pushed the ft/add_memorylimit_resource_field branch from 8a0f111 to af35d66 Compare February 22, 2024 20:49
Copy link

codecov bot commented Feb 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.10%. Comparing base (f55ab8e) to head (0642ab7).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #76      +/-   ##
==========================================
+ Coverage   25.30%   27.10%   +1.80%     
==========================================
  Files          25       25              
  Lines        1415     1428      +13     
==========================================
+ Hits          358      387      +29     
+ Misses       1032     1020      -12     
+ Partials       25       21       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thepetk thepetk changed the title WIP: Implement DevfileRegistry CRD MemoryLimit field Implement DevfileRegistry CRD MemoryLimit field Mar 3, 2024
@thepetk thepetk force-pushed the ft/add_memorylimit_resource_field branch from bcdc09b to af35d66 Compare March 4, 2024 13:50
pkg/registry/deployment.go Outdated Show resolved Hide resolved
pkg/registry/defaults.go Show resolved Hide resolved
Signed-off-by: thepetk <thepetk@gmail.com>
@thepetk thepetk requested a review from michael-valdron March 5, 2024 12:39
Signed-off-by: thepetk <thepetk@gmail.com>
Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Mar 5, 2024
Copy link

openshift-ci bot commented Mar 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: michael-valdron, thepetk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [michael-valdron,thepetk]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@michael-valdron michael-valdron mentioned this pull request Mar 5, 2024
3 tasks
@thepetk thepetk merged commit a9f14a4 into devfile:main Mar 6, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement memoryLimit field under DevfileRegistry CRD
2 participants