Skip to content

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

Merged
Gerrit91 merged 10 commits into
mainfrom
metal-apiserver-backwards-compat
Sep 28, 2026
Merged

Gerrit91 merged 10 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 old endpoint after the migration:

root@mgmtserver01:~# curl http://<mgmtserver>:4242/config/fab45c59-dcf9-4954-bab1-b024ba6bbdc7
{
  "client": {
    "metal_apiserver_url": "...",
    "metal_hammer_token": "<see-contents-below>"
  },
  "partition": "...",
  "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
@Gerrit91

Copy link
Copy Markdown
Contributor Author

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

Now fixed with #48. So this one should also be good to go.

@iljarotar iljarotar left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good to me. Only minor remarks.

Comment thread api/api.go
Comment thread pixiecore/booters.go
@Gerrit91
Gerrit91 merged commit 0246481 into main Sep 28, 2026
3 checks passed
@Gerrit91
Gerrit91 deleted the metal-apiserver-backwards-compat branch September 28, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants