Skip to content

Commit

Permalink
Add validation message for monitor when send string is missing (#2936)
Browse files Browse the repository at this point in the history
  • Loading branch information
charanm08 authored Jun 16, 2023
1 parent 939fdde commit 065b683
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/RELEASE-NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Added Functionality
Bug Fixes
````````````
* Exclude the removal of static ARP entries for Flannel CNI during CIS restart
* `Issue 2800 <https://github.com/F5Networks/k8s-bigip-ctlr/issues/2800>`_: Fix monitor not creating for VS CRD when send string is missing
* `Issue 2800 <https://github.com/F5Networks/k8s-bigip-ctlr/issues/2800>`_: Add validation message for monitor when send string is missing
* `Issue 2867 <https://github.com/F5Networks/k8s-bigip-ctlr/issues/2867>`_: Ignore virtualServerName if hostGroup configured
* `Issue 2898 <https://github.com/F5Networks/k8s-bigip-ctlr/issues/2898>`_: Fix for CIS crash with namespace-label parameter
* `Issue 2778 <https://github.com/F5Networks/k8s-bigip-ctlr/issues/2778>`_: Fix hostless VS with IPAM to work with hostgroup
Expand Down
6 changes: 5 additions & 1 deletion pkg/controller/resourceConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ func (ctlr *Controller) prepareRSConfigFromVirtualServer(
}
if pl.Monitor.Name != "" && pl.Monitor.Reference == "bigip" {
pool.MonitorNames = append(pool.MonitorNames, MonitorName{Name: pl.Monitor.Name, Reference: pl.Monitor.Reference})
} else if pl.Monitor.Type != "" {
} else if pl.Monitor.Send != "" && pl.Monitor.Type != "" {
if pl.Name == "" {
monitorName = formatMonitorName(svcNamespace, SvcBackend.Name, pl.Monitor.Type, pl.ServicePort, vs.Spec.Host, pl.Path)
}
Expand Down Expand Up @@ -541,6 +541,10 @@ func (ctlr *Controller) prepareRSConfigFromVirtualServer(
rsCfg.Monitors = append(rsCfg.Monitors, monitor)
}
}
} else {
if pl.Monitor.Type != "" && pl.Monitor.Send == "" {
log.Warningf("missing send string in monitor. skipping monitor for virtual server: %v", vs.ObjectMeta.Name)
}
}
pools = append(pools, pool)
}
Expand Down

0 comments on commit 065b683

Please sign in to comment.