Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With this PR keepalived capability extended to support both unicast and multicast modes. The following components were updated to support unicast mode: - A simple server that will return node's non-virtual IP address, this server will be used by the master nodes to retrieve the bootstrap node IP address. One should contact the server on port 64444. - keepalived-monitor can render conf file to support unicast or multicast mode, based on configuration.
- Loading branch information
Showing
7 changed files
with
289 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,3 +48,4 @@ network_closure.sh | |
/monitor | ||
/dynkeepalived | ||
/corednsmonitor | ||
/unicastipserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/openshift/baremetal-runtimecfg/pkg/monitor" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func main() { | ||
var rootCmd = &cobra.Command{ | ||
Use: "unicastipserver [path to kubeconfig] [api-vip] [dns-vip] [ingress-vip] [api-provisioning-vip]", | ||
Short: "baremetal-runtimecfg discovers OpenShift cluster and node configuration and renders Go templates", | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
apiVip, err := cmd.Flags().GetIP("api-vip") | ||
if err != nil { | ||
apiVip = nil | ||
} | ||
ingressVip, err := cmd.Flags().GetIP("ingress-vip") | ||
if err != nil { | ||
ingressVip = nil | ||
} | ||
dnsVip, err := cmd.Flags().GetIP("dns-vip") | ||
if err != nil { | ||
dnsVip = nil | ||
} | ||
unicastipServerPort, err := cmd.Flags().GetUint16("unicastip-server-port") | ||
if err != nil { | ||
return err | ||
} | ||
|
||
return monitor.UnicastIPServer(apiVip, ingressVip, dnsVip, unicastipServerPort) | ||
}, | ||
} | ||
|
||
rootCmd.Flags().IP("api-vip", nil, "Virtual IP Address to reach the OpenShift API") | ||
rootCmd.Flags().IP("ingress-vip", nil, "Virtual IP Address to reach the OpenShift Ingress Routers") | ||
rootCmd.Flags().IP("dns-vip", nil, "Virtual IP Address to reach an OpenShift node resolving DNS server") | ||
rootCmd.Flags().Uint16("unicastip-server-port", 64444, "Port where the OpenShift API listens at") | ||
|
||
if err := rootCmd.Execute(); err != nil { | ||
fmt.Println(err) | ||
os.Exit(1) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.