Skip to content

Commit

Permalink
add a simple hpa test for repo
Browse files Browse the repository at this point in the history
  • Loading branch information
alxgomz committed Mar 18, 2024
1 parent 63bcde4 commit 2002dea
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/helm-enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ jobs:
run: |
if [ "${{ matrix.values }}" = "values.yaml" -o "${{ matrix.values }}" = "pre-release_values.yaml"]; then
echo "Enabling clustered tests"
echo "helm_install_params=--set alfresco-repository.autoscaling.enabled=true --set dtas.additionalArgs[0]='-k not test_renditions'" >> "$GITHUB_OUTPUT"
echo "helm_install_params=--set alfresco-repository.autoscaling.enabled=true \
--set alfresco-repository.autoscaling.maxReplicas=2 \
--set dtas.additionalArgs[0]='-k not test_renditions'" >> "$GITHUB_OUTPUT"
fi
if [ "${{ matrix.values }}" = "7.0.N_values.yaml" ]; then
echo "Skipping renditions tests on ACS 7.0.N"
Expand Down Expand Up @@ -180,3 +182,12 @@ jobs:
kubectl get all --all-namespaces
kubectl describe pod
kubectl events --for deployment/acs-alfresco-repository
- name: Check HPA behavior (${{ matrix.values }})
if: matrix.values == 'values.yaml' || matrix.values == 'pre-release_values.yaml'
run: |
echo "Repository should have 2 replicas after Helm test"
kubectl get deployment/acs-alfresco-repository -o jsonpath='{@.spec.replicas}' | grep 1
kubectl patch hpa acs-alfresco-repository \
-p '{"spec": {"behavior": {"scaleDown": {"stabilizationWindowSeconds": 20}}}}'
kubectl wait --timeout=40s --for=jsonpath='spec.replicas'=1 hpa/acs-alfresco-repository

0 comments on commit 2002dea

Please sign in to comment.