File tree Expand file tree Collapse file tree 2 files changed +66
-0
lines changed
Expand file tree Collapse file tree 2 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ NAMESPACE="stac-fastapi"
1919BACKEND=${BACKEND:- " elasticsearch" }
2020MATRIX_MODE=${MATRIX_MODE:- false}
2121DEBUG_BACKEND_LOGS=${DEBUG_BACKEND_LOGS:- false}
22+ VALUES_PROFILE=${VALUES_PROFILE:- }
2223
2324# Functions
2425log_info () {
@@ -245,6 +246,10 @@ if [[ "$MATRIX_MODE" == "true" && "$DEBUG_BACKEND_LOGS" == "false" ]]; then
245246 DEBUG_BACKEND_LOGS=true
246247fi
247248
249+ if [[ " $MATRIX_MODE " == " true" && -z " ${APP_REPLICA_COUNT:- } " ]]; then
250+ APP_REPLICA_COUNT=1
251+ fi
252+
248253# Validate backend
249254if [[ " $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 " )
You can’t perform that action at this time.
0 commit comments