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

Clean up Route resources from codebase #6099

Closed
Tracked by #6375
nithyatsu opened this issue Aug 21, 2023 · 2 comments · Fixed by #6241 or #7342
Closed
Tracked by #6375

Clean up Route resources from codebase #6099

nithyatsu opened this issue Aug 21, 2023 · 2 comments · Fixed by #6241 or #7342
Assignees
Labels
triaged This issue has been reviewed and triaged

Comments

@nithyatsu
Copy link
Contributor

nithyatsu commented Aug 21, 2023

We should clean up Route resources from Radius codebase before OSS since DNS-SD support without the need for routes is now available. This is necessary to avoid open sourcing the routes implementation while we want Radius users to move away from using this concept.

AB#9043

@nithyatsu nithyatsu self-assigned this Aug 21, 2023
@nithyatsu nithyatsu changed the title Clean up HTTPRoutes from codebase Clean up Route resources from codebase Aug 21, 2023
@shalabhms shalabhms added triaged This issue has been reviewed and triaged nov-release labels Aug 21, 2023
nithyatsu added a commit that referenced this issue Nov 10, 2023
…as part of container rendering. (#6241)

# Description

We now have the ability to deploy k8s services as part of container
rendering (ref #6375)
This PR updates all the radius repo tests and samples 
- to remove the httproute constructs from bicep
- update service names to match the service generation logic (service
name = name of the container providing a service, which is inferred from
the presence of port construct. "connections" have url as desitination.)

## Type of change


- This pull request is a minor refactor, code cleanup, test improvement,
or other maintenance task and doesn't change the functionality of Radius
(issue link optional).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: #6099 

## Auto-generated summary

<!--
GitHub Copilot for docs will auto-generate a summary of the PR
-->

<!--
copilot:all
-->
### <samp>🤖 Generated by Copilot at e22a126</samp>

### Summary
🌐🛠️🗑️

<!--
1. 🌐 - This emoji represents the DNS service generation feature, which
allows users to create services with different port and target port
values for containers. It also implies networking and communication
between containers and other resources.
2. 🛠️ - This emoji represents the simplification and refactoring of the
container renderer code, which improves the readability and
maintainability of the code. It also implies fixing a typo and using a
more appropriate data structure for the container ports.
3. 🗑️ - This emoji represents the removal of unnecessary and unused
resources and fields from the test cases, which reduces the complexity
and clutter of the test code. It also implies cleaning up and
simplifying the test scenarios.
-->
This pull request simplifies the service generation logic for datastores
and containers in the radius project. It removes the dependency on
httpRoutes resources for datastores, and allows specifying different
port and target port values for containers. It updates the renderers,
test cases, and test data files accordingly.

> _This pull request makes some changes_
> _To how container rendering ranges_
> _It removes httpRoutes_
> _And simplifies routes_
> _For datastores and their exchanges_

### Walkthrough
* Refactor containerPorts struct to use corev1.ServicePort slice and
assign port field if missing
([link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-3da981bf20df07918a646eafcd867d6c95abac1f3aef1ed1b50a29f3f4cc8636L242-R267),
[link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-3da981bf20df07918a646eafcd867d6c95abac1f3aef1ed1b50a29f3f4cc8636L274-R280),
[link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-3da981bf20df07918a646eafcd867d6c95abac1f3aef1ed1b50a29f3f4cc8636L287-R288))
* Update test case for DNS service generation in `render_test.go` to use
different container and service port numbers and add port field to
container port definition
([link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-6f1219f263ab06a1493ac76960e2ab8cbe647e83e926bff7d13988f393334f94L1541-R1542),
[link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-6f1219f263ab06a1493ac76960e2ab8cbe647e83e926bff7d13988f393334f94R1553),
[link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-6f1219f263ab06a1493ac76960e2ab8cbe647e83e926bff7d13988f393334f94L1568-R1571))
* Fix typo in error message for invalid ports definition in `render.go`
([link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-3da981bf20df07918a646eafcd867d6c95abac1f3aef1ed1b50a29f3f4cc8636L186-R197))
* Remove httpRoutes resource definition and validation for MongoDB,
Redis, and SQL test cases in `mongodb_test.go`, `redis_test.go`, and
`sql_test.go`
([link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-3537a95d4323706fe81435869ceaee11338952061d8f3c4d4c0dd526d761b440L55-L59),
[link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-3537a95d4323706fe81435869ceaee11338952061d8f3c4d4c0dd526d761b440L71),
[link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-9d52e2b8eb6c0350242880d948ab606e69c8f49b293bc6ad92597aaeaafd26b6L53-L57),
[link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-9d52e2b8eb6c0350242880d948ab606e69c8f49b293bc6ad92597aaeaafd26b6L69),
[link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-61544cabd23b93b06160db8c149184ecef9601bfc914d7c095e623243cce34ecL58-L62),
[link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-61544cabd23b93b06160db8c149184ecef9601bfc914d7c095e623243cce34ecL74))
* Remove provides field from container port definition for MongoDB and
SQL test cases in `datastoresrp-rs-mongodb-manual.bicep` and
`datastoresrp-resources-sqldb-manual.bicep`
([link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-43654e758afeecffd627e6a77947c820172d7650475573e5c241138c54a8a740L55),
[link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-bc362702cbffa6fe723a2b733164d41b24270dd76dbe9e775ad40fa2ee04202fL101))
* Add port field to container port definition for Redis test case in
`datastoresrp-resources-redis-manual.bicep`
([link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-ec82efbd13c3858a4502bc3c0cab33f23a8edddd7f8e71eccc1d7593c952cf8cL48-R48))
* Update host, port, and connectionString fields for MongoDB, Redis, and
SQL test cases in `datastoresrp-rs-mongodb-manual.bicep`,
`datastoresrp-resources-redis-manual.bicep`, and
`datastoresrp-resources-sqldb-manual.bicep` to use container name and
port instead of httpRoutes hostname and port
([link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-ec82efbd13c3858a4502bc3c0cab33f23a8edddd7f8e71eccc1d7593c952cf8cL71-R68),
[link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-bc362702cbffa6fe723a2b733164d41b24270dd76dbe9e775ad40fa2ee04202fL66-R69),
[link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-43654e758afeecffd627e6a77947c820172d7650475573e5c241138c54a8a740L84-R75))
* Remove httpRoutes resource definition for MongoDB, Redis, and SQL test
cases in `datastoresrp-rs-mongodb-manual.bicep`,
`datastoresrp-resources-redis-manual.bicep`, and
`datastoresrp-resources-sqldb-manual.bicep`
([link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-ec82efbd13c3858a4502bc3c0cab33f23a8edddd7f8e71eccc1d7593c952cf8cL56-R57),
[link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-bc362702cbffa6fe723a2b733164d41b24270dd76dbe9e775ad40fa2ee04202fL77-L85),
[link](https://github.com/radius-project/radius/pull/6241/files?diff=unified&w=0#diff-43654e758afeecffd627e6a77947c820172d7650475573e5c241138c54a8a740L63-L70))
@willtsai
Copy link
Contributor

willtsai commented Feb 1, 2024

reopening this issue to address removing httpRoutes from the eshop sample (radius-project/samples#574)

@willtsai willtsai reopened this Feb 1, 2024
@willtsai willtsai removed the triaged This issue has been reviewed and triaged label Feb 1, 2024
@nicolejms nicolejms added the triaged This issue has been reviewed and triaged label Feb 5, 2024
@radius-triage-bot
Copy link

👍 We've reviewed this issue and have agreed to add it to our backlog. Please subscribe to this issue for notifications, we'll provide updates when we pick it up.

We also welcome community contributions! If you would like to pick this item up sooner and submit a pull request, please visit our contribution guidelines and assign this to yourself by commenting "/assign" on this issue.

For more information on our triage process please visit our triage overview

rynowak added a commit to rynowak/radius that referenced this issue Mar 15, 2024
Fixes: radius-project#6099

This change removes the httpRoute type. We've already removed this from documentation and samples and so this is the final removal.

Feels good 👍
Signed-off-by: Ryan Nowak <nowakra@gmail.com>
rynowak added a commit to rynowak/radius that referenced this issue Apr 13, 2024
Fixes: radius-project#6099

This change removes the httpRoute type. We've already removed this from documentation and samples and so this is the final removal.

Feels good 👍
Signed-off-by: Ryan Nowak <nowakra@gmail.com>
rynowak added a commit to rynowak/radius that referenced this issue Apr 14, 2024
Fixes: radius-project#6099

This change removes the httpRoute type. We've already removed this from documentation and samples and so this is the final removal.

Feels good 👍
Signed-off-by: Ryan Nowak <nowakra@gmail.com>
rynowak added a commit to rynowak/radius that referenced this issue Apr 14, 2024
Fixes: radius-project#6099

This change removes the httpRoute type. We've already removed this from documentation and samples and so this is the final removal.

Feels good 👍
Signed-off-by: Ryan Nowak <nowakra@gmail.com>
rynowak added a commit that referenced this issue Apr 15, 2024
# Description



This change removes the httpRoute type. We've already removed this from
documentation and samples and so this is the final removal.

Feels good 👍

## Type of change

- This pull request adds or changes features of Radius and has an
approved issue (issue link required).

Fixes: #6099

Signed-off-by: Ryan Nowak <nowakra@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged This issue has been reviewed and triaged
Projects
None yet
5 participants