Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f369128
Migrate to metal-apiserver
majst01 Jun 23, 2025
fefc8c8
Update api dep
majst01 Jul 15, 2025
fc923a3
Update api
majst01 Aug 20, 2025
8a3dc03
Update deps
majst01 Sep 3, 2025
267f24d
Wrong error logs
majst01 Sep 3, 2025
e216306
update ci
majst01 Sep 3, 2025
bf38706
Back to 1.24
majst01 Sep 3, 2025
e6e66c0
Down to go-1.24
majst01 Sep 3, 2025
68091da
Split ipxe and pixiecore build
majst01 Sep 5, 2025
b8a8224
Merge main
majst01 Sep 5, 2025
3bebf8e
Update deps
majst01 Oct 9, 2025
a0f3b05
Update api
majst01 Oct 17, 2025
a2e6edd
go mod tidy
majst01 Oct 29, 2025
0d94806
merge main
majst01 Oct 31, 2025
156ef5e
Satisfy linter
majst01 Oct 31, 2025
530e3a0
Satisfy linter
majst01 Oct 31, 2025
9acc840
Update api
majst01 Dec 7, 2025
8ee83de
Merge main
majst01 Dec 7, 2025
f8c7f2f
Update api
majst01 Jan 5, 2026
44878cb
run go fix
majst01 Feb 12, 2026
4e39371
component ping
majst01 Feb 22, 2026
6e7c0d1
set identifier on ping
majst01 Feb 27, 2026
ec78885
Merge branch 'main' of https://github.com/metal-stack/pixie into migr…
majst01 Mar 2, 2026
b174524
Updates
majst01 Mar 2, 2026
ba46dc2
update api
majst01 Apr 9, 2026
1bc36e0
Update
majst01 Apr 22, 2026
711496b
Merge branch 'main' of https://github.com/metal-stack/pixie into migr…
majst01 May 16, 2026
4ea8270
Update deps
majst01 May 16, 2026
01e4ac2
Change rest endpoint for metal-hammer to include uuid
majst01 May 16, 2026
a54cd46
Update deps
majst01 Jul 5, 2026
8b0f1da
Update go modules
majst01 Jul 22, 2026
ab01fc1
go-1.27 and update modules
majst01 Sep 5, 2026
9118196
Fix metalconfig creation to be thread safe
majst01 Sep 5, 2026
1ce6e4d
Create token for the metal-hammer user
majst01 Sep 5, 2026
6d3b339
Refresh token
majst01 Sep 5, 2026
0e33872
Merge branch 'main' of https://github.com/metal-stack/pixie into migr…
majst01 Sep 5, 2026
f1a73f0
Merge main
majst01 Sep 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ jobs:

steps:
- name: Log in to the Container registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Check out code into the Go module directory
uses: actions/checkout@v5
uses: actions/checkout@v7

- name: Set up Go 1.25
uses: actions/setup-go@v5
- name: Set up Go 1.27
uses: actions/setup-go@v7
with:
go-version: "1.25"
go-version: "1.27"
cache: false

- name: fake ipxe binary
Expand All @@ -43,7 +43,7 @@ jobs:
touch ipxe/ipxe/bin/ipxe.bin

- name: Lint
uses: golangci/golangci-lint-action@v8
uses: golangci/golangci-lint-action@v9
with:
args: --timeout=3m

Expand All @@ -58,10 +58,10 @@ jobs:
[ "${GITHUB_EVENT_NAME}" == 'push' ] && echo "tag=latest" >> $GITHUB_ENV || true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Build and push image
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
push: true
Expand Down
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# be aware that bookworm has a newer gcc which can not compile the older ipxe
# newer ipxe can only be used if https://github.com/metal-stack/pixie/issues/34
# is not happening anymore
FROM debian:bullseye AS ipxe-builder
FROM debian:13 AS ipxe-builder
WORKDIR /work
COPY . .
RUN apt update \
Expand All @@ -14,7 +11,7 @@ RUN apt update \
make \
&& make ipxe

FROM golang:1.25-trixie AS builder
FROM golang:1.27-trixie AS builder
WORKDIR /work
COPY . .
COPY --from=ipxe-builder /work/ipxe/ipxe /work/ipxe/ipxe
Expand Down
18 changes: 8 additions & 10 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ package api

