mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 20:57:32 +08:00
fix: fix up kingress controller NPE (#1235)
This commit is contained in:
@@ -163,7 +163,6 @@ func (c *controller) processNextWorkItem() bool {
|
|||||||
func (c *controller) onEvent(namespacedName types.NamespacedName) error {
|
func (c *controller) onEvent(namespacedName types.NamespacedName) error {
|
||||||
event := model.EventUpdate
|
event := model.EventUpdate
|
||||||
ing, err := c.ingressLister.Ingresses(namespacedName.Namespace).Get(namespacedName.Name)
|
ing, err := c.ingressLister.Ingresses(namespacedName.Namespace).Get(namespacedName.Name)
|
||||||
ing.Status.InitializeConditions()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if kerrors.IsNotFound(err) {
|
if kerrors.IsNotFound(err) {
|
||||||
event = model.EventDelete
|
event = model.EventDelete
|
||||||
@@ -181,6 +180,8 @@ func (c *controller) onEvent(namespacedName types.NamespacedName) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ing.Status.InitializeConditions()
|
||||||
|
|
||||||
// we should check need process only when event is not delete,
|
// we should check need process only when event is not delete,
|
||||||
// if it is delete event, and previously processed, we need to process too.
|
// if it is delete event, and previously processed, we need to process too.
|
||||||
if event != model.EventDelete {
|
if event != model.EventDelete {
|
||||||
|
|||||||
Reference in New Issue
Block a user