Skip to content

microvm: ingress URL add/remove/list + create opt-out (MDROP-596) - #2060

Merged
anup-deka merged 3 commits into
digitalocean:mainfrom
schakraborty-do:schakraborty/microvm-ingress-urls
Oct 21, 2026
Merged

anup-deka merged 3 commits into
digitalocean:mainfrom
schakraborty-do:schakraborty/microvm-ingress-urls

Conversation

@schakraborty-do

@schakraborty-do schakraborty-do commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds doctl support for MicroVM ingress URLs (MDROP-596):

  • doctl microvm create gains a --ingress flag (default true) to opt out of automatic ingress URL provisioning at create time.
  • New doctl microvm url command group (alias urls):
    • list <microvm-id> — list a MicroVM's ingress URLs.
    • add <microvm-id> --port <1-65535> — add an ingress URL for a port.
    • remove <microvm-id> <url-id> — remove an ingress URL (--force to skip confirmation).

Implementation

  • do/microvms.go: service wrapper gains AddURL/RemoveURL.
  • commands/microvms.go: new url subcommand tree + --ingress create flag.
  • commands/displayers/microvm.go: MicroVMURL displayer (ID, Hostname, Port, Default, Status).
  • do/mocks/MicroVMsService.go: regenerated.
  • Unit tests for the new commands and the create opt-out.

Dependencies

Depends on godo MicroVM URL bindings (MicroVMsService.AddURL/RemoveURL, MicroVMCreateRequest.Ingress) from digitalocean/godo#1174, included in tagged godo v1.230.0 (digitalocean/godo#1181).

Proof of testing

  • Unit tests
  • Integration tests
  • Manual testing
go test ./commands/ -run MicroVM   # ok
go build ./do/... ./commands/...    # ok

Jira: https://do-internal.atlassian.net/browse/MDROP-596

@schakraborty-do
schakraborty-do force-pushed the schakraborty/microvm-ingress-urls branch from 6462157 to 461ddd5 Compare October 20, 2026 06:59
Comment thread commands/microvms.go
"Lists the public ingress URLs attached to a MicroVM, the system default URL included.",
Writer, aliasOpt("ls"), displayerType(&displayers.MicroVMURL{}))

cmdAdd := CmdBuilder(cmd, RunMicroVMURLAdd, "add <microvm-id>",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Getting 405 Method not allowed for this command

schakraborty-do and others added 2 commits October 21, 2026 19:36
…(MDROP-596)

New: 'doctl compute microvm url {list,add,remove}' and '--ingress' on create (pass --ingress=false to skip the default URL). Wraps godo MicroVMsService.AddURL/RemoveURL and MicroVMCreateRequest.Ingress.
Co-authored-by: Cursor <cursoragent@cursor.com>
Pins github.com/digitalocean/godo to the merged commit dd8de92 (pseudo-version v1.229.1-0.20261019175741-dd8de92b0bd9), which adds MicroVMsService.AddURL/RemoveURL and MicroVMCreateRequest.Ingress. Re-pin to the next tagged godo release (>= v1.230.0) once it is cut.

Co-authored-by: Cursor <cursoragent@cursor.com>
@schakraborty-do
schakraborty-do force-pushed the schakraborty/microvm-ingress-urls branch from 461ddd5 to 74eef4b Compare October 21, 2026 14:09
Comment thread go.mod Outdated
github.com/blang/semver v3.5.1+incompatible
github.com/creack/pty v1.1.21
github.com/digitalocean/godo v1.229.0
github.com/digitalocean/godo v1.229.1-0.20261019175741-dd8de92b0bd9

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

keep the version v1.229.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We can't stay on v1.229.0 for this PR — that tag is the parent of godo #1174 and does not include MicroVMsService.AddURL / RemoveURL or MicroVMCreateRequest.Ingress (confirmed against the v1.229.0 tree). Those APIs landed in dd8de92, which is one commit after v1.229.0 and is not in a tagged release yet.

So this PR has to pin the pseudo-version v1.229.1-0.20261019175741-dd8de92b0bd9 until the next godo tag that includes #1174 (expected >= v1.230.0). Happy to re-pin as soon as that release is cut.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated — pinned to tagged godo v1.230.0 (includes #1174 via digitalocean/godo#1181).

Replaces the dd8de92 pseudo-version with the tagged release that includes
godo digitalocean#1174 (AddURL/RemoveURL + create Ingress opt-out).

Co-authored-by: Cursor <cursoragent@cursor.com>

@anup-deka anup-deka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@anup-deka
anup-deka merged commit d0db360 into digitalocean:main Oct 21, 2026
9 checks passed
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.

2 participants

⌂ 换网址