cmd

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// StandaloneDNSProxyCell provides the standalone DNS proxy functionality
	// It is responsible for starting and stopping the standalone DNS proxy
	// based on the configuration provided in the config. It connects to the
	// cilium agent via gRPC to receive DNS rules and send DNS responses.
	StandaloneDNSProxyCell = cell.Module(
		"standalone-dns-proxy",
		"Provides the standalone DNS proxy functionality",

		bootstrap.Cell,

		client.Cell,

		lookup.Cell,

		messagehandler.Cell,

		shell.ServerCell(defaults.ShellSockPath),

		cell.Provide(func() *option.DaemonConfig {
			return option.Config
		}),
		cell.Config(service.DefaultConfig),
		cell.Invoke(registerStandaloneDNSProxyHooks),
	)
)

Functions

func Execute

func Execute(cmd *cobra.Command)

func InitGlobalFlags

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

func NewDNSProxyCmd

func NewDNSProxyCmd(h *hive.Hive) *cobra.Command

Types

type StandaloneDNSProxy

type StandaloneDNSProxy struct {
	// contains filtered or unexported fields
}

func NewStandaloneDNSProxy

func NewStandaloneDNSProxy(params standaloneDNSProxyParams) *StandaloneDNSProxy

NewStandaloneDNSProxy creates a new StandaloneDNSProxy instance

func (*StandaloneDNSProxy) StartStandaloneDNSProxy

func (sdp *StandaloneDNSProxy) StartStandaloneDNSProxy() error

StartStandaloneDNSProxy starts the connection management and waits for connection before starting DNS proxy It also sets up the DNS rules table watcher to update the DNS proxy with the latest rules received from the Cilium agent

func (*StandaloneDNSProxy) StopStandaloneDNSProxy

func (sdp *StandaloneDNSProxy) StopStandaloneDNSProxy() error

StopStandaloneDNSProxy stops the standalone DNS proxy and cleanup resources

func (*StandaloneDNSProxy) WatchConnection

func (sdp *StandaloneDNSProxy) WatchConnection(ctx context.Context, _ cell.Health) error

watchConnection watches the connection state

func (*StandaloneDNSProxy) WatchDNSRulesTable

func (sdp *StandaloneDNSProxy) WatchDNSRulesTable(ctx context.Context, _ cell.Health) error

WatchDNSRulesTable watches the DNS rules table for changes and updates the DNS proxy accordingly

Jump to

Keyboard shortcuts

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