mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Bugfix] Fix missing Pod Status case in the RuntimeContainerImageUpdateAction (#1454)
This commit is contained in:
parent
66d6dca7b9
commit
b153f54fc6
2 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue