diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index 594d9cfb..bcbeedf8 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -42,6 +42,7 @@ jobs: - { label: 435, args: '-a "--set image.tag=435"' } # skip cleanup to test deploying multiple releases in a single namespace - { label: overrides, args: '-s -t default,overrides' } + - { label: gateway, args: '-t gateway' } steps: - uses: actions/checkout@v4 - name: Set up Helm diff --git a/README.md b/README.md index b3e61a88..0db765b6 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,9 @@ helm template my-trino trino/trino --namespace ## Documentation -You can find documentation about the chart [here](./charts/trino/README.md). +You can find documentation about the charts: +* [Trino](./charts/trino/README.md). +* [Trino Gateway](./charts/gateway/README.md). ## Development diff --git a/charts/gateway/Chart.yaml b/charts/gateway/Chart.yaml index 67a62936..b1b0dd72 100644 --- a/charts/gateway/Chart.yaml +++ b/charts/gateway/Chart.yaml @@ -5,4 +5,4 @@ type: application # Trino Gateway Helm chart version. Should be appVersion with .0.0 appended. version: "12.0.0" # Trino Gateway version -appVersion: "12" +appVersion: "11" diff --git a/charts/gateway/README.md b/charts/gateway/README.md index 478edfd3..f86a3513 100644 --- a/charts/gateway/README.md +++ b/charts/gateway/README.md @@ -1,6 +1,6 @@ # trino-gateway -![Version: 12.0.0](https://img.shields.io/badge/Version-12.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 12](https://img.shields.io/badge/AppVersion-12-informational?style=flat-square) +![Version: 12.0.0](https://img.shields.io/badge/Version-12.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 11](https://img.shields.io/badge/AppVersion-11-informational?style=flat-square) A Helm chart for Trino Gateway diff --git a/charts/gateway/templates/tests/test-connection.yaml b/charts/gateway/templates/tests/test-connection.yaml index cfad670f..0c336c53 100644 --- a/charts/gateway/templates/tests/test-connection.yaml +++ b/charts/gateway/templates/tests/test-connection.yaml @@ -4,6 +4,8 @@ metadata: name: "{{ include "trino-gateway.fullname" . }}-test-connection" labels: {{- include "trino-gateway.labels" . | nindent 4 }} + app.kubernetes.io/component: test + test: connection annotations: "helm.sh/hook": test spec: diff --git a/test.sh b/test.sh index 0b208033..eaefe4c2 100755 --- a/test.sh +++ b/test.sh @@ -10,6 +10,18 @@ declare -A testCases=( [access_control_properties_values]="--values test-access-control-properties-values.yaml" [exchange_manager_values]="--values test-exchange-manager-values.yaml" [graceful_shutdown]="--values test-graceful-shutdown-values.yaml" + [gateway]="" +) + +declare -A testCaseCharts=( + [default]="charts/trino" + [single_node]="charts/trino" + [complete_values]="charts/trino" + [overrides]="charts/trino" + [access_control_properties_values]="charts/trino" + [exchange_manager_values]="charts/trino" + [graceful_shutdown]="charts/trino" + [gateway]="charts/gateway" ) function join_by { @@ -22,7 +34,10 @@ function join_by { # default to randomly generated namespace, same as chart-testing would do, but we need to load secrets into the same namespace NAMESPACE=trino-$(LC_ALL=C tr -dc 'a-z0-9' &2 "" echo 1>&2 "🧪 Running test $test_name" echo 1>&2 "" - if ! time ct install "${CT_ARGS[@]}" --helm-extra-set-args "$HELM_EXTRA_SET_ARGS ${testCases[$test_name]}"; then + if ! time ct install "${CT_ARGS[@]}" --charts="${testCaseCharts[$test_name]}" --helm-extra-set-args "$HELM_EXTRA_SET_ARGS ${testCases[$test_name]}"; then echo 1>&2 "❌ Test $test_name failed" echo 1>&2 "Test logs:" kubectl --namespace "$NAMESPACE" logs --tail=-1 --selector app.kubernetes.io/component=test --all-containers=true