Documentation
¶
Overview ¶
Copyright 2009 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Copied from Go standard library's net/url package.
Index ¶
- Variables
- func RegisterEmbeddedGlobals(fs *Set, gc *GlobalConfig)
- func RegisterGlobal(fs *Set, gc *GlobalConfig)
- func RegisterRufioFlags(fs *Set, t *RufioConfig)
- func RegisterSecondStarFlags(fs *Set, ssc *SecondStarConfig)
- func RegisterSmeeFlags(fs *Set, sc *SmeeConfig)
- func RegisterTinkControllerFlags(fs *Set, t *TinkControllerConfig)
- func RegisterTinkServerFlags(fs *Set, t *TinkServerConfig)
- func RegisterTootlesFlags(fs *Set, h *TootlesConfig)
- type Config
- type EmbeddedGlobalConfig
- type GlobalConfig
- type RufioConfig
- type SecondStarConfig
- type Set
- type SmeeConfig
- type TinkControllerConfig
- type TinkServerConfig
- type TootlesConfig
- type URLBuilder
Constants ¶
This section is empty.
Variables ¶
var BackendConfig = Config{
Name: "backend",
Usage: "backend to use (kube, file, none)",
}
BackendConfig flags.
var BackendFilePath = Config{
Name: "backend-file-path",
Usage: "path to the file backend",
}
var BackendKubeConfig = Config{
Name: "backend-kube-config",
Usage: "path to the kubeconfig file",
}
var BackendKubeNamespace = Config{
Name: "backend-kube-namespace",
Usage: "namespace to watch for resources",
}
var DHCPBindAddr = Config{
Name: "dhcp-bind-addr",
Usage: "[dhcp] DHCP server bind address",
}
var DHCPBindInterface = Config{
Name: "dhcp-bind-interface",
Usage: "[dhcp] DHCP server bind interface",
}
var DHCPEnabled = Config{
Name: "dhcp-enabled",
Usage: "[dhcp] enable DHCP server",
}
DHCP flags.
var DHCPIPForPacket = Config{
Name: "dhcp-ip-for-packet",
Usage: "[dhcp] DHCP server IP for packet",
}
var DHCPIPXEHTTPBinaryURLHost = Config{
Name: "dhcp-ipxe-http-binary-host",
Usage: "[dhcp] HTTP iPXE binaries host or IP to use in DHCP packets",
}
var DHCPIPXEHTTPBinaryURLPath = Config{
Name: "dhcp-ipxe-http-binary-path",
Usage: "[dhcp] HTTP iPXE binaries path to use in DHCP packets",
}
var DHCPIPXEHTTPBinaryURLPort = Config{
Name: "dhcp-ipxe-http-binary-port",
Usage: "[dhcp] HTTP iPXE binaries port to use in DHCP packets",
}
var DHCPIPXEHTTPBinaryURLScheme = Config{
Name: "dhcp-ipxe-http-binary-scheme",
Usage: "[dhcp] HTTP iPXE binaries scheme to use in DHCP packets",
}
var DHCPIPXEHTTPScriptHost = Config{
Name: "dhcp-ipxe-http-script-host",
Usage: "[dhcp] HTTP iPXE script host or IP to use in DHCP packets",
}
var DHCPIPXEHTTPScriptInjectMac = Config{
Name: "dhcp-ipxe-http-script-prepend-mac",
Usage: "[dhcp] prepend the hardware MAC address to iPXE script URL base, http://1.2.3.4/auto.ipxe -> http://1.2.3.4/40:15:ff:89:cc:0e/auto.ipxe",
}
var DHCPIPXEHTTPScriptPath = Config{
Name: "dhcp-ipxe-http-script-path",
Usage: "[dhcp] HTTP iPXE script path to use in DHCP packets",
}
var DHCPIPXEHTTPScriptPort = Config{
Name: "dhcp-ipxe-http-script-port",
Usage: "[dhcp] HTTP iPXE script port to use in DHCP packets",
}
var DHCPIPXEHTTPScriptScheme = Config{
Name: "dhcp-ipxe-http-script-scheme",
Usage: "[dhcp] HTTP iPXE script scheme to use in DHCP packets",
}
var DHCPModeFlag = Config{ Name: "dhcp-mode", Usage: fmt.Sprintf("[dhcp] DHCP mode (%s, %s, %s)", smee.DHCPModeReservation, smee.DHCPModeProxy, smee.DHCPModeAutoProxy), }
var DHCPSyslogIP = Config{
Name: "dhcp-syslog-ip",
Usage: "[dhcp] Syslog server IP address to use in DHCP packets (opt 7)",
}
var DHCPTftpIP = Config{
Name: "dhcp-tftp-ip",
Usage: "[dhcp] TFTP server IP address to use in DHCP packets (opt 66, etc)",
}
var DHCPTftpPort = Config{
Name: "dhcp-tftp-port",
Usage: "[dhcp] TFTP server port to use in DHCP packets (opt 66, etc)",
}
var EnableCRDMigrations = Config{
Name: "enable-crd-migrations",
Usage: "create CRDs in the cluster",
}
var EnableETCD = Config{
Name: "enable-embedded-etcd",
Usage: "enables the embedded etcd",
}
var EnableKubeAPIServer = Config{
Name: "enable-embedded-kube-apiserver",
Usage: "enables the embedded kube-apiserver",
}
var EnableRufioController = Config{
Name: "enable-rufio-controller",
Usage: "enable Rufio Controller service",
}
var EnableSecondStar = Config{
Name: "enable-secondstar",
Usage: "enable SecondStar service",
}
var EnableSmee = Config{
Name: "enable-smee",
Usage: "enable Smee service",
}
var EnableTinkController = Config{
Name: "enable-tink-controller",
Usage: "enable Tink Controller service",
}
var EnableTinkServer = Config{
Name: "enable-tink-server",
Usage: "enable Tink Server service",
}
var EnableTootles = Config{
Name: "enable-tootles",
Usage: "enable Tootles service",
}
var IPXEEmbeddedScriptPatch = Config{
Name: "ipxe-embedded-script-patch",
Usage: "[ipxe] iPXE script fragment to patch into served iPXE binaries served via TFTP or HTTP",
}
iPXE flags.
var IPXEHTTPBinaryEnabled = Config{
Name: "ipxe-http-binary-enabled",
Usage: "[ipxe] enable iPXE HTTP binary server",
}
iPXE HTTP binary flags.
var IPXEHTTPScriptBindAddr = Config{
Name: "ipxe-http-script-bind-addr",
Usage: "[ipxe] local IP to listen on for iPXE HTTP script requests",
}
var IPXEHTTPScriptBindPort = Config{
Name: "ipxe-http-script-bind-port",
Usage: "[ipxe] local port to listen on for iPXE HTTP script requests",
}
var IPXEHTTPScriptEnabled = Config{
Name: "ipxe-http-script-enabled",
Usage: "[ipxe] enable iPXE HTTP script serving",
}
iPXE HTTP script flags.
var IPXEHTTPScriptExtraKernelArgs = Config{
Name: "ipxe-http-script-extra-kernel-args",
Usage: "[ipxe] extra set of kernel args (k=v k=v) that are appended to the kernel cmdline iPXE script",
}
var IPXEHTTPScriptOSIEURL = Config{
Name: "ipxe-http-script-osie-url",
Usage: "[ipxe] URL where OSIE (HookOS) images are located",
}
var IPXEHTTPScriptRetries = Config{
Name: "ipxe-http-script-retries",
Usage: "[ipxe] number of retries to attempt when fetching kernel and initrd files in the iPXE script",
}
var IPXEHTTPScriptRetryDelay = Config{
Name: "ipxe-http-script-retry-delay",
Usage: "[ipxe] delay (in seconds) between retries when fetching kernel and initrd files in the iPXE script",
}
var IPXEHTTPScriptTrustedProxies = Config{
Name: "ipxe-http-script-trusted-proxies",
Usage: "[ipxe] comma separated list of trusted proxies in CIDR notation",
}
var ISOEnabled = Config{
Name: "iso-enabled",
Usage: "[iso] enable OSIE ISO patching service",
}
ISO flags.
var ISOPatchMagicString = Config{
Name: "iso-patch-magic-string",
Usage: "[iso] the string pattern to match for in the source (upstream) ISO, defaults to the one defined in HookOS",
}
var ISOStaticIPAMEnabled = Config{
Name: "iso-static-ipam-enabled",
Usage: "[iso] enable static IPAM when patching the source (upstream) ISO",
}
var ISOUpstreamURL = Config{
Name: "iso-upstream-url",
Usage: "[iso] an ISO source (upstream) URL target for patching kernel command line parameters",
}
var KubeIndexesSecondStar = map[kube.IndexType]kube.Index{ kube.IndexTypeHardwareName: kube.Indexes[kube.IndexTypeHardwareName], kube.IndexTypeMachineName: kube.Indexes[kube.IndexTypeMachineName], }
var KubeIndexesSmee = map[kube.IndexType]kube.Index{ kube.IndexTypeMACAddr: kube.Indexes[kube.IndexTypeMACAddr], kube.IndexTypeIPAddr: kube.Indexes[kube.IndexTypeIPAddr], }
var KubeIndexesTinkServer = map[kube.IndexType]kube.Index{ kube.IndexTypeWorkflowByNonTerminalState: kube.Indexes[kube.IndexTypeWorkflowByNonTerminalState], }
var KubeIndexesTootles = map[kube.IndexType]kube.Index{ kube.IndexTypeIPAddr: kube.Indexes[kube.IndexTypeIPAddr], }
var LogLevelConfig = Config{
Name: "log-level",
Usage: "the higher the number the more verbose",
}
All these flags are used by at least two services or are used to create objects that are used by multiple services.
var OTELEndpoint = Config{
Name: "otel-endpoint",
Usage: "[otel] OpenTelemetry collector endpoint",
}
OTEL flags.
var OTELInsecure = Config{
Name: "otel-insecure",
Usage: "[otel] OpenTelemetry collector insecure",
}
var PublicIP = Config{
Name: "public-ipv4",
Usage: "public IPv4 address to use for all enabled services",
}
var RufioBMCConnectTimeout = Config{
Name: "rufio-bmc-connect-timeout",
Usage: "timeout for BMC connection",
}
var RufioControllerEnableLeaderElection = Config{
Name: "rufio-controller-enable-leader-election",
Usage: "enable leader election for controller manager",
}
var RufioControllerLeaderElectionNamespace = Config{
Name: "rufio-controller-leader-election-namespace",
Usage: "namespace in which the leader election lease will be created",
}
var RufioControllerMetricsAddr = Config{
Name: "rufio-controller-metrics-addr",
Usage: "address on which to expose metrics",
}
var RufioControllerProbeAddr = Config{
Name: "rufio-controller-probe-addr",
Usage: "address on which to expose health probes",
}
var RufioLogLevel = Config{
Name: "rufio-log-level",
Usage: "the higher the number the more verbose, level 0 inherits the global log level",
}
var RufioPowerCheckInterval = Config{
Name: "rufio-power-check-interval",
Usage: "interval at which the machine's power state is reconciled",
}
var SecondStarHostKey = Config{
Name: "secondstar-host-key",
Usage: "Path to the host key file for SecondStar",
}
var SecondStarIPMIToolPath = Config{
Name: "secondstar-ipmitool-path",
Usage: "Path to the ipmitool binary",
}
var SecondStarIdleTimeout = Config{
Name: "secondstar-idle-timeout",
Usage: "Idle timeout for SecondStar",
}
var SecondStarLogLevel = Config{
Name: "secondstar-log-level",
Usage: "the higher the number the more verbose, level 0 inherits the global log level",
}
var SecondStarPort = Config{
Name: "secondstar-port",
Usage: "Port to listen on for SecondStar",
}
var SmeeLogLevel = Config{
Name: "smee-log-level",
Usage: "the higher the number the more verbose, level 0 inherits the global log level",
}
var SyslogBindAddr = Config{
Name: "syslog-bind-addr",
Usage: "[syslog] local IP to listen on for Syslog messages",
}
var SyslogBindPort = Config{
Name: "syslog-bind-port",
Usage: "[syslog] local port to listen on for Syslog messages",
}
var SyslogEnabled = Config{
Name: "syslog-enabled",
Usage: "[syslog] enable Syslog server(receiver)",
}
Syslog flags.
var TFTPBlockSize = Config{
Name: "tftp-block-size",
Usage: "[tftp] TFTP block size a value between 512 (the default block size for TFTP) and 65456 (the max size a UDP packet payload can be)",
}
var TFTPServerBindAddr = Config{
Name: "tftp-server-bind-addr",
Usage: "[tftp] local IP to listen on for iPXE binary TFTP requests",
}
var TFTPServerBindPort = Config{
Name: "tftp-server-bind-port",
Usage: "[tftp] local port to listen on for iPXE binary TFTP requests",
}
var TFTPServerEnabled = Config{
Name: "tftp-server-enabled",
Usage: "[tftp] enable iPXE TFTP binary server",
}
TFTP flags.
var TFTPTimeout = Config{
Name: "tftp-timeout",
Usage: "[tftp] timeout (in seconds) for TFTP requests",
}
var TinkControllerEnableLeaderElection = Config{
Name: "tink-controller-enable-leader-election",
Usage: "enable leader election for controller manager",
}
var TinkControllerLeaderElectionNamespace = Config{
Name: "tink-controller-leader-election-namespace",
Usage: "namespace in which the leader election lease will be created",
}
var TinkControllerLogLevel = Config{
Name: "tink-controller-log-level",
Usage: "the higher the number the more verbose, level 0 inherits the global log level",
}
var TinkControllerMetricsAddr = Config{
Name: "tink-controller-metrics-addr",
Usage: "address on which to expose metrics",
}
var TinkControllerProbeAddr = Config{
Name: "tink-controller-probe-addr",
Usage: "address on which to expose health probes",
}
var TinkServerAddrPort = Config{
Name: "ipxe-script-tink-server-addr-port",
Usage: "[tink] Tink server address and port",
}
Tink Server flags.
var TinkServerBindAddr = Config{
Name: "tink-server-bind-addr",
Usage: "ip address on which the Tink server will listen",
}
var TinkServerBindPort = Config{
Name: "tink-server-bind-port",
Usage: "port on which the Tink server will listen",
}
var TinkServerInsecureTLS = Config{
Name: "ipxe-script-tink-server-insecure-tls",
Usage: "[tink] Skip TLS verification when connecting to the Tink server",
}
var TinkServerLogLevel = Config{
Name: "tink-server-log-level",
Usage: "the higher the number the more verbose, level 0 inherits the global log level",
}
var TinkServerUseTLS = Config{
Name: "ipxe-script-tink-server-use-tls",
Usage: "[tink] Use TLS to connect to the Tink server",
}
var TootlesBindAddr = Config{
Name: "tootles-bind-addr",
Usage: "ip address on which the Tootles service will listen",
}
var TootlesBindPort = Config{
Name: "tootles-bind-port",
Usage: "port on which the Tootles service will listen",
}
var TootlesDebugMode = Config{
Name: "tootles-debug-mode",
Usage: "whether to run Tootles in debug mode",
}
var TootlesLogLevel = Config{
Name: "tootles-log-level",
Usage: "the higher the number the more verbose, level 0 inherits the global log level",
}
var TrustedProxies = Config{
Name: "trusted-proxies",
Usage: "list of trusted proxies in CIDR notation",
}
Shared flags.
Functions ¶
func RegisterEmbeddedGlobals ¶ added in v0.17.1
func RegisterEmbeddedGlobals(fs *Set, gc *GlobalConfig)
func RegisterGlobal ¶
func RegisterGlobal(fs *Set, gc *GlobalConfig)
func RegisterRufioFlags ¶
func RegisterRufioFlags(fs *Set, t *RufioConfig)
func RegisterSecondStarFlags ¶
func RegisterSecondStarFlags(fs *Set, ssc *SecondStarConfig)
func RegisterSmeeFlags ¶
func RegisterSmeeFlags(fs *Set, sc *SmeeConfig)
func RegisterTinkControllerFlags ¶
func RegisterTinkControllerFlags(fs *Set, t *TinkControllerConfig)
func RegisterTinkServerFlags ¶
func RegisterTinkServerFlags(fs *Set, t *TinkServerConfig)
func RegisterTootlesFlags ¶
func RegisterTootlesFlags(fs *Set, h *TootlesConfig)
Types ¶
type EmbeddedGlobalConfig ¶
type GlobalConfig ¶
type GlobalConfig struct {
LogLevel int
Backend string
BackendFilePath string
BackendKubeConfig string
BackendKubeNamespace string
OTELEndpoint string
OTELInsecure bool
TrustedProxies []netip.Prefix
PublicIP netip.Addr
EnableSmee bool
EnableTootles bool
EnableTinkServer bool
EnableTinkController bool
EnableRufio bool
EnableSecondStar bool
EnableCRDMigrations bool
EmbeddedGlobalConfig EmbeddedGlobalConfig
}
type RufioConfig ¶
type SecondStarConfig ¶
type SecondStarConfig struct {
Config *secondstar.Config
HostKeyPath string
LogLevel int
}
func (*SecondStarConfig) Convert ¶
func (ssc *SecondStarConfig) Convert() error
type SmeeConfig ¶
type SmeeConfig struct {
Config *smee.Config
// DHCPIPXEBinary splits out some url.URL fields so they can be set individually.
// The cmd package is responsible for putting the fields back together into a url.URL for use in service package configs.
DHCPIPXEBinary URLBuilder
// DHCPIPXEScript splits out some url.URL fields so they can be set individually.
// The cmd package is responsible for putting the fields back together into a url.URL for use in service package configs.
DHCPIPXEScript URLBuilder
LogLevel int
}
type TinkControllerConfig ¶
type TinkControllerConfig struct {
Config *controller.Config
LogLevel int
}
type TinkServerConfig ¶
type TinkServerConfig struct {
Config *server.Config
BindAddr netip.Addr
BindPort uint16
LogLevel int
}
func (*TinkServerConfig) Convert ¶
func (t *TinkServerConfig) Convert()
Convert TinkServerConfig data types to tink server server.Config data types.
type TootlesConfig ¶
func (*TootlesConfig) Convert ¶
func (h *TootlesConfig) Convert(trustedProxies *[]netip.Prefix)
Convert converts TootlesConfig data types to tootles.Config data types.
type URLBuilder ¶
URLBuilder breaks out the fields of a url.URL so they can be set individually from the CLI.