You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2023/08/31 20:21:58 UTC
[solr-operator] branch main updated: Set minimum Kubernetes version to v1.22 (#612)
This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-operator.git
The following commit(s) were added to refs/heads/main by this push:
new da24cff Set minimum Kubernetes version to v1.22 (#612)
da24cff is described below
commit da24cfffd750cee5e623f16ab6303e60ea3006d9
Author: Houston Putman <ho...@apache.org>
AuthorDate: Thu Aug 31 16:21:52 2023 -0400
Set minimum Kubernetes version to v1.22 (#612)
- Switch default solr version for e2e and smoke tests
- Up resources for e2e and smoke tests
---
.github/workflows/e2e-tests.yaml | 2 +-
dev-docs/e2e-testing.md | 2 +-
docs/upgrade-notes.md | 8 +++++++-
hack/release/smoke_test/test_cluster.sh | 29 +++++++++++++++--------------
helm/solr-operator/Chart.yaml | 9 ++++++++-
helm/solr/Chart.yaml | 2 +-
tests/e2e/test_utils_test.go | 4 ++--
tests/scripts/manage_e2e_tests.sh | 6 +++---
8 files changed, 38 insertions(+), 24 deletions(-)
diff --git a/.github/workflows/e2e-tests.yaml b/.github/workflows/e2e-tests.yaml
index 244b608..ce5fa85 100644
--- a/.github/workflows/e2e-tests.yaml
+++ b/.github/workflows/e2e-tests.yaml
@@ -48,7 +48,7 @@ jobs:
strategy:
matrix:
go-version: [ '1.20' ]
- kube-version: [ 'v1.21.14' ]
+ kube-version: [ 'v1.26.6' ]
solr-version: [ '9' ] # [ '8', '9' ]
steps:
diff --git a/dev-docs/e2e-testing.md b/dev-docs/e2e-testing.md
index 0f742e6..42a31df 100644
--- a/dev-docs/e2e-testing.md
+++ b/dev-docs/e2e-testing.md
@@ -50,7 +50,7 @@ $ make e2e-tests TEST_SEED=89724023 SOLR_IMAGE=apache/solr-nightly:10.0.0-SNAPSH
Default is `solr:8.11`.
- **KUBERETES_VERSION** - A full Kubernetes version, starting with `v`, to use when creating the KinD Cluster.
To find a list of all possible versions, check the [KinD Node Docker tags](https://hub.docker.com/r/kindest/node/tags).
- Default is `v1.21.14`.
+ Default is `v1.26.6`.
### Filtering tests
diff --git a/docs/upgrade-notes.md b/docs/upgrade-notes.md
index 254784a..62d9f75 100644
--- a/docs/upgrade-notes.md
+++ b/docs/upgrade-notes.md
@@ -27,7 +27,7 @@ If you want to skip versions when upgrading, be sure to check out the [upgrading
### Kubernetes Versions
-| Solr Operator Version | `1.15` | `1.16` - `1.18` | `1.19` - `1.20` | `1.21` | `1.22`+ |
+| Solr Operator Version | `1.15` | `1.16` - `1.18` | `1.19` - `1.20` | `1.21` | `1.22`+ |
|:---------------------:| :---: | :---: |:------------------:|:------------------:|:------------------:|
| `v0.2.6` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |
| `v0.2.7` | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |
@@ -37,6 +37,7 @@ If you want to skip versions when upgrading, be sure to check out the [upgrading
| `v0.5.x` | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| `v0.6.x` | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| `v0.7.x` | :x: | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: |
+| `v0.8.x` | :x: | :x: | :x: | :x: | :heavy_check_mark: |
### Solr Versions
@@ -50,6 +51,7 @@ If you want to skip versions when upgrading, be sure to check out the [upgrading
| `v0.5.x` | :grey_question: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| `v0.6.x` | :grey_question: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| `v0.7.x` | :grey_question: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
+| `v0.8.x` | :grey_question: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
Please note that this represents basic compatibility with the Solr Operator.
There may be options and features that require newer versions of Solr.
@@ -110,6 +112,10 @@ _Note that the Helm chart version does not contain a `v` prefix, which the downl
## Upgrade Warnings and Notes
### v0.8.0
+- **Kubernetes support is now limited to 1.22+.**
+ If you are unable to use a newer version of Kubernetes, please install the `v0.7.1` version of the Solr Operator for use with Kubernetes `1.21`.
+ See the [version compatibility matrix](#kubernetes-versions) for more information.
+
- The new `SolrCloud.spec.scaling.vacatePodsOnScaleDown` option is enabled by default.
This means that any SolrCloud that has its `spec.replicas` decreased will have the replicas migrated off of the soon-to-be-deleted pods by default.
Set this value to `false` to retain the previous functionality.
diff --git a/hack/release/smoke_test/test_cluster.sh b/hack/release/smoke_test/test_cluster.sh
index 498cb96..26d7ed4 100755
--- a/hack/release/smoke_test/test_cluster.sh
+++ b/hack/release/smoke_test/test_cluster.sh
@@ -32,7 +32,7 @@ Test the release candidate in a Kind cluster
-l Base location of the staged artifacts. Can be a URL or relative or absolute file path.
-i Solr Operator docker image to use (Optional, defaults to apache/solr-operator:<version>)
-g GPG Key (fingerprint) used to sign the artifacts (Optional, if not provided then the helm chart will not be verified)
- -k Kubernetes Version to test with (full tag, e.g. v1.21.2) (Optional, defaults to a compatible version)
+ -k Kubernetes Version to test with (full tag, e.g. v1.26.6) (Optional, defaults to a compatible version)
-t Full solr image, or image tag (for the official Solr image), to test with (e.g. apache/solr-nightly:9.0.0, 8.11). (Optional, defaults to a compatible version)
EOF
}
@@ -74,10 +74,10 @@ if [[ -z "${LOCATION:-}" ]]; then
echo "Specify an base artifact location -l, or through the LOCATION env var" >&2 && exit 1
fi
if [[ -z "${KUBERNETES_VERSION:-}" ]]; then
- KUBERNETES_VERSION="v1.21.2"
+ KUBERNETES_VERSION="v1.26.6"
fi
if [[ -z "${SOLR_IMAGE:-}" ]]; then
- SOLR_IMAGE="${SOLR_VERSION:-9.0}"
+ SOLR_IMAGE="${SOLR_VERSION:-8.11}"
fi
if [[ "${SOLR_IMAGE}" != *":"* ]]; then
SOLR_IMAGE="solr:${SOLR_IMAGE}"
@@ -170,13 +170,14 @@ helm install --kube-context "${KUBE_CONTEXT}" ${VERIFY_OR_NOT} solr-operator "${
printf "\nInstall a test Solr Cluster\n"
helm install --kube-context "${KUBE_CONTEXT}" ${VERIFY_OR_NOT} example "${SOLR_HELM_CHART}" \
- --set replicas=3 \
+ --set replicas=2 \
--set image.repository="${SOLR_IMAGE%%:*}" \
--set-string image.tag="${SOLR_IMAGE##*:}" \
- --set solrOptions.javaMemory="-Xms1g -Xmx3g" \
- --set podOptions.resources.limits.memory="1G" \
- --set podOptions.resources.requests.cpu="300m" \
- --set podOptions.resources.requests.memory="512Mi" \
+ --set solrOptions.javaMemory="-Xms700m -Xmx700m" \
+ --set podOptions.resources.limits.cpu="500m" \
+ --set podOptions.resources.limits.memory="1Gi" \
+ --set podOptions.resources.requests.cpu="500m" \
+ --set podOptions.resources.requests.memory="1Gi" \
--set zk.provided.persistence.spec.resources.requests.storage="5Gi" \
--set zk.provided.replicas=1 \
--set "backupRepositories[0].name=local" \
@@ -186,8 +187,8 @@ helm install --kube-context "${KUBE_CONTEXT}" ${VERIFY_OR_NOT} example "${SOLR_H
remove_solr_helm_repo
# Wait for solrcloud to be ready
-printf '\nWait for all 3 Solr nodes to become ready.\n\n'
-grep -q "3 3 3 3" <(exec kubectl get solrcloud example -w); kill $!
+printf '\nWait for all 2 Solr nodes to become ready.\n\n'
+grep -q "2 2 2 2" <(exec kubectl get solrcloud example -w); kill $!
# Expose the common Solr service to localhost
kubectl port-forward service/example-solrcloud-common 18983:80 || true &
@@ -197,7 +198,7 @@ printf "\nCheck the admin URL to make sure it works\n"
curl --silent "http://localhost:18983/solr/admin/info/system" | grep '"status":0' > /dev/null
printf "\nCreating a test collection\n"
-curl --silent "http://localhost:18983/solr/admin/collections?action=CREATE&name=smoke-test&replicationFactor=2&numShards=1" | grep '"status":0' > /dev/null
+curl --silent "http://localhost:18983/solr/admin/collections?action=CREATE&name=smoke-test&replicationFactor=1&numShards=2" | grep '"status":0' > /dev/null
printf "\nQuery the test collection, test for 0 docs\n"
curl --silent "http://localhost:18983/solr/smoke-test/select" | grep '\"numFound\":0' > /dev/null
@@ -293,11 +294,11 @@ add_solr_helm_repo
helm upgrade --kube-context "${KUBE_CONTEXT}" ${VERIFY_OR_NOT} example "${SOLR_HELM_CHART}" --reuse-values \
--set-string podOptions.annotations.restart="true"
printf '\nWait for the rolling restart to begin.\n\n'
-grep -q "3 [[:digit:]] [[:digit:]] 0" <(exec kubectl get solrcloud example -w); kill $!
+grep -q "2 [[:digit:]] [[:digit:]] 0" <(exec kubectl get solrcloud example -w); kill $!
remove_solr_helm_repo
-printf '\nWait 5 minutes for all 3 Solr nodes to become ready.\n\n'
-grep -q "3 3 3 3" <(exec kubectl get solrcloud example -w --request-timeout 300); kill $!
+printf '\nWait 5 minutes for all 2 Solr nodes to become ready.\n\n'
+grep -q "2 2 2 2" <(exec kubectl get solrcloud example -w --request-timeout 300); kill $!
# Need a new port-forward, since the last one will have broken due to all pods restarting
kubectl port-forward service/example-solrcloud-common 28983:80 || true &
diff --git a/helm/solr-operator/Chart.yaml b/helm/solr-operator/Chart.yaml
index c584361..6452718 100644
--- a/helm/solr-operator/Chart.yaml
+++ b/helm/solr-operator/Chart.yaml
@@ -17,7 +17,7 @@ name: solr-operator
description: The Solr Operator enables easy management of Solr resources within Kubernetes.
version: 0.8.0-prerelease
appVersion: v0.8.0-prerelease
-kubeVersion: ">= 1.21.0-0"
+kubeVersion: ">= 1.22.0-0"
home: https://solr.apache.org/operator
sources:
- https://github.com/apache/solr-operator
@@ -54,6 +54,13 @@ annotations:
# Add change log for a single release here.
# Allowed syntax is described at: https://artifacthub.io/docs/topics/annotations/helm/#example
artifacthub.io/changes: |
+ - kind: changed
+ description: The minimum supported version of Kubernetes is now v1.22
+ links:
+ - name: Github Issue
+ url: https://github.com/apache/solr-operator/issues/604
+ - name: Github PR
+ url: https://github.com/apache/solr-operator/pull/612
- kind: added
description: Ability to customize the SecurityContext for the solr-operator pod
links:
diff --git a/helm/solr/Chart.yaml b/helm/solr/Chart.yaml
index 952f748..03bfc70 100644
--- a/helm/solr/Chart.yaml
+++ b/helm/solr/Chart.yaml
@@ -17,7 +17,7 @@ name: solr
description: A SolrCloud cluster running on Kubernetes via the Solr Operator
version: 0.8.0-prerelease
appVersion: 8.11.1
-kubeVersion: ">= 1.21.0-0"
+kubeVersion: ">= 1.22.0-0"
home: https://solr.apache.org
sources:
- https://github.com/apache/solr
diff --git a/tests/e2e/test_utils_test.go b/tests/e2e/test_utils_test.go
index cc4a724..85e08a0 100644
--- a/tests/e2e/test_utils_test.go
+++ b/tests/e2e/test_utils_test.go
@@ -506,12 +506,12 @@ func generateBaseSolrCloud(replicas int) *solrv1beta1.SolrCloud {
},
},
// This seems to be the lowest memory & CPU that allow the tests to pass
- SolrJavaMem: "-Xms512m -Xmx512m",
+ SolrJavaMem: "-Xms700m -Xmx700m",
CustomSolrKubeOptions: solrv1beta1.CustomSolrKubeOptions{
PodOptions: &solrv1beta1.PodOptions{
Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
- corev1.ResourceMemory: resource.MustParse("600Mi"),
+ corev1.ResourceMemory: resource.MustParse("1Gi"),
corev1.ResourceCPU: resource.MustParse("1"),
},
},
diff --git a/tests/scripts/manage_e2e_tests.sh b/tests/scripts/manage_e2e_tests.sh
index 98f23c4..27ca4f2 100755
--- a/tests/scripts/manage_e2e_tests.sh
+++ b/tests/scripts/manage_e2e_tests.sh
@@ -34,7 +34,7 @@ Available actions are: run-tests, create-cluster, destroy-cluster, kubeconfig
-h Display this help and exit
-i Solr Operator docker image to use (Optional, defaults to apache/solr-operator:<version>)
- -k Kubernetes Version to test with (full tag, e.g. v1.21.2) (Optional, defaults to a compatible version)
+ -k Kubernetes Version to test with (full tag, e.g. v1.24.16) (Optional, defaults to a compatible version)
-s Full solr image, or image tag (for the official Solr image), to test with (e.g. apache/solr-nightly:9.0.0, 8.11). (Optional, defaults to a compatible version)
-a Load additional local images into the test Kubernetes cluster. Provide option multiple times for multiple images. (Optional)
EOF
@@ -73,10 +73,10 @@ if [[ -z "${OPERATOR_IMAGE:-}" ]]; then
echo "Specify a Docker image for the Solr Operator through -i, or through the OPERATOR_IMAGE env var" >&2 && exit 1
fi
if [[ -z "${KUBERNETES_VERSION:-}" ]]; then
- KUBERNETES_VERSION="v1.21.14"
+ KUBERNETES_VERSION="v1.26.6"
fi
if [[ -z "${SOLR_IMAGE:-}" ]]; then
- SOLR_IMAGE="${SOLR_VERSION:-8.11}"
+ SOLR_IMAGE="${SOLR_VERSION:-9.3}"
fi
if [[ "${SOLR_IMAGE}" != *":"* ]]; then
SOLR_IMAGE="solr:${SOLR_IMAGE}"