Skip to content

Commit

Permalink
feat: update dependencies for Talos 1.9.0-beta.0
Browse files Browse the repository at this point in the history
Some restructuring due to udevd -> system-udevd switch.

Mostly minor bumps.

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Dec 5, 2024
1 parent 999e6e9 commit b8daa0c
Show file tree
Hide file tree
Showing 19 changed files with 626 additions and 777 deletions.
21 changes: 7 additions & 14 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ linters-settings:
range-loops: true # Report preallocation suggestions on range loops, true by default
for-loops: false # Report preallocation suggestions on for loops, false by default
gci:
local-prefixes: github.com/talos-systems/sidero
sections:
- standard # Captures all standard packages if they do not match another section.
- default # Contains all imports that could not be matched to another section type.
- prefix(github.com/siderolabs/sidero) # Groups all imports with the specified Prefix.
cyclop:
# the maximal code complexity to report
max-complexity: 20
Expand All @@ -99,27 +102,23 @@ linters:
- forcetypeassert
- gci
- gocyclo
- golint
- govet
- lll
- nlreturn
- predeclared
- revive
- stylecheck

- gas
- gosec
- typecheck
- gochecknoglobals
- gochecknoinits
- ifshort
- forbidigo
- funlen
- godox
- gocognit
- gomnd
- goerr113
- err113
- nestif
- exhaustivestruct
- errorlint
- paralleltest
- thelper
Expand All @@ -129,21 +128,15 @@ linters:
- varnamelen
- gomoddirectives
- exhaustruct
- nosnakecase
- nonamedreturns
- depguard
# abandoned linters for which golangci shows the warning that the repo is archived by the owner
- interfacer
- maligned
- scopelint
- varcheck
- structcheck
- deadcode
- intrange
- perfsprint
- protogetter
- testifylint
- copyloopvar
- mnd
disable-all: false
fast: false

