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 ingressClass CRD field #79

Merged
merged 3 commits into from
Mar 6, 2024

Conversation

thepetk
Copy link
Contributor

@thepetk thepetk commented Mar 4, 2024

Please specify the area for this PR

This PR adds support for the CRD field of the ingress class in the registry-operator.

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

fixes devfile/api#1434

Which issue(s) this PR fixes:

Fixes #?

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:

@thepetk
Copy link
Contributor Author

thepetk commented Mar 4, 2024

@michael-valdron two qq:

  1. We shouldn't set a default value I guess as in case of absence this value must be null right?
  2. Should we also include the ingressClass value in the reconcileand theensure` functions?

@michael-valdron
Copy link
Member

michael-valdron commented Mar 4, 2024

@michael-valdron two qq:

  1. We shouldn't set a default value I guess as in case of absence this value must be null right?

Should match helm chart's default value (nginx): https://github.com/devfile/registry-support/blob/dd51121eae680cd52c72733ef1594719fd6e75f2/deploy/chart/devfile-registry/values.yaml#L18

  1. Should we also include the ingressClass value in the reconcileand theensure` functions?

Not yet, this is to be done in devfile/api#1435. devfile/api#1434 is just covers the CRD, could also do accessor functions under defaults.go too to match your other PRs.

cc: @thepetk

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 26.23%. Comparing base (a9f14a4) to head (821b9ad).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
- Coverage   27.10%   26.23%   -0.87%     
==========================================
  Files          25       25              
  Lines        1428     1433       +5     
==========================================
- Hits          387      376      -11     
- Misses       1020     1032      +12     
- Partials       21       25       +4     

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

@thepetk thepetk marked this pull request as ready for review March 4, 2024 15:14
@thepetk thepetk changed the title Draft: Add ingressClass field Add ingressClass field Mar 4, 2024
@thepetk thepetk changed the title Add ingressClass field Add ingressClass CRD field Mar 4, 2024
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.

I think similar changes to defaults.go under #76 should be done here as well.

Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
@thepetk thepetk force-pushed the ft/add_ingressClass_resource_field branch from 177ea6a to 821b9ad Compare March 6, 2024 13:04
@thepetk
Copy link
Contributor Author

thepetk commented Mar 6, 2024

I think similar changes to defaults.go under #76 should be done here as well.

Done!

@thepetk
Copy link
Contributor Author

thepetk commented Mar 6, 2024

@michael-valdron I feel the code coverage check could be skipped as is only -0,87% and I think the PR covers all test cases needed. WDYT?

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

Copy link

openshift-ci bot commented Mar 6, 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
Copy link
Member

@michael-valdron I feel the code coverage check could be skipped as is only -0,87% and I think the PR covers all test cases needed. WDYT?

@thepetk Yeah I think your test coverage is sufficient here.

@thepetk thepetk merged commit 29aef03 into devfile:main Mar 6, 2024
10 of 11 checks passed
thepetk added a commit to thepetk/devfile-registry-operator that referenced this pull request Aug 20, 2024
* Add ingressClass field

Signed-off-by: thepetk <thepetk@gmail.com>

* Update description for ingressClass

Signed-off-by: thepetk <thepetk@gmail.com>

* Update defaults with k8s ingress class

Signed-off-by: thepetk <thepetk@gmail.com>

---------

Signed-off-by: thepetk <thepetk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants