Skip to content

Commit 58b098b

Browse files
committed
Enhance pre-commit to cover helm chart
1 parent 21f8af4 commit 58b098b

File tree

4 files changed

+51
-37
lines changed

4 files changed

+51
-37
lines changed

.github/ct.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ target-branch: main
1010

1111
# Chart repositories to add
1212
chart-repos:
13-
- name: elasticsearch
14-
url: https://helm.elastic.co
15-
- name: opensearch
16-
url: https://opensearch-project.github.io/helm-charts/
13+
- elasticsearch=https://helm.elastic.co
14+
- opensearch=https://opensearch-project.github.io/helm-charts/
1715

1816
# Helm version to use
1917
helm-version: v3.13.0

.pre-commit-config.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,20 @@ repos:
4141
#args: [
4242
# Don't require docstrings for tests
4343
#'--match=(?!test|alembic|scripts).*\.py',
44-
#]
44+
#]
45+
- repo: local
46+
hooks:
47+
- id: helm-chart-lint
48+
name: Helm chart lint
49+
language: docker_image
50+
entry: quay.io/helmpack/chart-testing:v3.7.1
51+
args:
52+
- bash
53+
- -c
54+
- >-
55+
export HELM_CONFIG_HOME=/tmp/helm &&
56+
export HELM_DATA_HOME=/tmp/helm &&
57+
export HELM_CACHE_HOME=/tmp/helm &&
58+
ct lint --config /src/.github/ct.yaml
59+
pass_filenames: false
60+
files: ^helm-chart/

helm-chart/stac-fastapi/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ dependencies:
2929
- name: opensearch
3030
version: 3.2.1
3131
repository: https://opensearch-project.github.io/helm-charts/
32-
condition: opensearch.enabled
32+
condition: opensearch.enabled

helm-chart/stac-fastapi/values.yaml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -148,26 +148,26 @@ app:
148148
ENVIRONMENT: "production"
149149
WEB_CONCURRENCY: "10"
150150
RELOAD: "false"
151-
151+
152152
# Database configuration
153153
DATABASE_REFRESH: "false"
154154
ENABLE_TRANSACTIONS_EXTENSIONS: "true"
155155
STAC_ITEM_LIMIT: "10"
156156
ENV_MAX_LIMIT: "10000"
157157
STAC_INDEX_ASSETS: "false"
158158
RAISE_ON_BULK_ERROR: "false"
159-
159+
160160
# Performance configuration
161161
ENABLE_DIRECT_RESPONSE: "false"
162-
162+
163163
# Rate limiting
164164
STAC_FASTAPI_RATE_LIMIT: "200/minute"
165-
165+
166166
# Datetime index filtering
167167
ENABLE_DATETIME_INDEX_FILTERING: "false"
168168
DATETIME_INDEX_MAX_SIZE_GB: "25"
169169
STAC_ITEMS_INDEX_PREFIX: "items_"
170-
170+
171171
# SSL configuration
172172
ES_USE_SSL: "false"
173173
ES_VERIFY_CERTS: "false"
@@ -206,29 +206,29 @@ opensearchSecurity:
206206
elasticsearch:
207207
# Enable/disable Elasticsearch deployment
208208
enabled: true
209-
209+
210210
# Elasticsearch cluster name
211211
clusterName: "stac-elasticsearch"
212-
212+
213213
# Node group configuration
214214
nodeGroup: "master"
215-
215+
216216
# Number of masters eligible nodes
217217
masterService: "stac-elasticsearch-master"
218-
218+
219219
# Elasticsearch roles
220220
roles:
221221
- master
222222
- ingest
223223
- data
224224
- remote_cluster_client
225-
225+
226226
# Number of replicas
227227
replicas: 1
228-
228+
229229
# Minimum master nodes
230230
minimumMasterNodes: 1
231-
231+
232232
# Elasticsearch configuration
233233
esConfig:
234234
elasticsearch.yml: |
@@ -239,10 +239,10 @@ elasticsearch:
239239
xpack.security.enabled: false
240240
xpack.security.transport.ssl.enabled: false
241241
xpack.security.http.ssl.enabled: false
242-
242+
243243
# JVM configuration
244244
esJavaOpts: "-Xmx1g -Xms1g"
245-
245+
246246
# Resource configuration
247247
resources:
248248
requests:
@@ -251,15 +251,15 @@ elasticsearch:
251251
limits:
252252
cpu: "1000m"
253253
memory: "2Gi"
254-
254+
255255
# Volume claim template
256256
volumeClaimTemplate:
257-
accessModes: [ "ReadWriteOnce" ]
257+
accessModes: ["ReadWriteOnce"]
258258
# storageClassName: "" # Leave empty to use cluster default
259259
resources:
260260
requests:
261261
storage: 1Gi
262-
262+
263263
# Service configuration
264264
service:
265265
type: ClusterIP
@@ -276,29 +276,29 @@ elasticsearch:
276276
opensearch:
277277
# Enable/disable OpenSearch deployment
278278
enabled: false
279-
279+
280280
# OpenSearch cluster name
281281
clusterName: "stac-opensearch"
282-
282+
283283
# Service name used to expose the master nodes
284284
masterService: "opensearch-cluster-master"
285-
285+
286286
# Node group configuration
287287
nodeGroup: "master"
288-
288+
289289
# OpenSearch roles
290290
roles:
291291
- master
292292
- ingest
293293
- data
294294
- remote_cluster_client
295-
295+
296296
# Number of replicas
297297
replicas: 1
298-
298+
299299
# Minimum master nodes
300300
majorVersion: ""
301-
301+
302302
# OpenSearch configuration
303303
config:
304304
opensearch.yml: |
@@ -307,10 +307,10 @@ opensearch:
307307
discovery.type: single-node
308308
plugins.security.disabled: true
309309
action.destructive_requires_name: false
310-
310+
311311
# JVM configuration
312312
opensearchJavaOpts: "-Xmx1g -Xms1g"
313-
313+
314314
# Resource configuration
315315
resources:
316316
requests:
@@ -319,7 +319,7 @@ opensearch:
319319
limits:
320320
cpu: "1000m"
321321
memory: "2Gi"
322-
322+
323323
# Persistence configuration
324324
persistence:
325325
enabled: true
@@ -328,7 +328,7 @@ opensearch:
328328
- ReadWriteOnce
329329
size: 10Gi
330330
annotations: {}
331-
331+
332332
# Service configuration
333333
service:
334334
type: ClusterIP
@@ -363,7 +363,7 @@ externalDatabase:
363363
monitoring:
364364
# Enable monitoring
365365
enabled: false
366-
366+
367367
# Prometheus monitoring
368368
prometheus:
369369
enabled: false
@@ -372,7 +372,7 @@ monitoring:
372372
interval: 30s
373373
scrapeTimeout: 10s
374374
labels: {}
375-
375+
376376
# Grafana dashboards
377377
grafana:
378378
enabled: false
@@ -396,4 +396,4 @@ podDisruptionBudget:
396396
securityPolicy:
397397
enabled: false
398398
psp:
399-
enabled: false
399+
enabled: false

0 commit comments

Comments
 (0)