Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #38 from Pure-AdamuKaapan/LargeFleetFix
Browse files Browse the repository at this point in the history
Changed the default query size to 1000 if not specified
  • Loading branch information
Pure-AdamuKaapan authored Dec 1, 2020
2 parents afb744c + c6dd8da commit 332ecb3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion images/lorax-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN yum update -y && yum install -y \
# Note we install kubeadm only so we can snag a list of its required images with the config shipped
# for this version of kubeadm (matches the one we install with our installer iso).

RUN gem install --no-ri --no-rdoc fpm
RUN gem install --no-ri --no-rdoc fpm -f

COPY images/lorax-build/lorax.conf /etc/lorax/

Expand Down
4 changes: 4 additions & 0 deletions pkg/clients/elastic/arrays.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ func (c *Client) FindArrays(query *resources.ArrayQuery) ([]*resources.Array, er
searchService := c.esclient.Search(arraysIndexName).Type("_doc").Query(query.GenerateElasticQueryObject()).From(query.Offset).IgnoreUnavailable(true).AllowNoIndices(true)
if query.Limit > 0 {
searchService.Size(query.Limit)
} else {
// Default to 1000 results if not specified (should be bigger than any "practical" fleet size to ensure returning
// all results)
searchService.Size(1000)
}
if len(query.Sort) > 0 {
sortParam, err := query.GetSortParameter()
Expand Down
1 change: 1 addition & 0 deletions scripts/build/build_lorax_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if [[ -z "${KUBEVERSION}" ]]; then
fi

docker build \
--no-cache \
-t lorax-build:${VERSION} \
--build-arg "KUBERNETES_VERSION=${KUBEVERSION}" \
-f ${REPO_ROOT}/images/lorax-build/Dockerfile \
Expand Down

0 comments on commit 332ecb3

Please sign in to comment.