Skip to content

Commit

Permalink
[Bugfix] Fix missing Pod Status case in the RuntimeContainerImageUpda…
Browse files Browse the repository at this point in the history
…teAction (#1454)
  • Loading branch information
ajanikow authored Oct 20, 2023
1 parent 66d6dca commit b153f54
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- (Documentation) Move documentation from ArangoDB into this repo, update and improve structure
- (Documentation) Update ArangoDeployment CR auto-generated docs
- (Documentation) Update ArangoBackup and ArangoBackupPolicy CR auto-generated docs
- (Bugfix) Fix missing Pod Status case in the RuntimeContainerImageUpdateAction

## [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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -227,13 +227,8 @@ func (a actionRuntimeContainerImageUpdate) Start(ctx context.Context) (bool, err
return true, nil
}

spec := member.Spec.Template.PodSpec
status := member.Status.Template.PodSpec

for id := range pod.Spec.Containers {
if pod.Spec.Containers[id].Name != spec.Spec.Containers[id].Name ||
pod.Spec.Containers[id].Name != status.Spec.Containers[id].Name ||
pod.Spec.Containers[id].Name != name {
if pod.Spec.Containers[id].Name != name {
continue
}

Expand All @@ -249,10 +244,14 @@ func (a actionRuntimeContainerImageUpdate) Start(ctx context.Context) (bool, err
return false, nil
}

a.log.Info("Image is UpToDate")

return true, nil
}

return true, nil
a.log.Str("container", name).Str("pod", pod.GetName()).Warn("Container not found")

return false, errors.Newf("Container %s not found in Pod %s", name, pod.GetName())
}

func (a actionRuntimeContainerImageUpdate) CheckProgress(ctx context.Context) (bool, bool, error) {
Expand Down

0 comments on commit b153f54

Please sign in to comment.