Skip to content

Commit 781d240

Browse files
[Improvement] Print assigned node name to log when pod is scheduled - GT-213 (#1444)
1 parent d1faaa3 commit 781d240

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Change Log
22

33
## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
4+
- (Maintenance) Update go-driver to v1.6.0, update IsNotFound() checks
5+
- (Improvement) Print assigned node name to log and condition message when pod is scheduled
46

57
## [1.2.34](https://github.com/arangodb/kube-arangodb/tree/1.2.34) (2023-10-16
68
- (Bugfix) Fix make manifests-crd-file command
@@ -16,7 +18,6 @@
1618
- (Maintenance) Make scale_down_candidate annotation obsolete
1719
- (Bugfix) Fix ResignJob ID propagation
1820
- (Bugfix) Allow shards with RF1 in EnforcedResignLeadership action
19-
- (Maintenance) Update go-driver to v1.6.0, update IsNotFound() checks
2021

2122
## [1.2.33](https://github.com/arangodb/kube-arangodb/tree/1.2.33) (2023-09-27)
2223
- (Maintenance) Bump golang.org/x/net to v0.13.0

pkg/deployment/resources/pod_inspector.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,9 @@ func (r *Resources) InspectPods(ctx context.Context, cachedStatus inspectorInter
380380
}
381381

382382
if k8sutil.IsPodScheduled(pod) {
383-
if memberStatus.Conditions.Update(api.ConditionTypeScheduled, true, "Pod is scheduled", "") {
383+
msg := fmt.Sprintf("Assigned to node %s", pod.Spec.NodeName)
384+
if memberStatus.Conditions.Update(api.ConditionTypeScheduled, true, "Pod is scheduled", msg) {
385+
log.Str("pod-name", pod.GetName()).Str("node", pod.Spec.NodeName).Info("Member has been scheduled")
384386
updateMemberStatusNeeded = true
385387
nextInterval = nextInterval.ReduceTo(recheckSoonPodInspectorInterval)
386388
}

0 commit comments

Comments
 (0)