Documentation
¶
Index ¶
- Variables
- func Execute(cmd *cobra.Command)
- func InitGlobalFlags(logger *slog.Logger, cmd *cobra.Command, vp *viper.Viper)
- func NewDNSProxyCmd(h *hive.Hive) *cobra.Command
- type ReadinessStatusProvider
- type StandaloneDNSProxy
- func (sdp *StandaloneDNSProxy) IsReady() bool
- func (sdp *StandaloneDNSProxy) StartStandaloneDNSProxy() error
- func (sdp *StandaloneDNSProxy) StopStandaloneDNSProxy() error
- func (sdp *StandaloneDNSProxy) WatchConnection(ctx context.Context, _ cell.Health) error
- func (sdp *StandaloneDNSProxy) WatchDNSRulesTable(ctx context.Context, _ cell.Health) error
Constants ¶
This section is empty.
Variables ¶
var ReadinessCell = cell.Module( "readiness", "Readiness check commands for the standalone DNS proxy", cell.Provide( readinessCommands, ), )
ReadinessCell provides readiness check commands for the shell
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, metrics.Cell, shell.ServerCell(defaults.ShellSockPath), ReadinessCell, cell.Provide(func() *option.DaemonConfig { return option.Config }), cell.Config(service.DefaultConfig), cell.Provide( NewStandaloneDNSProxy, NewReadinessStatusProvider, ), cell.Invoke(registerStandaloneDNSProxyHooks), ) )
Functions ¶
func InitGlobalFlags ¶
Types ¶
type ReadinessStatusProvider ¶ added in v1.20.0
type ReadinessStatusProvider interface {
IsReady() bool
}
ReadinessStatusProvider is an interface for checking the readiness status
func NewReadinessStatusProvider ¶ added in v1.20.0
func NewReadinessStatusProvider(sdp *StandaloneDNSProxy) ReadinessStatusProvider
NewReadinessStatusProvider creates a ReadinessStatusProvider from the StandaloneDNSProxy
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) IsReady ¶ added in v1.20.0
func (sdp *StandaloneDNSProxy) IsReady() bool
IsReady returns the current readiness status of the standalone DNS proxy
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 ¶
watchConnection watches the connection state
func (*StandaloneDNSProxy) WatchDNSRulesTable ¶
WatchDNSRulesTable watches the DNS rules table for changes and updates the DNS proxy accordingly