// MetalConfig is consumed by metal-hammer to get all options to open a grpc connection to the metal-api
type MetalConfig struct {
Debug bool `json:"debug"`
GRPCAddress string `json:"address,omitempty"`
MetalAPIUrl string `json:"metal_api_url,omitempty"`
PixieAPIURL string `json:"pixie_api_url"`
CACert string `json:"ca_cert,omitempty"`
Cert string `json:"cert,omitempty"`
Key string `json:"key,omitempty"`
HMAC string `json:"hmac,omitempty"`
NTPServers []string `json:"ntp_servers,omitempty"`
Partition string `json:"partition"`
Debug bool `json:"debug"`
MetalAPIServerUrl string `json:"metal_apiserver_url,omitempty"`
MetalAPIServerTokenPath string `json:"metal_apiserver_token_path,omitempty"`
MetalAPIServerTokenForHammer string `json:"metal_apiserver_token_for_hammer,omitempty"`
MetalAPIUrl string `json:"metal_api_url,omitempty"`
PixieAPIUrl string `json:"pixie_api_url"`
NTPServers []string `json:"ntp_servers,omitempty"`
Partition string `json:"partition"`
// Logging contains logging configurations passed to metal-hammer
Logging *Logging `json:"logging,omitempty"`
}
Expand Down
5 changes: 2 additions & 3 deletions dhcp4/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"errors"
"fmt"
"io"
"maps"
"net"
"sort"
)
Expand Down Expand Up @@ -134,9 +135,7 @@ func (o Options) Marshal() ([]byte, error) {
// Copy returns a shallow copy of o.
func (o Options) Copy() Options {
ret := make(Options, len(o))
for k, v := range o {
ret[k] = v
}
maps.Copy(ret, o)
return ret
}

Expand Down
11 changes: 5 additions & 6 deletions dhcp4/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"errors"
"fmt"
"io"
"maps"
"net"
"sort"
)
Expand Down Expand Up @@ -197,9 +198,7 @@ func (p *Packet) Marshal() ([]byte, error) {
ret.Write([]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0})

opts := make(Options, len(p.Options)+1)
for k, v := range p.Options {
opts[k] = v
}
maps.Copy(opts, p.Options)
opts[53] = []byte{byte(p.Type)}
if optsInSname {
opts, err = opts.marshalLimited(ret, 64, true)
Expand Down Expand Up @@ -339,9 +338,9 @@ func Unmarshal(bs []byte) (*Packet, error) {
}

func nullStr(bs []byte) (string, bool) {
i := bytes.IndexByte(bs, 0)
if i == -1 {
before, _, ok := bytes.Cut(bs, []byte{0})
if !ok {
return "", false
}
return string(bs[:i]), true
return string(before), true
}
50 changes: 26 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
module github.com/metal-stack/pixie

go 1.25
go 1.27

require (
github.com/metal-stack/metal-api v0.42.4
github.com/metal-stack/api v0.5.5
github.com/metal-stack/v v1.0.3
github.com/pin/tftp/v3 v3.1.0
github.com/prometheus/client_golang v1.23.2
github.com/spf13/cobra v1.10.1
github.com/pin/tftp/v3 v3.2.0
github.com/prometheus/client_golang v1.24.1
github.com/spf13/cobra v1.10.2
github.com/spf13/viper v1.21.0
github.com/stretchr/testify v1.11.1
golang.org/x/crypto v0.43.0
golang.org/x/net v0.46.0
google.golang.org/grpc v1.76.0
github.com/stretchr/testify v1.12.1
golang.org/x/crypto v0.56.0
golang.org/x/net v0.58.0
google.golang.org/protobuf v1.36.12
)

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.12-20260825204119-511051f7f437.2 // indirect
connectrpc.com/connect v1.20.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/fsnotify/fsnotify v1.10.1 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/golang-jwt/jwt/v5 v5.3.1 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/klauspost/compress v1.20.0 // indirect
github.com/klauspost/connect-compress/v2 v2.1.1 // indirect
github.com/minio/minlz v1.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.67.2 // indirect
github.com/prometheus/procfs v0.19.1 // indirect
github.com/pelletier/go-toml/v2 v2.4.3 // indirect
github.com/prometheus/client_model v0.6.3 // indirect
github.com/prometheus/common v0.71.0 // indirect
github.com/prometheus/procfs v0.22.0 // indirect
github.com/sagikazarmark/locafero v0.12.0 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.30.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 // indirect
google.golang.org/protobuf v1.36.10 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
go.yaml.in/yaml/v3 v3.0.5 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/text v0.41.0 // indirect
)
Loading