Skip to content

Migrate to metal-apiserver - #61

Draft
majst01 wants to merge 33 commits into
masterfrom
migrate-to-metal-apiserver
Draft

Migrate to metal-apiserver#61
majst01 wants to merge 33 commits into
masterfrom
migrate-to-metal-apiserver

Conversation

@majst01

@majst01 majst01 commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

Description

Next part of MEP-4

TODO:

  • adopt metal-roles
  • enable token refresh

Closes: #62

Required Actions

metal-console was the has been migrated to use the V2 API. To deploy it, please add the following role to your control plane playbook: `metal-roles/common/roles/metal-v2-client`. The metal-console maintains backwards compatibility with V1, meaning that it is still possible to use `metalctl` for console access as usual. However, at some point, this compatibility will be removed.

@metal-robot metal-robot Bot added the area: control-plane Affects the metal-stack control-plane area. label Aug 20, 2025
@majst01
majst01 force-pushed the migrate-to-metal-apiserver branch from 16c0fe7 to 2c10566 Compare January 21, 2026 12:27
@Gerrit91

Copy link
Copy Markdown
Contributor

Not sure if it would accelerate things if we reconsider the idea of supporting both incoming tokens (metal-api and metal-apiserver, distinguished by passing a separate environment variable). This would not break existing clients at all and we would not need a lot of deployment changes. I think the code base of this repository is simple enough to realize this. For bigger clients this might be the wrong choice but here I would say it would make the migration way easier.

@Gerrit91
Gerrit91 marked this pull request as ready for review August 14, 2026 09:14
@Gerrit91
Gerrit91 requested a review from a team as a code owner August 14, 2026 09:14
resp, err := cs.client.Machine().FindMachine(machine.NewFindMachineParams().WithID(machineID), nil)
if err != nil || resp == nil || resp.Payload == nil {
// we must use adminv2 because otherwise project must be passed which is not known here
resp, err := cs.apiv2client.Adminv2().Machine().Get(s.Context(), &adminv2.MachineServiceGetRequest{

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.

I am still a bit hesitant to use an admin endpoint in the service, which is initially why we added an infra API. Introducing another endpoint for the metal-console in infra feels a bit cleaner to me. It can also request all machines but only gets back the information it really needs (SSH pub keys?).

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.

SSH Publickeys and Machine Type (machine/firewall) and if the allocation changed to terminate existing console session in such a case.

@majst01

majst01 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

replaced by #66

@majst01
majst01 marked this pull request as draft September 4, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: control-plane Affects the metal-stack control-plane area.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Migrate to MEP-4

2 participants