Skip to content

Commit

Permalink
feat: update Linux 6.1.61, containerd 1.7.8, runc 1.1.10
Browse files Browse the repository at this point in the history
Bump tools/pkgs/extras.

Update Go dependencies.

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Nov 9, 2023
1 parent 8245361 commit e22ab44
Show file tree
Hide file tree
Showing 42 changed files with 177 additions and 221 deletions.
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ linters-settings:
replace-allow-list:
- gopkg.in/yaml.v3
- github.com/vmware-tanzu/sonobuoy
- golang.org/x/sys
retract-allow-no-explanation: false
exclude-forbidden: true

Expand Down Expand Up @@ -170,6 +171,9 @@ linters:
- nakedret # too annoying
- depguard
- tagalign # too annoying
- testifylint # too annoying
- inamedparam # too annoying
- protogetter # too annoying

# abandoned linters for which golangci shows the warning that the repo is archived by the owner
- golint
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ NAME = Talos
CLOUD_IMAGES_EXTRA_ARGS ?= ""

ARTIFACTS := _out
TOOLS ?= ghcr.io/siderolabs/tools:v1.6.0-alpha.0-5-g9c09b00
PKGS ?= v1.6.0-alpha.0-23-g2e892fd
TOOLS ?= ghcr.io/siderolabs/tools:v1.6.0-alpha.0-12-gff7fe96
PKGS ?= v1.6.0-alpha.0-29-g252a59f
PKG_KERNEL ?= ghcr.io/siderolabs/kernel:$(PKGS)
EXTRAS ?= v1.6.0-alpha.0-2-g6d48418
EXTRAS ?= v1.6.0-alpha.0-5-ge8e801b
# renovate: datasource=github-tags depName=golang/go
GO_VERSION ?= 1.21
# renovate: datasource=go depName=golang.org/x/tools
GOIMPORTS_VERSION ?= v0.14.0
# renovate: datasource=go depName=mvdan.cc/gofumpt
GOFUMPT_VERSION ?= v0.5.0
# renovate: datasource=go depName=github.com/golangci/golangci-lint
GOLANGCILINT_VERSION ?= v1.54.2
GOLANGCILINT_VERSION ?= v1.55.2
# renovate: datasource=go depName=golang.org/x/tools
STRINGER_VERSION ?= v0.14.0
# renovate: datasource=go depName=github.com/alvaroloes/enumer
ENUMER_VERSION ?= v1.1.2
# renovate: datasource=go depName=k8s.io/code-generator
DEEPCOPY_GEN_VERSION ?= v0.28.2
DEEPCOPY_GEN_VERSION ?= v0.28.3
# renovate: datasource=go depName=github.com/planetscale/vtprotobuf
VTPROTOBUF_VERSION ?= v0.5.0
# renovate: datasource=go depName=github.com/siderolabs/deep-copy
Expand Down Expand Up @@ -61,9 +61,9 @@ KUBESTR_VERSION ?= v0.4.41
# renovate: datasource=github-releases depName=helm/helm
HELM_VERSION ?= v3.13.1
# renovate: datasource=github-releases depName=kubernetes-sigs/cluster-api
CLUSTERCTL_VERSION ?= 1.5.2
CLUSTERCTL_VERSION ?= 1.5.3
# renovate: datasource=github-releases depName=cilium/cilium-cli
CILIUM_CLI_VERSION ?= v0.15.11
CILIUM_CLI_VERSION ?= v0.15.13
KUBECTL_URL ?= https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/$(OPERATING_SYSTEM)/amd64/kubectl
KUBESTR_URL ?= https://github.com/kastenhq/kubestr/releases/download/$(KUBESTR_VERSION)/kubestr_$(subst v,,$(KUBESTR_VERSION))_Linux_amd64.tar.gz
HELM_URL ?= https://get.helm.sh/helm-$(HELM_VERSION)-linux-amd64.tar.gz
Expand Down
1 change: 1 addition & 0 deletions cmd/installer/cmd/installer/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ var options = &install.Options{}

var bootloader bool

