Skip to content

Commit 93649e5

Browse files
committed
Make chart testing more robust
1 parent aa3b8b5 commit 93649e5

File tree

4 files changed

+7
-40
lines changed

4 files changed

+7
-40
lines changed

.github/workflows/helm-chart-test.yml

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -160,40 +160,3 @@ jobs:
160160
uses: github/codeql-action/upload-sarif@v2
161161
with:
162162
sarif_file: reports/results.sarif
163-
164-
chart-testing:
165-
name: Chart Testing (ct)
166-
runs-on: ubuntu-latest
167-
needs: lint
168-
steps:
169-
- name: Checkout
170-
uses: actions/checkout@v4
171-
with:
172-
fetch-depth: 0
173-
174-
- name: Set up Helm
175-
uses: azure/setup-helm@v3
176-
with:
177-
version: ${{ env.HELM_VERSION }}
178-
179-
- name: Set up Python
180-
uses: actions/setup-python@v4
181-
with:
182-
python-version: 3.x
183-
184-
- name: Set up chart-testing
185-
uses: helm/[email protected]
186-
187-
- name: Setup Helm repositories
188-
uses: ./.github/actions/setup-helm-repos
189-
190-
- name: Run chart-testing (lint)
191-
run: ct lint --config .github/ct.yaml
192-
193-
- name: Set up Kind cluster
194-
uses: helm/[email protected]
195-
with:
196-
version: ${{ env.KIND_VERSION }}
197-
198-
- name: Run chart-testing (install)
199-
run: ct install --config .github/ct.yaml

helm-chart/stac-fastapi/templates/NOTES.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,12 @@
7878
{{- if .Values.monitoring.prometheus.enabled }}
7979
- Prometheus metrics: /metrics
8080
{{- if .Values.monitoring.prometheus.serviceMonitor.enabled }}
81-
- ServiceMonitor created for Prometheus Operator
81+
{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor" }}
82+
- ServiceMonitor created for Prometheus Operator
83+
{{- else }}
84+
- ServiceMonitor requested but CRD monitoring.coreos.com/v1 not found
85+
(install Prometheus Operator to enable it)
86+
{{- end }}
8287
{{- end }}
8388
{{- end }}
8489
{{- end }}

helm-chart/stac-fastapi/templates/servicemonitor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and .Values.monitoring.enabled .Values.monitoring.prometheus.enabled .Values.monitoring.prometheus.serviceMonitor.enabled }}
1+
{{- if and .Values.monitoring.enabled .Values.monitoring.prometheus.enabled .Values.monitoring.prometheus.serviceMonitor.enabled (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") }}
22
apiVersion: monitoring.coreos.com/v1
33
kind: ServiceMonitor
44
metadata:

helm-chart/stac-fastapi/values.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ elasticsearch:
234234
elasticsearch.yml: |
235235
cluster.name: "stac-elasticsearch"
236236
network.host: 0.0.0.0
237-
discovery.type: single-node
238237
action.destructive_requires_name: false
239238
xpack.security.enabled: false
240239
xpack.security.transport.ssl.enabled: false

0 commit comments

Comments
 (0)