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 10 commits into
base: v8
Choose a base branch
from

Conversation

Dariquest
Copy link

CLI Support for Generic Per-Route Options

Introducing a new cli command 'update-route', which allows updates to route resources.
Extending the API of the Route to contain generic options map.

Detailed specification including that of for all the involved components is provided in the RFC

$ cf update-route -h
NAME:
   update-route - Update an existing route.

USAGE:
   cf update-route DOMAIN [--hostname HOSTNAME] [--path PATH] [--option OPTION=VALUE] [--remove-option OPTION]

EXAMPLES:
   cf update-route example.com -o loadbalancing=round-robin
   cf update-route example.com -o loadbalancing=least-connection
   cf update-route example.com -r loadbalancing

OPTIONS:
   --hostname, -n      Hostname for the HTTP route (required for shared domains)
   --path              Path for the HTTP route
   --option -o         Set the value of a per-route option, key-value pairs, repeat to set multiple options
   --remove-option -r  Unset a previously set option

SEE ALSO:
   create-route, map-route, routes, unmap-route

It should be possible to provide options in the create-route and map-route commands.

EXAMPLES:
  cf create-route my-space example.com -o loadbalancing=round-robin
  cf map-route my-app example.com -o loadbalancing=least-connection

Why Is This PR Valuable?

Allow users to manage per-route options via the CLI instead of having to talk to the API directly.

Applicable Issues

GitHub Issue

How Urgent Is The Change?

No urgency

@MarcPaquette
Copy link
Contributor

MarcPaquette commented Jan 9, 2025

FYI @gururajsh, I also pinged you via gChat

Copy link
Member

@a-b a-b left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution. However, we do not make changes in the cf folder because it predates version 6 and is marked as deprecated. We hope to remove it soon, as plugins are the only reason it remains in the code.

@a-b
Copy link
Member

a-b commented Jan 10, 2025

Also, we noticed that you've made your original request against the main branch - as it should be, but later closed. What was your motivation for this change?

@Dariquest
Copy link
Author

Dariquest commented Jan 13, 2025

Also, we noticed that you've made your original request against the main branch - as it should be, but later closed. What was your motivation for this change?

Hi @a-b, I was advised in the cli channel, that I should develop against the version branches. The new command is intended for the v8 and not for the v7 (as far as I understood from the contribution guide, main will become v9 later, and v8 is the target branch if I intend to add a v8 command). Have I got it wrong?

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.

3 participants