Skip to content

Migrate to V2 metal-apiserver with backwards compatibility. - #51

Open
Gerrit91 wants to merge 7 commits into
mainfrom
metal-apiserver-backwards-compat
Open

Gerrit91 wants to merge 7 commits into
mainfrom
metal-apiserver-backwards-compat

Conversation

@Gerrit91

@Gerrit91 Gerrit91 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

Inspired from #36 but maintaining the old information for current metal-hammer versions.

Depends on:

Here is the output of the future metal-hammer endpoint. We can clean up the contents after the migration:

root@mgmtserver01:~# curl http://<mgmtserver>:4242/config/fab45c59-dcf9-4954-bab1-b024ba6bbdc7
{
  "debug": true,
  "address": "...",
  "metal_api_url": "...",
  "pixie_api_url": "http://<mgmtserver>:4242/certs",
  "ca_cert": "...",
  "cert": "...",
  "key": "...",
  "hmac": "...",
  "partition": "...",
  "metal_apiserver_url": "...",
  "metal_hammer_token": "<machine-token-see-below>",
  "logging": {
    "endpoint": "...",
    "certificate_auth": {
      "cert": "...",
      "key": "..."
    },
    "log_type": "loki"
  }
}

Decoded JWT:

{
    "aud": [
        "..."
    ],
    "exp": 1790597281,
    "iat": 1790338081,
    "iss": "...",
    "jti": "01a0d877-234a-70dd-b117-3864e32b94e0",
    "nbf": 1790338081,
    "sub": "01a0d225-fde5-7609-a0fc-241b177eaf41",
    "type": "TOKEN_TYPE_API"
}

❯ metalctlv2 admin token describe 01a0d877-234a-70dd-b117-3864e32b94e0 
uuid: 01a0d877-234a-70dd-b117-3864e32b94e0
user: 01a0d225-fde5-7609-a0fc-241b177eaf41
meta:
    createdAt: "2026-09-25T12:08:01.610053141Z"
description: machine token for 00000000-0000-0000-0000-7cc2555422c0
expires: "2026-09-28T12:08:01.610053141Z"
issuedAt: "2026-09-25T12:08:01.610053141Z"
tokenType: TOKEN_TYPE_API
machineRoles:
    fab45c59-dcf9-4954-bab1-b024ba6bbdc7: MACHINE_ROLE_EDITOR

Used AI-Tools ✨

  • None used for generation

@Gerrit91
Gerrit91 force-pushed the metal-apiserver-backwards-compat branch from bcb341e to 5a11f3c Compare September 23, 2026 11:08
@mwennrich

Copy link
Copy Markdown
Contributor

FYI: current main is broken for some machinetypes (#47)

@Gerrit91
Gerrit91 marked this pull request as ready for review September 25, 2026 12:13
@Gerrit91
Gerrit91 requested a review from a team as a code owner September 25, 2026 12:13
@Gerrit91 Gerrit91 changed the title Migrate to metal-apiserver with backwards compatibility. Migrate to V2 metal-apiserver with backwards compatibility. Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants