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

[Bugfix] Fix missing Pod Status case in the RuntimeContainerImageUpda… #1454

Merged
merged 1 commit into from
Oct 20, 2023
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
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