Skip to content

Commit

Permalink
fix: ovn-ic support ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Nov 30, 2020
1 parent 363b067 commit 0734750
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/controller/ovn-ic.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog"
"os"
"os/exec"
"reflect"
"strings"
Expand Down Expand Up @@ -228,6 +229,17 @@ func (c *Controller) startOVNIC(icHost, icNbPort, icSbPort string) error {
fmt.Sprintf("--ovn-northd-nb-db=%s", c.config.OvnNbAddr),
fmt.Sprintf("--ovn-northd-sb-db=%s", c.config.OvnSbAddr),
"start_ic")
if os.Getenv("ENABLE_SSL") == "true" {
cmd = exec.Command("/usr/share/ovn/scripts/ovn-ctl",
fmt.Sprintf("--ovn-ic-nb-db=tcp:[%s]:%s", icHost, icNbPort),
fmt.Sprintf("--ovn-ic-sb-db=tcp:[%s]:%s", icHost, icSbPort),
fmt.Sprintf("--ovn-northd-nb-db=%s", c.config.OvnNbAddr),
fmt.Sprintf("--ovn-northd-sb-db=%s", c.config.OvnSbAddr),
"--ovn-ic-ssl-key=/var/run/tls/key",
"--ovn-ic-ssl-cert=/var/run/tls/cert",
"--ovn-ic-ssl-ca-cert=/var/run/tls/cacert",
"start_ic")
}
output, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("%s", output)
Expand Down

0 comments on commit 0734750

Please sign in to comment.