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

Set traefik as default router, fixes #4679 #4983

Merged
merged 33 commits into from
Jun 25, 2023

Conversation

rfay
Copy link
Member

@rfay rfay commented Jun 14, 2023

The Issue

How This PR Solves The Issue

  • Traefik is default
  • New global config router: traefik or router: nginx-proxy
  • New ddev config global --router=traefik

TODO

  • Re-enable and merge TestCmdConfigGlobal - it's pending changes in Add global router_http(s)_port config, fixes #3240 #4640
  • Add test coverage for router into TestCmdConfigGlobal
  • ddev describe currently shows something other than "traditional" or whatever. Use the correct value.
  • Implement @mattstein 's new diagram
  • Implement @gilbertsoft suggestion of typed strings.
  • Add IsTraefik() instead of awkward if globalconfig.DdevGlobalConfig.Router == nodeps.TraefikRouter && status == SiteRunning
  • Use constants in initializations in globalconfig.New()

Manual Testing Instructions

  • Try switching between traefik and traditional, verify behavior in each.
  • Make sure that existing use-traefix configuration in global_config.yaml doesn't break anything.

Automated Testing Overview

  • Updated tests

Release/Deployment Notes

  • Info about this change goes into release notes

@github-actions
Copy link

github-actions bot commented Jun 14, 2023

@rfay rfay force-pushed the 20230614_traefik_default branch from 271dc5b to df67c68 Compare June 15, 2023 20:44
@rfay rfay marked this pull request as ready for review June 15, 2023 21:27
@rfay rfay requested review from a team as code owners June 15, 2023 21:27
@rfay rfay requested review from gilbertsoft and tyler36 June 15, 2023 21:27
Copy link
Member

@gilbertsoft gilbertsoft left a comment

Choose a reason for hiding this comment

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

Had a frist look and found some minor conceptual issues which we should agree how to handle. Maybe also something to discuss on Tuesday.

pkg/nodeps/values.go Outdated Show resolved Hide resolved
pkg/nodeps/values.go Outdated Show resolved Hide resolved
pkg/nodeps/values.go Outdated Show resolved Hide resolved
pkg/globalconfig/values.go Outdated Show resolved Hide resolved
pkg/globalconfig/values.go Outdated Show resolved Hide resolved
pkg/globalconfig/global_config.go Outdated Show resolved Hide resolved
pkg/globalconfig/global_config.go Outdated Show resolved Hide resolved
pkg/ddevapp/ddevapp.go Outdated Show resolved Hide resolved
pkg/ddevapp/config.go Outdated Show resolved Hide resolved
docs/content/users/configuration/config.md Outdated Show resolved Hide resolved
docs/content/users/configuration/config.md Outdated Show resolved Hide resolved
docs/content/users/configuration/traefik-router.md Outdated Show resolved Hide resolved
docs/content/users/configuration/traefik-router.md Outdated Show resolved Hide resolved
docs/content/users/configuration/traefik-router.md Outdated Show resolved Hide resolved
@mattstein
Copy link
Sponsor Collaborator

Here’s an updated file for /images/container-diagram.png:

container-diagram

@rfay rfay requested a review from gilbertsoft June 23, 2023 21:27
Copy link
Member

@gilbertsoft gilbertsoft left a comment

Choose a reason for hiding this comment

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

Had a quick look a made some more suggestions.

pkg/globalconfig/globalconfigtypes/globalconfig_types.go Outdated Show resolved Hide resolved
pkg/globalconfig/globalconfigtypes/globalconfig_types.go Outdated Show resolved Hide resolved
pkg/globalconfig/globalconfigtypes/globalconfig_types.go Outdated Show resolved Hide resolved
cmd/ddev/cmd/config-global.go Outdated Show resolved Hide resolved
cmd/ddev/cmd/config-global.go Outdated Show resolved Hide resolved
cmd/ddev/cmd/config-global_test.go Show resolved Hide resolved
cmd/ddev/cmd/config-global_test.go Show resolved Hide resolved
cmd/ddev/cmd/debug-router-nginx-config.go Outdated Show resolved Hide resolved
pkg/ddevapp/amplitude_project.go Outdated Show resolved Hide resolved
pkg/globalconfig/global_config.go Outdated Show resolved Hide resolved
@rfay rfay force-pushed the 20230614_traefik_default branch from ebe22d9 to dd2ae54 Compare June 24, 2023 20:45
@rfay rfay requested a review from gilbertsoft June 24, 2023 20:45
Copy link
Member

@gilbertsoft gilbertsoft left a comment

Choose a reason for hiding this comment

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

Looks good!

@rfay
Copy link
Member Author

rfay commented Jun 24, 2023

Thanks, I'll wait until upstream/master tests look mostly done.

@rfay rfay force-pushed the 20230614_traefik_default branch from 8678699 to 5fe7f7d Compare June 25, 2023 02:47
@rfay rfay merged commit 8ce4d1e into ddev:master Jun 25, 2023
20 checks passed
@rfay rfay deleted the 20230614_traefik_default branch June 25, 2023 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants