Help us shape the future of Go! Take the 2026 Go Developer Survey

cmd

package
v1.20.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 162 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// AutoCIDR indicates that a CIDR should be allocated
	AutoCIDR = "auto"
)

Variables

View Source
var (
	Agent = cell.Module(
		"agent",
		"Cilium Agent",

		Infrastructure,
		ControlPlane,
		datapath.Cell,
	)

	// Infrastructure provides access and services to the outside.
	// A cell should live here instead of ControlPlane if it is not needed by
	// integrations tests, or needs to be mocked.
	Infrastructure = cell.Module(
		"infra",
		"Infrastructure",

		pprof.Cell(pprofConfig),

		gops.Cell(defaults.EnableGops, defaults.GopsPortAgent),

		hiveHealth.HistoryCell,
		cell.ProvidePrivate(func(cfg *option.DaemonConfig) hiveHealth.HistoryDir {
			return hiveHealth.HistoryDir(cfg.StateDir)
		}),

		k8sClient.Cell,

		hostfirewallbypass.Cell,

		dial.ServiceResolverCell,

		cell.Provide(kvstoreExtraOptions),
		kvstore.Cell(kvstore.DisabledBackendName, kvstore.OptAsyncWaitForEstablished),
		cell.Invoke(kvstoreLocksGC),

		cni.Cell,

		metrics.AgentCell,

		metricsmap.Cell,

		iptrace.Cell,

		ratelimitmap.Cell,

		server.Cell,
		cell.Invoke(configureAPIServer),

		store.Cell,

		cell.Provide(func() k8sSynced.CRDSyncResourceNamesOut {
			return k8sSynced.NewCRDSyncResourceNamesOut(k8sSynced.AgentCRDResourceNames()...)
		}),

		k8sSynced.CRDSyncCell,

		shell.ServerCell(defaults.ShellSockPath),

		healthz.Cell,
	)

	// ControlPlane implement the per-node control functions. These are pure
	// business logic and depend on datapath or infrastructure to perform
	// actions. This separation enables non-privileged integration testing of
	// the control-plane.
	ControlPlane = cell.Module(
		"controlplane",
		"Control Plane",

		infraendpoints.Cell,

		hostIPSyncCell,

		endpointRestoreCell,

		node.LocalNodeStoreCell,
		nodesync.LocalNodeSyncCell,

		controller.Cell,

		agentK8s.ResourcesCell,

		k8sTables.TablesCell,

		k8sSynced.Cell,

		endpoint.Cell,

		nodeManager.Cell,

		neighbordiscovery.Cell,

		certificatemanager.Cell,

		server.SpecCell,

		healthApi.SpecCell,

		daemonCell,

		daemonConfigCell,

		maglev.Cell,

		lbipamconfig.Cell,

		nodeipamconfig.Cell,

		loadbalancer_cell.Cell,

		proxy.Cell,

		envoy.Cell,

		ciliumenvoyconfig.Cell,

		restapi.Cell,

		bgp.Cell,

		signal.Cell,

		auth.Cell,

		identity.Cell,

		ipcache.Cell,

		ipamcell.Cell,

		egressgateway.Cell,

		ipmasqmaps.Cell,

		ipmasq.Cell,

		kpr.Cell,

		policy.Cell,
		policycommands.Cell,

		compute.Cell,

		policyK8s.Cell,

		policyDirectory.Cell,

		cell.Config(cmtypes.DefaultClusterInfo),
		cell.Config(cmtypes.DefaultPolicyConfig),
		clustermesh.Cell,

		l2announcer.Cell,

		nodediscovery.Cell,

		cgroup.Cell,

		natStats.Cell,

		cell.Provide(func() watchers.ResourceGroupFunc { return allResourceGroups }),

		watchers.Cell,

		dynamicconfig.Cell,

		dynamiclifecycle.Cell,

		driftchecker.Cell,

		hubble.Cell,

		features.Cell,

		source.Cell,

		fqdn.Cell,

		health.Cell,

		healthconfig.Cell,

		status.Cell,

		debugapi.Cell,

		svcrouteconfig.Cell,

		ztunnel.Cell,

		subnet.Cell,
	)
)

Functions

func Execute

func Execute(cmd *cobra.Command)

func InitGlobalFlags

func InitGlobalFlags(logger *slog.Logger, cmd *cobra.Command, vp *viper.Viper)

func NewAgentCmd

func NewAgentCmd(hfn func() *hive.Hive) *cobra.Command

Types

This section is empty.

Directories

Path Synopsis
cni

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL