- Gitea Actions CI pipeline: Go tests, build, shellcheck on push/PR - Gitea Actions release pipeline: full build + artifact upload on version tags - OCI container image builder for registry-based OS distribution - Zero-dependency Prometheus metrics endpoint (kubesolo_os_info, boot, memory, update status) with 10 tests - USB provisioning tool for air-gapped deployments with cloud-init injection - ARM64 cross-compilation support (TARGET_ARCH env var + build-cross.sh) - Updated build scripts to accept TARGET_ARCH for both amd64 and arm64 - New Makefile targets: oci-image, build-cross Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 lines
579 B
Go
22 lines
579 B
Go
package cmd
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
|
|
"github.com/portainer/kubesolo-os/update/pkg/metrics"
|
|
)
|
|
|
|
// Metrics starts the Prometheus-compatible metrics HTTP server.
|
|
func Metrics(args []string) error {
|
|
fs := flag.NewFlagSet("metrics", flag.ExitOnError)
|
|
listenAddr := fs.String("listen", ":9100", "Metrics HTTP listen address")
|
|
grubenvPath := fs.String("grubenv", "/boot/grub/grubenv", "Path to grubenv file")
|
|
if err := fs.Parse(args); err != nil {
|
|
return fmt.Errorf("parse flags: %w", err)
|
|
}
|
|
|
|
srv := metrics.NewServer(*listenAddr, *grubenvPath)
|
|
return srv.ListenAndServe()
|
|
}
|