Skip to content

Commit

Permalink
-- and portalnet to both
Browse files Browse the repository at this point in the history
  • Loading branch information
Marian Schwarz committed Aug 23, 2015
1 parent 644259a commit 1177d6a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN apk-install quagga \
supervisor

ADD supervisord.conf /etc/supervisord.conf
ADD https://github.com/SchwarzM/k8s-quagga/releases/download/v0.0.2/k8s-quagga_linux_amd64 /k8s-quagga
ADD https://github.com/SchwarzM/k8s-quagga/releases/download/v0.0.3/k8s-quagga_linux_amd64 /k8s-quagga
RUN chmod +x /k8s-quagga
ADD run.sh /run.sh
RUN chmod +x /run.sh
Expand Down
10 changes: 9 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type ospfconfig struct {
Interface string
RouterId string
HomeNet string
PortalNet string
ContainerNet string
}

Expand Down Expand Up @@ -41,6 +42,7 @@ router ospf
log-adjacency-changes detail
default-information originate
network {{.HomeNet}} area 0.0.0.0
network {{.PortalNet}} area 0.0.0.0
network {{.ContainerNet}} area 0.0.0.0
`

Expand All @@ -52,7 +54,7 @@ func check(e error) {

func main() {
app := cli.NewApp()
app.Version = "0.0.2"
app.Version = "0.0.3"
app.Flags = []cli.Flag {
cli.StringFlag{
Name: "output",
Expand Down Expand Up @@ -87,6 +89,11 @@ func main() {
Value: "10.2.0.0/24",
Usage: "Container Network CIDR",
},
cli.StringFlag{
Name: "PortalNet",
Value: "10.2.0.0/24",
Usage: "Portal Network CIDR",
},
cli.StringFlag{
Name: "HomeNet",
Value: "10.0.1.0/24",
Expand All @@ -99,6 +106,7 @@ func main() {
Interface: c.String("Interface"),
RouterId: c.String("RouterId"),
HomeNet: c.String("HomeNet"),
PortalNet: c.String("PortalNet"),
ContainerNet: c.String("ContainerNet"),
}
f, err := os.Create(path.Join(c.GlobalString("output"), "ospfd.conf"))
Expand Down

0 comments on commit 1177d6a

Please sign in to comment.