Skip to content

Commit

Permalink
[Improvement] Print assigned node name to log when pod is scheduled -…
Browse files Browse the repository at this point in the history
… GT-213 (#1444)
  • Loading branch information
nikita-vanyasin authored Oct 17, 2023
1 parent d1faaa3 commit 781d240
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Change Log

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

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

## [1.2.33](https://github.com/arangodb/kube-arangodb/tree/1.2.33) (2023-09-27)
- (Maintenance) Bump golang.org/x/net to v0.13.0
Expand Down
4 changes: 3 additions & 1 deletion pkg/deployment/resources/pod_inspector.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,9 @@ func (r *Resources) InspectPods(ctx context.Context, cachedStatus inspectorInter
}

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

0 comments on commit 781d240

Please sign in to comment.