aks-app-routing-operator
aks-app-routing-operator copied to clipboard
adding custom-http-errors field to crd
Description
These changes add access to the custom-http-errors configmap options via the CRD. This redirects the specified error codes to the default backend for handling (i.e. custom error pages)
apiVersion: 'approuting.kubernetes.azure.com/v1alpha1'
kind: NginxIngressController
metadata:
name: custom-errors-nic
spec:
controllerNamePrefix: nginx
ingressClassName: nginx.approuting.kubernetes.azure.com
defaultBackendService:
name: example-service
namespace: example-namespace
customHTTPErrors:
- 404
- 503
Fixes # (issue) Feature # (details)
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Is it a breaking change which will impact consuming tool(s)?
- [X] Unit tests
- [X] e2e tests
Checklist:
- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my code
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I have made corresponding changes to the documentation
- [X] My changes generate no new warnings
- [X] I have added tests that prove my fix is effective or that my feature works
- [X] New and existing unit tests pass locally with my changes
- [X] Any dependent changes have been merged and published in downstream modules
Pull Request Test Coverage Report for Build 9455033482
Details
- 12 of 36 (33.33%) changed or added relevant lines in 3 files are covered.
- 1 unchanged line in 1 file lost coverage.
- Overall coverage decreased (-0.5%) to 78.693%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| pkg/controller/nginxingress/nginx_ingress_controller.go | 4 | 10 | 40.0% |
| api/v1alpha1/zz_generated.deepcopy.go | 2 | 20 | 10.0% |
| <!-- | Total: | 12 | 36 |
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| pkg/controller/ingress/concurrency_watchdog.go | 1 | 86.41% |
| <!-- | Total: | 1 |
| Totals | |
|---|---|
| Change from base Build 9419625989: | -0.5% |
| Covered Lines: | 3010 |
| Relevant Lines: | 3825 |
💛 - Coveralls
/ok-to-test sha=03d996c
/ok-to-test sha=77317f7
/ok-to-test sha=b82e1c5
/ok-to-test sha=9d210c3
/ok-to-test sha=b8de8f4
/ok-to-test sha=962e73c
e2e seems to be failing due to insufficient capacity for osm
/ok-to-test sha=2d6d210
/ok-to-test sha=450ac11
/ok-to-test sha=6e844c3