Merge pull request #1349 from posch/wwclient-port
Add option for wwclient port number
This commit is contained in:
@@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Add multiple output formats (yaml & json) support. #447
|
||||
- More aliases for many wwctl commands
|
||||
- Add support to render template using `host` or `$(uname -n)` as the value of `overlay show --render`. #623
|
||||
- Added option for wwclient port number
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -98,7 +98,10 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) {
|
||||
}
|
||||
|
||||
localTCPAddr := net.TCPAddr{}
|
||||
if conf.Warewulf.Secure {
|
||||
if conf.WWClient != nil && conf.WWClient.Port > 0 {
|
||||
localTCPAddr.Port = int(conf.WWClient.Port)
|
||||
wwlog.Info("Running from configured port %d", conf.WWClient.Port)
|
||||
} else if conf.Warewulf.Secure {
|
||||
// Setup local port to something privileged (<1024)
|
||||
localTCPAddr.Port = 987
|
||||
wwlog.Info("Running from trusted port")
|
||||
|
||||
@@ -41,6 +41,7 @@ type RootConf struct {
|
||||
SSH *SSHConf `yaml:"ssh,omitempty"`
|
||||
MountsContainer []*MountEntry `yaml:"container mounts" default:"[{\"source\": \"/etc/resolv.conf\", \"dest\": \"/etc/resolv.conf\"}]"`
|
||||
Paths *BuildConfig `yaml:"paths"`
|
||||
WWClient *WWClientConf `yaml:"wwclient"`
|
||||
|
||||
warewulfconf string
|
||||
}
|
||||
|
||||
5
internal/pkg/config/wwclient.go
Normal file
5
internal/pkg/config/wwclient.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package config
|
||||
|
||||
type WWClientConf struct {
|
||||
Port uint16 `yaml:"port" default:"0"`
|
||||
}
|
||||
Reference in New Issue
Block a user