Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fix: fix nil pointer error" #1068

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release Note 🍻

EMQX Operator 2.2.24-rc.1 has been released.
EMQX Operator 2.2.23 has been released.

## Supported version
+ apps.emqx.io/v2beta1
Expand All @@ -13,11 +13,11 @@ EMQX Operator 2.2.24-rc.1 has been released.
+ EMQX at 4.4.14 and later
+ EMQX Enterprise at 4.4.14 and later

## Fixes 🐞
## Other Changes ✨

+ `apps.emqx.io/v2beta1 EMQX`.

+ Fix sometimes will got nil pointer error.
+ Delete `apps.emqx.io/v2beta1/EMQX/status.coreNodes[*].uptime` and `apps.emqx.io/v2beta1/EMQX/status.replicantNodes[*].uptime`, because EMQX operator will constantly updating them. This is unnecessary wear and tear.

## How to install/upgrade EMQX Operator 💡

Expand All @@ -29,7 +29,7 @@ helm repo update
helm upgrade --install emqx-operator emqx/emqx-operator \
--namespace emqx-operator-system \
--create-namespace \
--version 2.2.24-rc.1
--version 2.2.23
kubectl wait --for=condition=Ready pods -l "control-plane=controller-manager" -n emqx-operator-system
```

Expand Down
24 changes: 11 additions & 13 deletions controllers/apps/v2beta1/update_emqx_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,21 +117,19 @@ func (u *updateStatus) reconcile(ctx context.Context, logger logr.Logger, instan
}
}

if currentSts != nil {
isEnterpriser := false
for _, node := range coreNodes {
if node.ControllerUID == currentSts.UID && node.Edition == "Enterprise" {
isEnterpriser = true
break
}
isEnterpriser := false
for _, node := range coreNodes {
if node.ControllerUID == currentSts.UID && node.Edition == "Enterprise" {
isEnterpriser = true
break
}
if isEnterpriser {
nodeEvacuationsStatus, err := getNodeEvacuationStatusByAPI(r)
if err != nil {
u.EventRecorder.Event(instance, corev1.EventTypeWarning, "FailedToGetNodeEvacuationStatuses", err.Error())
}
instance.Status.NodeEvacuationsStatus = nodeEvacuationsStatus
}
if isEnterpriser {
nodeEvacuationsStatus, err := getNodeEvacuationStatusByAPI(r)
if err != nil {
u.EventRecorder.Event(instance, corev1.EventTypeWarning, "FailedToGetNodeEvacuationStatuses", err.Error())
}
instance.Status.NodeEvacuationsStatus = nodeEvacuationsStatus
}

// update status condition
Expand Down