Expand Down
26 changes: 21 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,16 @@ FROM ghcr.io/siderolabs/liblzma:${PKGS} AS pkg-liblzma
FROM ghcr.io/siderolabs/ipxe:${PKGS} AS pkg-ipxe
FROM --platform=amd64 ghcr.io/siderolabs/ipxe:${PKGS} AS pkg-ipxe-amd64
FROM --platform=arm64 ghcr.io/siderolabs/ipxe:${PKGS} AS pkg-ipxe-arm64
FROM --platform=amd64 ghcr.io/siderolabs/eudev:${PKGS} AS pkg-eudev-amd64
FROM --platform=arm64 ghcr.io/siderolabs/eudev:${PKGS} AS pkg-eudev-arm64
FROM --platform=amd64 ghcr.io/siderolabs/systemd-udevd:${PKGS} AS pkg-systemd-udevd-amd64
FROM --platform=arm64 ghcr.io/siderolabs/systemd-udevd:${PKGS} AS pkg-systemd-udevd-arm64
FROM --platform=amd64 ghcr.io/siderolabs/libcap:${PKGS} AS pkg-libcap-amd64
FROM --platform=arm64 ghcr.io/siderolabs/libcap:${PKGS} AS pkg-libcap-arm64
FROM --platform=amd64 ghcr.io/siderolabs/libsepol:${PKGS} AS pkg-libsepol-amd64
FROM --platform=arm64 ghcr.io/siderolabs/libsepol:${PKGS} AS pkg-libsepol-arm64
FROM --platform=amd64 ghcr.io/siderolabs/libselinux:${PKGS} AS pkg-libselinux-amd64
FROM --platform=arm64 ghcr.io/siderolabs/libselinux:${PKGS} AS pkg-libselinux-arm64
FROM --platform=amd64 ghcr.io/siderolabs/pcre2:${PKGS} AS pkg-pcre2-amd64
FROM --platform=arm64 ghcr.io/siderolabs/pcre2:${PKGS} AS pkg-pcre2-arm64
FROM --platform=amd64 ghcr.io/siderolabs/util-linux:${PKGS} AS pkg-util-linux-amd64
FROM --platform=arm64 ghcr.io/siderolabs/util-linux:${PKGS} AS pkg-util-linux-arm64
FROM --platform=amd64 ghcr.io/siderolabs/kmod:${PKGS} AS pkg-kmod-amd64
Expand Down Expand Up @@ -53,7 +61,7 @@ ENV GOTOOLCHAIN local
RUN --mount=type=cache,target=/.cache go install sigs.k8s.io/controller-tools/cmd/[email protected]
RUN --mount=type=cache,target=/.cache go install k8s.io/code-generator/cmd/[email protected]
RUN --mount=type=cache,target=/.cache go install mvdan.cc/gofumpt/[email protected]
RUN --mount=type=cache,target=/.cache go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57.1 \
RUN --mount=type=cache,target=/.cache go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2 \
&& mv /go/bin/golangci-lint /toolchain/bin/golangci-lint
WORKDIR /src
COPY ./go.mod ./
Expand Down Expand Up @@ -188,7 +196,11 @@ COPY --from=pkg-musl-amd64 / .
COPY --from=pkg-openssl-amd64 / .
COPY --from=pkg-util-linux-amd64 / .
COPY --from=pkg-kmod-amd64 / .
COPY --from=pkg-eudev-amd64 / .
COPY --from=pkg-systemd-udevd-amd64 / .
COPY --from=pkg-libcap-amd64 / .
COPY --from=pkg-libsepol-amd64 / .
COPY --from=pkg-libselinux-amd64 / .
COPY --from=pkg-pcre2-amd64 / .
COPY --from=pkg-ipmitool-amd64 / .
COPY --from=agent-build-amd64 /agent ./init
COPY --from=pkg-linux-firmware /lib/firmware/qed ./lib/firmware/qed
Expand All @@ -206,7 +218,11 @@ COPY --from=pkg-musl-arm64 / .
COPY --from=pkg-openssl-arm64 / .
COPY --from=pkg-util-linux-arm64 / .
COPY --from=pkg-kmod-arm64 / .
COPY --from=pkg-eudev-arm64 / .
COPY --from=pkg-systemd-udevd-arm64 / .
COPY --from=pkg-libcap-arm64 / .
COPY --from=pkg-libsepol-arm64 / .
COPY --from=pkg-libselinux-arm64 / .
COPY --from=pkg-pcre2-arm64 / .
COPY --from=pkg-ipmitool-arm64 / .
COPY --from=agent-build-arm64 /agent ./init
COPY --from=pkg-linux-firmware /lib/firmware/qed ./lib/firmware/qed
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ MODULE := $(shell head -1 go.mod | cut -d' ' -f2)

ARTIFACTS := _out
TEST_PKGS ?= ./...
TALOS_RELEASE ?= v1.8.0
DEFAULT_K8S_VERSION ?= v1.30.0
TALOS_RELEASE ?= v1.9.0-beta.0
DEFAULT_K8S_VERSION ?= v1.31.0

TOOLS ?= ghcr.io/siderolabs/tools:v1.8.0-1-ga0c06c6
PKGS ?= v1.8.0-8-gdf1a1a5
TOOLS ?= ghcr.io/siderolabs/tools:v1.9.0
PKGS ?= v1.9.0

SFYRA_CLUSTERCTL_CONFIG ?= $(HOME)/.cluster-api/clusterctl.sfyra.yaml

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ This provider's versions are compatible with the following versions of Cluster A

This provider's versions are able to install and manage the following versions of Kubernetes:

| | v1.19 | v1.20 | v1.21 | v1.22 | v1.23 | v1.24 | v1.25 | v1.26 | v1.27 | v1.28 | v1.29 | v1.30 | v1.31 |
| ---------------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
| Sidero Provider (v0.5) |||||||||| | | | |
| Sidero Provider (v0.6) | | | | | |||||||||
| | v1.19 | v1.20 | v1.21 | v1.22 | v1.23 | v1.24 | v1.25 | v1.26 | v1.27 | v1.28 | v1.29 | v1.30 | v1.31 | v1.32 |
| ---------------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
| Sidero Provider (v0.5) |||||||||| | | | | |
| Sidero Provider (v0.6) | | | | | ||||||||||

This provider's versions are compatible with the following versions of Talos:

