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
20347c0f
Commit
20347c0f
authored
May 08, 2020
by
Geoff Simmons
Committed by
Tim Leers
Jul 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tracking whether the haproxy offloader frontend is configured.
parent
2bdaf6f9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
haproxy.go
pkg/haproxy/haproxy.go
+6
-2
No files found.
pkg/haproxy/haproxy.go
View file @
20347c0f
...
...
@@ -121,6 +121,7 @@ type configStatus struct {
dplaneState
ReloadState
version
int64
pemExists
bool
loaded
bool
}
type
haproxyInst
struct
{
...
...
@@ -315,6 +316,7 @@ func (hc *Controller) updateInstance(inst *haproxyInst, spec *Spec) error {
hc
.
log
.
Infof
(
"Offloader instance %s: TLS config %s sucessfully"
+
"loaded at %s"
,
inst
.
name
,
spec
,
state
.
Timestamp
.
Format
(
time
.
RFC3339
))
inst
.
status
.
loaded
=
true
return
nil
case
Failed
,
Unknown
:
return
fmt
.
Errorf
(
"Offloader instance %s: TLS config %s load "
+
...
...
@@ -333,6 +335,7 @@ func (hc *Controller) updateInstance(inst *haproxyInst, spec *Spec) error {
hc
.
log
.
Infof
(
"Offloader instance %s: TLS config %s "
+
"successfully loaded at %s"
,
inst
.
name
,
spec
,
state
.
Timestamp
.
Format
(
time
.
RFC3339
))
inst
.
status
.
loaded
=
true
return
nil
}
// XXX SyncIncomplete
...
...
@@ -377,7 +380,7 @@ func (hc *Controller) updateOffldSvc(svcKey string) error {
}
// XXX metrics
hc
.
log
.
Debugf
(
"offloader svc %s: get current status"
,
inst
.
name
)
if
err
:=
hc
.
getOffldStatus
(
*
inst
);
err
!=
nil
{
if
err
:=
hc
.
getOffldStatus
(
inst
);
err
!=
nil
{
offldrErr
:=
inst
.
mkError
(
err
)
errs
=
append
(
errs
,
offldrErr
)
continue
...
...
@@ -579,7 +582,7 @@ func (hc *Controller) updateOffldrAddrs(key string, addrs []OffldAddr,
return
errs
}
func
(
hc
*
Controller
)
getOffldStatus
(
inst
haproxyInst
)
error
{
func
(
hc
*
Controller
)
getOffldStatus
(
inst
*
haproxyInst
)
error
{
hc
.
log
.
Debugf
(
"Offloader instance %s, checking offloader config"
,
inst
.
name
)
inst
.
admMtx
.
Lock
()
...
...
@@ -592,6 +595,7 @@ func (hc *Controller) getOffldStatus(inst haproxyInst) error {
return
err
}
inst
.
status
.
version
=
int64
(
version
)
inst
.
status
.
loaded
=
loaded
if
loaded
{
hc
.
log
.
Infof
(
"Offloader instance %s: offloader configured, "
+
"version=%d"
,
inst
.
name
,
version
)
...
...
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