Andrey Smirnov ab12b81ef0
feat: implement Talos kernel log receiver
Fixes #527

Talos logs (see https://github.com/talos-systems/talos/pull/4600) are
delivered to Sidero over the SideroLink tunnel.

Logs can be seen with:

```
$ kubectl logs -n sidero-system deployment/sidero-controller-manager -c serverlogs -f
{"clock":67194673,"cluster":"management-cluster","facility":"user","machine":"default/management-cluster-cp-4j8f4","metal_machine":"default/management-cluster-cp-hbq57","msg":"[talos] phase bootloader (19/19): done, 176.795226ms\n","priority":"warning","seq":768,"server_uuid":"5b72932a-c482-4aa5-b00e-4b8773d3ac48","talos-level":"warn","talos-time":"2021-11-26T19:34:42.444342392Z"}
```

Logs are annotated on the fly with the information about `Server`,
`MetalMachine`, `Machine` and `Cluster`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-11-30 23:45:34 +03:00

22 lines
792 B
Go

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Package siderolink provides server-side implementation of the SideroLink API.
package siderolink
// SecretName is the name of the Secret Sidero stores information about siderolink installation.
//
// Secret holds private Sidero Wireguard key and installation ID.
const SecretName = "siderolink"
// LogReceiverPort is the port of the log receiver container.
//
// LogReceiverPort is working only over Wireguard.
const LogReceiverPort = 4001
// Cfg is a default global instance of the SideroLink configuration.
//
// Cfg should be initialized first with `LoadOrCreate`.
var Cfg Config