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

RFC0027 CLI command "update-route" to manage generic per-route options #3338

Draft
wants to merge 4 commits into
base: v8
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/cloudcontroller/ccversion/minimum_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ const (

MinVersionLogRateLimitingV3 = "3.124.0" // TODO: update this when we have a CAPI release

MinVersionCNB = "3.168.0"
MinVersionCNB = "3.168.0"
MinVersionPerRouteOpts = "3.183.0"
)
18 changes: 10 additions & 8 deletions cf/actors/actorsfakes/fake_route_actor.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions cf/actors/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const tcp = "tcp"

type RouteActor interface {
CreateRandomTCPRoute(domain models.DomainFields) (models.Route, error)
FindOrCreateRoute(hostname string, domain models.DomainFields, path string, port int, useRandomPort bool) (models.Route, error)
FindOrCreateRoute(hostname string, domain models.DomainFields, path string, port int, useRandomPort bool, option string) (models.Route, error)
BindRoute(app models.Application, route models.Route) error
UnbindAll(app models.Application) error
FindDomain(routeName string) (string, models.DomainFields, error)
Expand Down Expand Up @@ -47,15 +47,15 @@ func (routeActor routeActor) CreateRandomTCPRoute(domain models.DomainFields) (m
"Domain": terminal.EntityNameColor(domain.Name),
}) + "...")

route, err := routeActor.routeRepo.Create("", domain, "", 0, true)
route, err := routeActor.routeRepo.Create("", domain, "", 0, true, "")
if err != nil {
return models.Route{}, err
}

return route, nil
}

func (routeActor routeActor) FindOrCreateRoute(hostname string, domain models.DomainFields, path string, port int, useRandomPort bool) (models.Route, error) {
func (routeActor routeActor) FindOrCreateRoute(hostname string, domain models.DomainFields, path string, port int, useRandomPort bool, option string) (models.Route, error) {
var route models.Route
var err error
//if tcp route use random port should skip route lookup
Expand Down Expand Up @@ -84,7 +84,7 @@ func (routeActor routeActor) FindOrCreateRoute(hostname string, domain models.Do
}),
)

route, err = routeActor.routeRepo.Create(hostname, domain, path, port, false)
route, err = routeActor.routeRepo.Create(hostname, domain, path, port, false, option)
}

routeActor.ui.Ok()
Expand Down Expand Up @@ -223,7 +223,7 @@ func (routeActor routeActor) FindAndBindRoute(routeName string, app models.Appli
return err
}

route, err := routeActor.FindOrCreateRoute(hostname, domain, path, port, appParamsFromContext.UseRandomRoute)
route, err := routeActor.FindOrCreateRoute(hostname, domain, path, port, appParamsFromContext.UseRandomRoute, "")
if err != nil {
return err
}
Expand Down
Loading
Loading