Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
k8s-ingress
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
uplex-varnish
k8s-ingress
Commits
6fd77519
Commit
6fd77519
authored
Dec 26, 2018
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the kubeconfig & masterurl CLI args for the controller.
Enables out-of-cluster runs.
parent
24f020e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
main.go
cmd/main.go
+6
-2
No files found.
cmd/main.go
View file @
6fd77519
...
...
@@ -47,7 +47,7 @@ import (
meta_v1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/
rest
"
"k8s.io/client-go/
tools/clientcmd
"
)
var
(
...
...
@@ -62,6 +62,10 @@ var (
"the TEMPLATE_DIR env variable, if set, or the
\n
"
+
"current working directory when the ingress
\n
"
+
"controller is invoked"
)
masterURLF
=
flag
.
String
(
"masterurl"
,
""
,
"cluster master URL, for "
+
"out-of-cluster runs"
)
kubeconfigF
=
flag
.
String
(
"kubeconfig"
,
""
,
"config path for the "
+
"cluster master URL, for out-of-cluster runs"
)
logFormat
=
logrus
.
TextFormatter
{
DisableColors
:
true
,
FullTimestamp
:
true
,
...
...
@@ -120,7 +124,7 @@ func main() {
os
.
Exit
(
-
1
)
}
config
,
err
:=
rest
.
InClusterConfig
(
)
config
,
err
:=
clientcmd
.
BuildConfigFromFlags
(
*
masterURLF
,
*
kubeconfigF
)
if
err
!=
nil
{
log
.
Fatalf
(
"error creating client configuration: %v"
,
err
)
}
...
...
Write
Preview
Markdown
is supported
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