Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from yboaron/unicast_latest
Add support for unicast keepalived
- Loading branch information
Showing
7 changed files
with
309 additions
and
29 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.