https://github.com/cilium/cilium
Raw File
Tip revision: 685790550b375380dd8fac71cc2a37427d78fc40 authored by Cilium Release Bot on 13 August 2024, 13:29:59 UTC
Prepare for release v1.16.1
Tip revision: 6857905
main.go
// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium

package main

import (
	"fmt"
	"os"

	"github.com/spf13/cobra"

	"github.com/cilium/cilium/clustermesh-apiserver/clustermesh"
	clustermeshdbg "github.com/cilium/cilium/clustermesh-apiserver/clustermesh-dbg"
	"github.com/cilium/cilium/clustermesh-apiserver/etcdinit"
	"github.com/cilium/cilium/clustermesh-apiserver/kvstoremesh"
	kvstoremeshdbg "github.com/cilium/cilium/clustermesh-apiserver/kvstoremesh-dbg"
	"github.com/cilium/cilium/clustermesh-apiserver/version"
	"github.com/cilium/cilium/pkg/hive"
)

func main() {
	cmd := &cobra.Command{
		Use:   "clustermesh-apiserver",
		Short: "Run the ClusterMesh apiserver",
	}

	cmd.AddCommand(
		version.NewCmd(),
		// etcd init does not use the Hive framework, because it's a "one and done" process that doesn't spawn a service
		// or server, or perform any waiting for connections.
		etcdinit.NewCmd(),
		clustermesh.NewCmd(hive.New(clustermesh.Cell)),
		kvstoremesh.NewCmd(hive.New(kvstoremesh.Cell)),
		clustermeshdbg.RootCmd,
		kvstoremeshdbg.RootCmd,
	)

	if err := cmd.Execute(); err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
}
back to top