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 license secret and mgmt config map for r33 #6888

Closed
wants to merge 21 commits into from

Conversation

AlexFenlon
Copy link
Contributor

@AlexFenlon AlexFenlon commented Dec 2, 2024

Proposed changes

add initial r33 commit adds license token secret name and mgmt config map.
add app protect 5.4

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@AlexFenlon AlexFenlon requested a review from a team as a code owner December 2, 2024 17:52
@github-actions github-actions bot added enhancement Pull requests for new features/feature enhancements go Pull requests that update Go code python Pull requests that update Python code github_actions Pull requests that update Github_actions code docker Pull requests that update Docker code chore Pull requests for routine tasks tests Pull requests that update tests helm_chart Pull requests that update the Helm Chart labels Dec 2, 2024
Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 31.81818% with 150 lines in your changes missing coverage. Please review.

Project coverage is 52.96%. Comparing base (97055e4) to head (6d9cf6d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/k8s/controller.go 1.66% 57 Missing and 2 partials ⚠️
cmd/nginx-ingress/main.go 0.00% 46 Missing ⚠️
internal/k8s/configmap.go 0.00% 21 Missing ⚠️
internal/configs/configurator.go 70.37% 6 Missing and 2 partials ⚠️
cmd/nginx-ingress/flags.go 0.00% 7 Missing ⚠️
...l/configs/commonhelpers/common_template_helpers.go 0.00% 5 Missing ⚠️
internal/configs/version1/template_helper.go 0.00% 2 Missing ⚠️
internal/k8s/secrets/validation.go 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6888      +/-   ##
==========================================
- Coverage   53.15%   52.96%   -0.19%     
==========================================
  Files          88       88              
  Lines       20396    20595     +199     
==========================================
+ Hits        10842    10909      +67     
- Misses       9111     9239     +128     
- Partials      443      447       +4     

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

if err == nil {
t.Fatal(err)
}
if result.Secrets.License != test.want.Secrets.License {
Copy link
Contributor

Choose a reason for hiding this comment

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

var want here is always nil, correct? Am I right that the table tests here contain values that should make the ParseMGMTConfigMap func return error? If that's true, other returned values are irrelevant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the only way we actually get an error from ParseMGMTConfigMap is from the license

Copy link
Contributor

Choose a reason for hiding this comment

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

So, if the test inspects the License then error should be not nil. In this example if the err == nil the test fails.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have refactored the test, can we have another review on that please

@vepatel vepatel requested a review from a team as a code owner December 3, 2024 14:58
@github-actions github-actions bot added the documentation Pull requests/issues for documentation label Dec 3, 2024
Copy link

github-actions bot commented Dec 3, 2024

Deploy Preview will be available once build job completes!

Name Link
😎 Deploy Preview https://frontdoor-test-docs.nginx.com/previews/nginx-ingress-controller/6888/

cmd/nginx-ingress/main.go Outdated Show resolved Hide resolved
@AlexFenlon AlexFenlon requested a review from jjngx December 3, 2024 16:10
@AlexFenlon AlexFenlon closed this Dec 3, 2024
@AlexFenlon AlexFenlon deleted the feat/add-mgmt-license-and-configmap branch December 6, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks docker Pull requests that update Docker code documentation Pull requests/issues for documentation enhancement Pull requests for new features/feature enhancements github_actions Pull requests that update Github_actions code go Pull requests that update Go code helm_chart Pull requests that update the Helm Chart python Pull requests that update Python code tests Pull requests that update tests
Projects
Status: Done 🚀
Development

Successfully merging this pull request may close these issues.

4 participants