| | v0.12 | v0.13 | v0.14 | v1.0 | v1.1 | v1.2 | v1.3 | v1.4 | v1.5 | v1.6 | v1.7 | v1.8 |
| ---------------------- | ------ | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
| Sidero Provider (v0.5) | ✓ (+) | ✓ (+) |||||| | | | | |
| Sidero Provider (v0.6) | | | ||||||||||
| | v0.12 | v0.13 | v0.14 | v1.0 | v1.1 | v1.2 | v1.3 | v1.4 | v1.5 | v1.6 | v1.7 | v1.8 | v1.9 |
| ---------------------- | ------ | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
| Sidero Provider (v0.5) | ✓ (+) | ✓ (+) |||||| | | | | | |
| Sidero Provider (v0.6) | | | |||||||||||

## Support

Expand Down
3 changes: 3 additions & 0 deletions app/caps-controller-manager/config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ spec:
- containerPort: 9440
name: healthz
protocol: TCP
env:
- name: GRPC_ENFORCE_ALPN_ENABLED # Compatibility with Talos < 1.9
value: "false"
readinessProbe:
httpGet:
path: /readyz
Expand Down
2 changes: 1 addition & 1 deletion app/sidero-controller-manager/cmd/agent/boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func runUdevd() error {
return fmt.Errorf("error running udevadm hwdb --update: %w", err)
}

udevdCmd := exec.Command("/sbin/udevd",
udevdCmd := exec.Command("/sbin/systemd-udevd",
"--resolve-names=never")
udevdCmd.Stdout = os.Stdout
udevdCmd.Stderr = os.Stderr
Expand Down
7 changes: 4 additions & 3 deletions app/sidero-controller-manager/cmd/events-manager/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package main

import (
"context"
"errors"
"fmt"
"net/netip"
"strings"
Expand Down Expand Up @@ -124,13 +125,13 @@ func (a *Adapter) HandleEvent(ctx context.Context, event events.Event) error {
return err
}
case *machine.ConfigValidationErrorEvent:
fields = append(fields, zap.Error(fmt.Errorf(event.GetError())))
fields = append(fields, zap.Error(errors.New(event.GetError())))

if err = a.handleConfigValidationFailedEvent(ctx, ip.String(), event); err != nil {
return err
}
case *machine.ConfigLoadErrorEvent:
fields = append(fields, zap.Error(fmt.Errorf(event.GetError())))
fields = append(fields, zap.Error(errors.New(event.GetError())))

if err = a.handleConfigLoadFailedEvent(ctx, ip.String(), event); err != nil {
return err
Expand All @@ -154,7 +155,7 @@ func (a *Adapter) HandleEvent(ctx context.Context, event events.Event) error {
}

if event.GetError() != nil {
err = fmt.Errorf(event.GetError().GetMessage())
err = errors.New(event.GetError().GetMessage())
}
}

Expand Down
10 changes: 10 additions & 0 deletions app/sidero-controller-manager/config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: GRPC_ENFORCE_ALPN_ENABLED # Compatibility with Talos < 1.9
value: "false"
resources:
limits:
cpu: 1000m
Expand Down Expand Up @@ -143,6 +145,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: GRPC_ENFORCE_ALPN_ENABLED # Compatibility with Talos < 1.9
value: "false"
ports:
- name: siderolink
containerPort: ${SIDERO_CONTROLLER_MANAGER_SIDEROLINK_PORT:=51821}
Expand All @@ -169,6 +173,9 @@ spec:
image: controller:latest
imagePullPolicy: Always
name: serverlogs
env:
- name: GRPC_ENFORCE_ALPN_ENABLED # Compatibility with Talos < 1.9
value: "false"
resources:
limits:
cpu: 256m
Expand All @@ -191,6 +198,9 @@ spec:
image: controller:latest
imagePullPolicy: Always
name: serverevents
env:
- name: GRPC_ENFORCE_ALPN_ENABLED # Compatibility with Talos < 1.9
value: "false"
resources:
limits:
cpu: 256m
Expand Down
Loading

0 comments on commit b8daa0c

Please sign in to comment.