Skip to content

Commit 72acaf1

Browse files
committed
Try with lighter weight elasticsearch
1 parent ff329d9 commit 72acaf1

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Lightweight values for CI testing with Elasticsearch backend
2+
backend: elasticsearch
3+
4+
app:
5+
replicaCount: 1
6+
databaseAuth:
7+
existingSecret: ""
8+
username: ""
9+
password: ""
10+
11+
elasticsearch:
12+
enabled: true
13+
clusterName: "stac-elasticsearch-ci"
14+
replicas: 1
15+
minimumMasterNodes: 1
16+
resources:
17+
requests:
18+
cpu: "200m"
19+
memory: "1Gi"
20+
limits:
21+
cpu: "500m"
22+
memory: "1Gi"
23+
esJavaOpts: "-Xmx512m -Xms512m"
24+
esConfig:
25+
elasticsearch.yml: |
26+
cluster.name: "stac-elasticsearch-ci"
27+
network.host: 0.0.0.0
28+
discovery.seed_hosts: ["stac-elasticsearch-ci-master-headless"]
29+
cluster.initial_master_nodes: ["stac-elasticsearch-ci-master-0"]
30+
action.destructive_requires_name: false
31+
xpack.security.enabled: false
32+
xpack.security.transport.ssl.enabled: false
33+
xpack.security.http.ssl.enabled: false
34+
volumeClaimTemplate:
35+
accessModes: ["ReadWriteOnce"]
36+
resources:
37+
requests:
38+
storage: 5Gi
39+
40+
opensearch:
41+
enabled: false
42+
43+
externalDatabase:
44+
enabled: false
45+
46+
monitoring:
47+
enabled: false

helm-chart/test-chart.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ NAMESPACE="stac-fastapi"
1919
BACKEND=${BACKEND:-"elasticsearch"}
2020
MATRIX_MODE=${MATRIX_MODE:-false}
2121
DEBUG_BACKEND_LOGS=${DEBUG_BACKEND_LOGS:-false}
22+
VALUES_PROFILE=${VALUES_PROFILE:-}
2223

2324
# Functions
2425
log_info() {
@@ -245,6 +246,10 @@ if [[ "$MATRIX_MODE" == "true" && "$DEBUG_BACKEND_LOGS" == "false" ]]; then
245246
DEBUG_BACKEND_LOGS=true
246247
fi
247248

249+
if [[ "$MATRIX_MODE" == "true" && -z "${APP_REPLICA_COUNT:-}" ]]; then
250+
APP_REPLICA_COUNT=1
251+
fi
252+
248253
# Validate backend
249254
if [[ "$BACKEND" != "elasticsearch" && "$BACKEND" != "opensearch" ]]; then
250255
log_error "Invalid backend: $BACKEND. Must be 'elasticsearch' or 'opensearch'"
@@ -344,6 +349,20 @@ install_chart() {
344349
;;
345350
esac
346351

352+
local profile_suffix=""
353+
if [[ -n "$VALUES_PROFILE" ]]; then
354+
profile_suffix="-$VALUES_PROFILE"
355+
elif [[ "$MATRIX_MODE" == "true" ]]; then
356+
profile_suffix="-ci"
357+
fi
358+
359+
if [[ -n "$profile_suffix" ]]; then
360+
local candidate="values-${BACKEND}${profile_suffix}.yaml"
361+
if [[ -f "$CHART_PATH/$candidate" ]]; then
362+
values_file="$candidate"
363+
fi
364+
fi
365+
347366
local values_path="$CHART_PATH/$values_file"
348367
local desired_replicas
349368
desired_replicas=$(get_desired_app_replicas "$values_path")

0 commit comments

Comments
 (0)