Skip to content

Commit

Permalink
fix multinamespace cache isue (#132)
Browse files Browse the repository at this point in the history
* fix multinamespace cache isue

* add Namespace

* e2e increase timeout
  • Loading branch information
AdheipSingh authored Feb 10, 2024
1 parent e08c388 commit e14887d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions e2e/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -o errexit
set -x
# Get Kind
go install sigs.k8s.io/kind@v0.17.0
go install sigs.k8s.io/kind@v0.21.0
# minio statefulset name
MINIO_STS_NAME=myminio-ss-0
# druid namespace
Expand Down Expand Up @@ -45,7 +45,7 @@ kubectl apply -f e2e/configs/druid-cr.yaml -n ${NAMESPACE}
sleep 10
for d in $(kubectl get pods -n ${NAMESPACE} -l app=druid -l druid_cr=tiny-cluster -o name)
do
kubectl wait -n ${NAMESPACE} "$d" --for=condition=Ready --timeout=5m
kubectl wait -n ${NAMESPACE} "$d" --for=condition=Ready --timeout=15m
done
# wait for druid pods
for s in $(kubectl get sts -n ${NAMESPACE} -l app=${NAMESPACE} -l druid_cr=tiny-cluster -o name)
Expand Down
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ func main() {

func watchNamespaceCache() cache.NewCacheFunc {
var managerWatchCache cache.NewCacheFunc
if watchNamespace != "" {
ns := strings.Split(watchNamespace, ",")
ns := strings.Split(watchNamespace, ",")

if len(ns) > 1 {
for i := range ns {
ns[i] = strings.TrimSpace(ns[i])
}
Expand Down

0 comments on commit e14887d

Please sign in to comment.