//nolint:goconst
func init() {
rootCmd.PersistentFlags().StringVar(&options.ConfigSource, "config", "", "The value of "+constants.KernelParamConfig)
rootCmd.PersistentFlags().StringVar(&options.Disk, "disk", "", "The path to the disk to install to")
Expand Down
4 changes: 2 additions & 2 deletions cmd/talosctl/cmd/mgmt/gen/ca.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ var genCACmd = &cobra.Command{
return fmt.Errorf("error generating CA: %w", err)
}

caCertFile := genCACmdFlags.organization + ".crt"
caCertFile := genCACmdFlags.organization + crtExt
caHashFile := genCACmdFlags.organization + ".sha256"
caKeyFile := genCACmdFlags.organization + ".key"
caKeyFile := genCACmdFlags.organization + keyExt

if err := validateFilesExists([]string{caCertFile, caHashFile, caKeyFile}); err != nil {
return err
Expand Down
10 changes: 6 additions & 4 deletions cmd/talosctl/cmd/mgmt/gen/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ const (
talosconfigOutputType = "talosconfig"

stdoutOutput = "-"

yamlExt = ".yaml"
)

var allOutputTypes = []string{
Expand Down Expand Up @@ -365,8 +367,8 @@ func outputPaths() (configOutputPaths, error) {
return configOutputPaths{}, err
}

controlPlane := filepath.Join(cwd, machine.TypeControlPlane.String()+".yaml")
worker := filepath.Join(cwd, machine.TypeWorker.String()+".yaml")
controlPlane := filepath.Join(cwd, machine.TypeControlPlane.String()+yamlExt)
worker := filepath.Join(cwd, machine.TypeWorker.String()+yamlExt)
talosconfig := filepath.Join(cwd, "talosconfig")

return configOutputPaths{controlPlane: controlPlane, worker: worker, talosconfig: talosconfig}, nil
Expand All @@ -385,8 +387,8 @@ func outputPaths() (configOutputPaths, error) {
}

// treat --output as a directory
controlPlane := filepath.Join(genConfigCmdFlags.output, machine.TypeControlPlane.String()+".yaml")
worker := filepath.Join(genConfigCmdFlags.output, machine.TypeWorker.String()+".yaml")
controlPlane := filepath.Join(genConfigCmdFlags.output, machine.TypeControlPlane.String()+yamlExt)
worker := filepath.Join(genConfigCmdFlags.output, machine.TypeWorker.String()+yamlExt)
talosconfig := filepath.Join(genConfigCmdFlags.output, "talosconfig")

return configOutputPaths{controlPlane: controlPlane, worker: worker, talosconfig: talosconfig}, nil
Expand Down
6 changes: 3 additions & 3 deletions cmd/talosctl/cmd/mgmt/gen/crt.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var genCrtCmd = &cobra.Command{
Long: ``,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
caBytes, err := os.ReadFile(genCrtCmdFlags.ca + ".crt")
caBytes, err := os.ReadFile(genCrtCmdFlags.ca + crtExt)
if err != nil {
return fmt.Errorf("error reading CA cert: %s", err)
}
Expand All @@ -46,7 +46,7 @@ var genCrtCmd = &cobra.Command{
return fmt.Errorf("error parsing cert: %s", err)
}

keyBytes, err := os.ReadFile(genCrtCmdFlags.ca + ".key")
keyBytes, err := os.ReadFile(genCrtCmdFlags.ca + keyExt)
if err != nil {
return fmt.Errorf("error reading key file: %s", err)
}
Expand Down Expand Up @@ -85,7 +85,7 @@ var genCrtCmd = &cobra.Command{
return fmt.Errorf("error signing certificate: %s", err)
}

certFile := genCrtCmdFlags.name + ".crt"
certFile := genCrtCmdFlags.name + crtExt

if err = validateFileExists(certFile); err != nil {
return err
Expand Down
5 changes: 5 additions & 0 deletions cmd/talosctl/cmd/mgmt/gen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import (
"github.com/spf13/cobra"
)

const (
crtExt = ".crt"
keyExt = ".key"
)

var genCmdFlags struct {
force bool
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/talosctl/cmd/mgmt/gen/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var genKeyCmd = &cobra.Command{
return fmt.Errorf("error generating key: %w", err)
}

keyFile := genKeyCmdFlags.name + ".key"
keyFile := genKeyCmdFlags.name + keyExt

if err = validateFileExists(keyFile); err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions cmd/talosctl/cmd/mgmt/gen/keypair.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ var genKeypairCmd = &cobra.Command{
return fmt.Errorf("error generating CA: %s", err)
}

certFile := genKeypairCmdFlags.organization + ".crt"
keyFile := genKeypairCmdFlags.organization + ".key"
certFile := genKeypairCmdFlags.organization + crtExt
keyFile := genKeypairCmdFlags.organization + keyExt

if err = validateFilesExists([]string{certFile, keyFile}); err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion cmd/talosctl/cmd/talos/disks.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func printDisks(ctx context.Context, c *client.Client) error {
for j, disk := range message.Disks {
if i == 0 && j == 0 {
if node != "" {
fmt.Fprintln(w, "NODE\t"+labels)
fmt.Fprintln(w, "NODE\t"+labels) //nolint:goconst
} else {
fmt.Fprintln(w, labels)
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/talosctl/cmd/talos/diskusage.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"context"
"fmt"
"os"
"strconv"
"text/tabwriter"

"github.com/dustin/go-humanize"
Expand Down Expand Up @@ -73,7 +74,7 @@ var duCmd = &cobra.Command{
return humanize.Bytes(uint64(s))
}

return fmt.Sprintf("%d", s)
return strconv.FormatInt(s, 10)
}

defer w.Flush() //nolint:errcheck
Expand Down
2 changes: 1 addition & 1 deletion cmd/talosctl/cmd/talos/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func displayAlarms(messages []alarmMessage) error {
if i == 0 && j == 0 {
if node != "" {
header = "NODE\t" + header
pattern = "%s\t" + pattern
pattern = "%s\t" + pattern //nolint:goconst
}

fmt.Fprintln(w, header)
Expand Down
3 changes: 2 additions & 1 deletion cmd/talosctl/cmd/talos/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"context"
"fmt"
"os"
"strconv"
"strings"
"text/tabwriter"
"time"
Expand Down Expand Up @@ -127,7 +128,7 @@ var lsCmd = &cobra.Command{
display += " -> " + info.Link
}

size := fmt.Sprintf("%d", info.Size)
size := strconv.FormatInt(info.Size, 10)

if humanizeFlag {
size = humanize.Bytes(uint64(info.Size))
Expand Down
13 changes: 9 additions & 4 deletions cmd/talosctl/cmd/talos/pcap.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ e.g. by excluding packets with the port 50000.
}

if pcapCmdFlags.output == "" {
return dumpPackets(r)
return dumpPackets(ctx, r)
}

var out io.Writer
Expand All @@ -120,15 +120,20 @@ e.g. by excluding packets with the port 50000.
},
}

func dumpPackets(r io.Reader) error {
func dumpPackets(ctx context.Context, r io.Reader) error {
src, err := pcapgo.NewReader(r)
if err != nil {
if errors.Is(err, io.EOF) {
// nothing in the capture at all
return nil
}

return fmt.Errorf("error opening pcap reader: %w", err)
}

packetSource := gopacket.NewPacketSource(src, src.LinkType())

for packet := range packetSource.Packets() {
for packet := range packetSource.PacketsCtx(ctx) {
fmt.Println(packet)
}

Expand Down Expand Up @@ -178,7 +183,7 @@ func parseBPFInstructions(in string) ([]*machine.BPFInstruction, error) {
func init() {
pcapCmd.Flags().StringVarP(&pcapCmdFlags.iface, "interface", "i", "eth0", "interface name to capture packets on")
pcapCmd.Flags().BoolVar(&pcapCmdFlags.promisc, "promiscuous", false, "put interface into promiscuous mode")
pcapCmd.Flags().IntVarP(&pcapCmdFlags.snaplen, "snaplen", "s", 65536, "maximum packet size to capture")
pcapCmd.Flags().IntVarP(&pcapCmdFlags.snaplen, "snaplen", "s", 4096, "maximum packet size to capture")
pcapCmd.Flags().StringVarP(&pcapCmdFlags.output, "output", "o", "", "if not set, decode packets to stdout; if set write raw pcap data to a file, use '-' for stdout")
pcapCmd.Flags().StringVar(&pcapCmdFlags.bpfFilter, "bpf-filter", "", "bpf filter to apply, tcpdump -dd format")
pcapCmd.Flags().DurationVar(&pcapCmdFlags.duration, "duration", 0, "duration of the capture")
Expand Down
27 changes: 15 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
module github.com/siderolabs/talos

go 1.21.3
go 1.21.4

replace (
// Use nested module.
github.com/siderolabs/talos/pkg/machinery => ./pkg/machinery

// github.com/cilium/[email protected]/internal/unix/types_linux.go:41:36: undefined: linux.BPF_F_KPROBE_MULTI_RETURN
golang.org/x/sys => golang.org/x/sys v0.13.0

// forked go-yaml that introduces RawYAML interface, which can be used to populate YAML fields using bytes
// which are then encoded as a valid YAML blocks with proper indentiation
gopkg.in/yaml.v3 => github.com/unix4ever/yaml v0.0.0-20220527175918-f17b0f05cf2c
Expand All @@ -26,15 +29,15 @@ require (
require (
cloud.google.com/go/compute/metadata v0.2.3
github.com/BurntSushi/toml v1.3.2
github.com/aws/aws-sdk-go-v2/config v1.22.0
github.com/aws/aws-sdk-go-v2/config v1.22.2
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.2
github.com/aws/smithy-go v1.16.0
github.com/beevik/ntp v1.3.0
github.com/benbjohnson/clock v1.3.5 // project archived on 2023-05-18
github.com/blang/semver/v4 v4.0.0
github.com/cenkalti/backoff/v4 v4.2.1
github.com/containerd/cgroups/v3 v3.0.2
github.com/containerd/containerd v1.7.7
github.com/containerd/containerd v1.7.8
github.com/containerd/typeurl/v2 v2.1.1
github.com/containernetworking/cni v1.1.2
github.com/containernetworking/plugins v1.3.0
Expand All @@ -46,7 +49,7 @@ require (
github.com/dustin/go-humanize v1.0.1
github.com/ecks/uefi v0.0.0-20221116212947-caef65d070eb
github.com/emicklei/dot v1.6.0
github.com/fatih/color v1.15.0
github.com/fatih/color v1.16.0
github.com/foxboron/go-uefi v0.0.0-20230808201820-18b9ba9cd4c3
github.com/freddierice/go-losetup/v2 v2.0.1
github.com/fsnotify/fsnotify v1.7.0
Expand Down Expand Up @@ -116,7 +119,7 @@ require (
github.com/siderolabs/net v0.4.0
github.com/siderolabs/siderolink v0.3.1
github.com/siderolabs/talos/pkg/machinery v1.6.0-alpha.1
github.com/spf13/cobra v1.7.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
github.com/u-root/u-root v0.11.0
Expand All @@ -132,11 +135,11 @@ require (
go.uber.org/zap v1.26.0
go4.org/netipx v0.0.0-20230824141953-6213f710f925
golang.org/x/net v0.17.0
golang.org/x/sync v0.4.0
golang.org/x/sys v0.13.0
golang.org/x/term v0.13.0
golang.org/x/text v0.13.0
golang.org/x/time v0.3.0
golang.org/x/sync v0.5.0
golang.org/x/sys v0.14.0
golang.org/x/term v0.14.0
golang.org/x/text v0.14.0
golang.org/x/time v0.4.0
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.31.0
Expand Down Expand Up @@ -164,7 +167,7 @@ require (
github.com/aws/aws-sdk-go-v2/credentials v1.15.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.5.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.5.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.17.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.0 // indirect
Expand All @@ -185,7 +188,7 @@ require (
github.com/containerd/ttrpc v1.2.2 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/cli v24.0.0+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
Expand Down
Loading

0 comments on commit e22ab44

Please sign in to comment.