Skip to content

Commit

Permalink
feat: add mount
Browse files Browse the repository at this point in the history
  • Loading branch information
kqzh committed Nov 7, 2023
1 parent 039d274 commit 80004a9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/e2e/envfuncsext/nebulacluster-ready-func.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"context"
stderrors "errors"
"fmt"
"github.com/google/go-cmp/cmp"
"io"
"math"
"net/http"
Expand Down Expand Up @@ -628,6 +629,33 @@ func isComponentStatefulSetExpected(ctx context.Context, cfg *envconf.Config, co
return false
}

for _, sVolume := range component.ComponentSpec().Volumes() {
found := false
for _, volume := range sts.Spec.Template.Spec.Volumes {
if volume.Name == sVolume.Name {
if diff := cmp.Diff(volume, sVolume); diff != "" {
klog.ErrorS(nil, "Waiting for NebulaCluster to be ready but StatefulSet volume not expected",
"namespace", sts.Namespace,
"name", sts.Name,
"volume", sVolume.Name,
"diff", fmt.Errorf("DeepEqual failed %s", diff),
)
return false
}
found = true
break
}
}
if !found {
klog.ErrorS(nil, "Waiting for NebulaCluster to be ready but StatefulSet volume not found",
"namespace", sts.Namespace,
"name", sts.Name,
"volume", sVolume.Name,
)
return false
}
}

return true
}

Expand Down

0 comments on commit 80004a9

Please sign in to comment.