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
d1541688
Commit
d1541688
authored
Jan 03, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The monitor is deactivated when monitorintvl <= 0s.
parent
6af04dd6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
main.go
cmd/main.go
+2
-1
ref-cli-options.md
docs/ref-cli-options.md
+6
-4
monitor.go
pkg/varnish/monitor.go
+5
-0
No files found.
cmd/main.go
View file @
d1541688
...
...
@@ -73,7 +73,8 @@ var (
"when the controller is ready,
\n
for readiness probes"
)
monIntvlF
=
flag
.
Duration
(
"monitorintvl"
,
30
*
time
.
Second
,
"interval at which the monitor thread checks and updates
\n
"
+
"instances of Varnish deployed to implement Ingress"
)
"instances of Varnish that implement Ingress.
\n
"
+
"Monitor deactivated when <= 0s"
)
logFormat
=
logrus
.
TextFormatter
{
DisableColors
:
true
,
FullTimestamp
:
true
,
...
...
docs/ref-cli-options.md
View file @
d1541688
...
...
@@ -25,7 +25,8 @@ Usage of ./k8s-ingress:
cluster master URL, for out-of-cluster runs
-monitorintvl duration
interval at which the monitor thread checks and updates
instances of Varnish deployed to implement Ingress (default 30s)
instances of Varnish that implement Ingress.
Monitor deactivated when <= 0s (default 30s)
-namespace string
namespace in which to listen for resources (default all)
-readyfile string
...
...
@@ -81,9 +82,10 @@ touches it when it is ready. Readiness probes can then test the file
for existence. By default, no readiness file is created.
``-monitorintvl``
sets the interval for the
[
monitor
](
/docs/monitor.md
)
, default 30 seconds. The monitor sleeps
this long between monitor runs for Varnish Services. See the
documentation at the link for more details.
[
monitor
](
/docs/monitor.md
)
. By default 30 seconds, and the monitor is
deactivated for values <= 0. The monitor sleeps this long between
monitor runs for Varnish Services. See the documentation at the link
for more details.
``-log-level``
sets the log level for the main controller code,
``INFO``
by default.
...
...
pkg/varnish/monitor.go
View file @
d1541688
...
...
@@ -147,6 +147,11 @@ func (vc *VarnishController) checkInst(svc string, inst *varnishInst) bool {
}
func
(
vc
*
VarnishController
)
monitor
(
monitorIntvl
time
.
Duration
)
{
if
monitorIntvl
<=
0
{
vc
.
log
.
Infof
(
"Varnish monitor interval=%v, monitor not running"
,
monitorIntvl
)
return
}
vc
.
log
.
Info
(
"Varnish monitor starting, interval: "
,
monitorIntvl
)
for
{
...
...
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