Skip to content

Commit

Permalink
Use info, add to condition msg, fix changelog after auto-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-vanyasin committed Oct 17, 2023
1 parent 0e39274 commit a21547d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [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 when pod is scheduled
- (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 Down
5 changes: 3 additions & 2 deletions pkg/deployment/resources/pod_inspector.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +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", "") {
log.Str("pod-name", pod.GetName()).Str("node", pod.Spec.NodeName).Debug("Member has been 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 a21547d

Please sign in to comment.