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
e299d4f2
Commit
e299d4f2
authored
Apr 29, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the Varnish controller for a previously unknown Service.
parent
0ce2bfdf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
service.go
pkg/controller/service.go
+9
-3
No files found.
pkg/controller/service.go
View file @
e299d4f2
...
...
@@ -227,21 +227,27 @@ func (worker *NamespaceWorker) syncSvc(key string) error {
if
ingSvc
==
nil
{
continue
}
worker
.
log
.
Debugf
(
"Ingress %s/%s: Service %s/%s"
,
ing
.
Namespace
,
ing
.
Name
,
svc
.
Namespace
,
svc
.
Name
)
if
ingSvc
.
Namespace
!=
svc
.
Namespace
||
ingSvc
.
Name
!=
svc
.
Name
{
continue
}
if
!
worker
.
isVarnishInVCLSpec
(
ing
)
{
worker
.
log
.
Debugf
(
"Ingress %s/%s: %+v"
,
ing
.
Namespace
,
ing
.
Name
,
ing
)
svcKey
:=
svc
.
Namespace
+
"/"
+
svc
.
Name
if
worker
.
vController
.
HasVarnishSvc
(
svcKey
)
&&
!
worker
.
isVarnishInVCLSpec
(
ing
)
{
continue
}
updateVCL
=
true
worker
.
log
.
Tracef
(
"Requeueing Ingress %s/%s after changed "
+
worker
.
log
.
Debug
(
"Requeueing Ingress %s/%s after changed "
+
"Varnish service %s/%s: %+v"
,
ing
.
Namespace
,
ing
.
Name
,
svc
.
Namespace
,
svc
.
Name
,
ing
)
worker
.
queue
.
Add
(
&
SyncObj
{
Type
:
Update
,
Obj
:
ing
})
}
if
!
updateVCL
{
worker
.
log
.
Trace
f
(
"No change in VCL due to changed Varnish "
+
worker
.
log
.
Debug
f
(
"No change in VCL due to changed Varnish "
+
"service %s/%s"
,
svc
.
Namespace
,
svc
.
Name
)
}
...
...
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