// hostnameOverride, if set from the command line flag, takes precedence over the `HostnameOverride` value from the config file
hostnameOverridestring
}
// AddFlags adds flags to fs and binds them to options.
...
...
@@ -140,7 +143,7 @@ func (o *Options) AddFlags(fs *pflag.FlagSet) {
fs.MarkDeprecated("resource-container","This feature will be removed in a later release.")
fs.StringVar(&o.config.ClientConnection.Kubeconfig,"kubeconfig",o.config.ClientConnection.Kubeconfig,"Path to kubeconfig file with authorization information (the master location is set by the master flag).")
fs.Var(utilflag.PortRangeVar{Val:&o.config.PortRange},"proxy-port-range","Range of host ports (beginPort-endPort, single port or beginPort+offset, inclusive) that may be consumed in order to proxy service traffic. If (unspecified, 0, or 0-0) then ports will be randomly chosen.")
fs.StringVar(&o.config.HostnameOverride,"hostname-override",o.config.HostnameOverride,"If non-empty, will use this string as identification instead of the actual hostname.")
fs.StringVar(&o.hostnameOverride,"hostname-override",o.hostnameOverride,"If non-empty, will use this string as identification instead of the actual hostname.")
fs.Var(&o.config.Mode,"proxy-mode","Which proxy mode to use: 'userspace' (older) or 'iptables' (faster) or 'ipvs' (experimental). If blank, use the best-available proxy (currently iptables). If the iptables proxy is selected, regardless of how, but the system's kernel or iptables versions are insufficient, this always falls back to the userspace proxy.")
fs.Int32Var(o.config.IPTables.MasqueradeBit,"iptables-masquerade-bit",utilpointer.Int32PtrDerefOr(o.config.IPTables.MasqueradeBit,14),"If using the pure iptables proxy, the bit of the fwmark space to mark packets requiring SNAT with. Must be within the range [0, 31].")
fs.DurationVar(&o.config.IPTables.SyncPeriod.Duration,"iptables-sync-period",o.config.IPTables.SyncPeriod.Duration,"The maximum interval of how often iptables rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0.")
...
...
@@ -204,14 +207,31 @@ func (o *Options) Complete() error {