fix image comparison
This commit is contained in:
parent
ce9dc2bee8
commit
831adc091f
|
@ -2,9 +2,10 @@ apiVersion: seaweed.seaweedfs.com/v1
|
|||
kind: Seaweed
|
||||
metadata:
|
||||
name: seaweed1
|
||||
namespace: default
|
||||
spec:
|
||||
# Add fields here
|
||||
image: chrislusf/seaweedfs:2.08
|
||||
image: chrislusf/seaweedfs:2.09
|
||||
volumeServerDiskCount: 1
|
||||
master:
|
||||
replicas: 3
|
||||
|
@ -17,8 +18,5 @@ spec:
|
|||
replicas: 2
|
||||
config: |
|
||||
[leveldb2]
|
||||
# local on disk, mostly for simple single-machine setup, fairly scalable
|
||||
# faster than previous leveldb, recommended.
|
||||
enabled = true
|
||||
dir = "." # directory to store level db files
|
||||
|
||||
dir = "/data/filerldb2"
|
||||
|
|
|
@ -2,6 +2,7 @@ package controllers
|
|||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
|
@ -35,7 +36,7 @@ func (r *SeaweedReconciler) ensureMaster(seaweedCR *seaweedv1.Seaweed) (done boo
|
|||
return
|
||||
}
|
||||
|
||||
if !*seaweedCR.Spec.Master.ConcurrentStart {
|
||||
if seaweedCR.Spec.Master.ConcurrentStart == nil || !*seaweedCR.Spec.Master.ConcurrentStart {
|
||||
if done, result, err = r.waitForMasterStatefulSet(seaweedCR); done {
|
||||
return
|
||||
}
|
||||
|
@ -62,10 +63,11 @@ func (r *SeaweedReconciler) waitForMasterStatefulSet(seaweedCR *seaweedv1.Seawee
|
|||
for _, pod := range podList.Items {
|
||||
if pod.Status.Phase == corev1.PodRunning {
|
||||
for _, containerStatus := range pod.Status.ContainerStatuses {
|
||||
if containerStatus.Image == seaweedCR.Spec.Image {
|
||||
if strings.Contains(containerStatus.Image, seaweedCR.Spec.Image) {
|
||||
runningCounter++
|
||||
break
|
||||
}
|
||||
log.Info("pod", "name", pod.Name, "containerStatus", containerStatus)
|
||||
}
|
||||
} else {
|
||||
log.Info("pod", "name", pod.Name, "status", pod.Status)
|
||||
|
|
Loading…
Reference in New Issue