Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Rio
Commits
f50870cf
Commit
f50870cf
authored
5 years ago
by
Caleb Bron
Browse files
Options
Download
Email Patches
Plain Diff
use localhost as ip when in dev mode
parent
7678d67d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/rdns/controllers/service/handler.go
+9
-0
modules/rdns/controllers/service/handler.go
with
9 additions
and
0 deletions
+9
-0
modules/rdns/controllers/service/handler.go
+
9
-
0
View file @
f50870cf
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment