Commit f50870cf authored by Caleb Bron's avatar Caleb Bron
Browse files

use localhost as ip when in dev mode

parent 7678d67d
Showing with 9 additions and 0 deletions
+9 -0
......@@ -3,6 +3,7 @@ package service
import (
"context"
"fmt"
"os"
approuter "github.com/rancher/rdns-server/client"
adminv1 "github.com/rancher/rio/pkg/apis/admin.rio.cattle.io/v1"
......@@ -158,6 +159,14 @@ func (h *handler) generate(svc *corev1.Service, status corev1.ServiceStatus) ([]
}
func (h *handler) staticAddress() ([]adminv1.Address, error) {
if constants.DevMode && os.Getenv("IP_ADDRESS") != "" {
return []adminv1.Address{
{
IP: os.Getenv("IP_ADDRESS"),
Hostname: "",
},
}, nil
}
cm, err := h.configMapCache.Get(h.systemNamespace, config.ConfigName)
if err != nil {
return nil, err
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment