diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index 004eaf7c..352be06b 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -91,7 +91,11 @@ jobs: # Everything above is CI, everything here and below is for releases and runs only on non-pull-request events sync-readme: +<<<<<<< HEAD needs: [lint, test, test-gateway, docs] +======= + needs: [lint, test, docs] +>>>>>>> 83d9fad (New squashed commit) runs-on: ubuntu-latest if: github.event_name != 'pull_request' steps: @@ -120,7 +124,11 @@ jobs: git push release: +<<<<<<< HEAD needs: [lint, test, test-gateway, docs, sync-readme] +======= + needs: [lint, test, docs, sync-readme] +>>>>>>> 83d9fad (New squashed commit) runs-on: ubuntu-latest if: github.event_name != 'pull_request' steps: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..ce09622c --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,28 @@ +name: Lint and Test Chart +on: push + +jobs: + lint-test: + runs-on: ubuntu-latest + steps: + - name: Cleanup node + uses: AutoModality/action-clean@1.1.0 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Helm + uses: azure/setup-helm@v1 + with: + version: v3.4.0 + - uses: actions/setup-python@v2 + with: + python-version: 3.7 + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.0.1 + - name: Run chart-testing (lint) + run: ct lint --charts=charts/trino --validate-maintainers=false + - name: Create kind cluster + uses: helm/kind-action@v1.0.0 + - name: Run chart-testing (install) + run: ct install --charts=charts/trino diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..27660745 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,29 @@ +name: Release Trino Chart + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Cleanup node + uses: AutoModality/action-clean@1.1.0 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + - name: Install Helm + uses: azure/setup-helm@v1 + with: + version: v3.5.2 + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.0.0 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/sync-readme.yaml b/.github/workflows/sync-readme.yaml new file mode 100644 index 00000000..f38aee7f --- /dev/null +++ b/.github/workflows/sync-readme.yaml @@ -0,0 +1,30 @@ +name: Sync Readme + +on: + push: + branches: + - 'master' + paths: + - 'README.md' + +jobs: + sync-readme: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: copy README.md + run: | + cp -f README.md ${{ runner.temp }}/README.md + - name: Checkout gh-pages + uses: actions/checkout@v2 + with: + ref: gh-pages + - name: commit + run: | + cp -f ${{ runner.temp }}/README.md . + git config user.name trino_community + git config user.email "trino_community@users.noreply.github.com" + git add README.md + git commit --signoff -m "Sync README from main" + git push diff --git a/.helmignore b/.helmignore index 417ff7fd..bb02fd57 100644 --- a/.helmignore +++ b/.helmignore @@ -14,12 +14,28 @@ *.swp *.bak *.tmp +<<<<<<< HEAD +<<<<<<< HEAD *.orig +======= +>>>>>>> 1cc98e4 (Initial commit) +======= +*.orig +>>>>>>> 83d9fad (New squashed commit) *~ # Various IDEs .project .idea/ *.tmproj +<<<<<<< HEAD +<<<<<<< HEAD +.vscode/ +# helm-doc template +README.md.gotmpl +======= +>>>>>>> 1cc98e4 (Initial commit) +======= .vscode/ # helm-doc template README.md.gotmpl +>>>>>>> 83d9fad (New squashed commit) diff --git a/README.md b/README.md index 9da10f21..1a952557 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ +<<<<<<< HEAD +<<<<<<< HEAD Trino Community Kubernetes Helm Charts =========== [![CI/CD](https://github.com/trinodb/charts/actions/workflows/ci-cd.yaml/badge.svg?branch=main)](https://github.com/trinodb/charts/actions/workflows/ci-cd.yaml) @@ -14,12 +16,48 @@ included: [Helm](https://helm.sh) must be installed to use the charts. Refer to Helm's [documentation](https://helm.sh/docs/) to get started. +<<<<<<< HEAD Once Helm is set up properly, add the repo as follows: +======= +| Parameter | Description | Default | +| ------------------------ | ----------------------- | -------------- | +| `image.repository` | | `"trinodb/trino"` | +| `image.pullPolicy` | | `"IfNotPresent"` | +| `image.tag` | | `"latest"` | +| `server.workers` | | `2` | +| `server.node.environment` | | `"production"` | +| `server.node.dataDir` | | `"/data/trino"` | +| `server.node.pluginDir` | | `"/usr/lib/trino/plugin"` | +| `server.log.trino.level` | | `"INFO"` | +| `server.config.path` | | `"/etc/trino"` | +| `server.config.http.port` | | `8080` | +| `server.config.query.maxMemory` | | `"4GB"` | +| `server.config.query.maxMemoryPerNode` | | `"1GB"` | +| `server.config.query.maxTotalMemoryPerNode` | | `"2GB"` | +| `server.config.memory.heapHeadroomPerNode` | | `"1GB"` | +| `server.jvm.maxHeapSize` | | `"8G"` | +| `server.jvm.gcMethod.type` | | `"UseG1GC"` | +| `server.jvm.gcMethod.g1.heapRegionSize` | | `"32M"` | +| `additionalNodeProperties` | | `{}` | +| `additionalJVMConfig` | | `{}` | +| `additionalConfigProperties` | | `{}` | +| `additionalLogProperties` | | `{}` | +| `additionalCatalogs` | | `{}` | +| `securityContext.runAsUser` | | `1000` | +| `securityContext.runAsGroup` | | `1000` | +| `service.type` | | `"ClusterIP"` | +| `service.port` | | `8080` | +| `resources` | | `{}` | +| `nodeSelector` | | `{}` | +| `tolerations` | | `[]` | +| `affinity` | | `{}` | +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) ```console helm repo add trino https://trinodb.github.io/charts/ ``` +<<<<<<< HEAD Run `helm search repo trino` to see the latest charts with the string `trino` in the name to get an output similar to the following: @@ -28,6 +66,10 @@ NAME CHART VERSION APP VERSION DESCRIPTION trino/trino 1.38.0 474 Fast distributed SQL query engine for big data ... trino/trino-gateway 1.15.1 15 A Helm chart for Trino Gateway ``` +======= +--- +_Documentation generated by [Frigate](https://frigate.readthedocs.io)._ +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) Use `helm search repo trino -l` for information about all available versions. @@ -94,3 +136,106 @@ you [install the pre-commit binary](https://pre-commit.com/#install), then run: pre-commit install pre-commit install-hooks ``` +======= +Trino +======= +Trino Community Kubernetes Helm Charts +>>>>>>> 83d9fad (New squashed commit) +=========== +[![CI/CD](https://github.com/trinodb/charts/actions/workflows/ci-cd.yaml/badge.svg?branch=main)](https://github.com/trinodb/charts/actions/workflows/ci-cd.yaml) + +A repository of Helm charts for the Trino community. The following charts are +included: + +* `trino/trino` for [Trino](https://trino.io/) +* `trino/trino-gateway` for [Trino Gateway](https://trinodb.github.io/trino-gateway) + +## Usage + +[Helm](https://helm.sh) must be installed to use the charts. +Refer to Helm's [documentation](https://helm.sh/docs/) to get started. + +Once Helm is set up properly, add the repo as follows: + +```console +helm repo add trino https://trinodb.github.io/charts/ +``` + +Run `helm search repo trino` to see the latest charts with the string `trino` in +the name to get an output similar to the following: + +``` +NAME CHART VERSION APP VERSION DESCRIPTION +trino/trino 1.37.0 470 Fast distributed SQL query engine for big data ... +trino/trino-gateway 1.13.2 13 A Helm chart for Trino Gateway +``` + +<<<<<<< HEAD +>>>>>>> 1cc98e4 (Initial commit) +======= +Use `helm search repo trino -l` for information about all available versions. + +After configuring your Kubernetes cluster, you can install Trino with the chart +`trino/trino` using: + +```console +helm install my-trino trino/trino --version 1.37.0 +``` + +Also, you can check the manifests using: + +```console +helm template my-trino trino/trino --namespace +``` + +Similarly install Trino Gateway with the `trino/trino-gateway` chart. + +## Documentation + +More information about Trino, Trino Gateway, and the charts is available in the +following resources: + +* [Trino Kubernetes documentation](https://trino.io/docs/current/installation/kubernetes.html) +* [trino/trino chart configuration](./charts/trino/README.md) +* [Trino documentation](https://trino.io/docs/current/index.html) +* [Trino Gateway Kubernetes documentation](https://trinodb.github.io/trino-gateway/installation/#helm) +* [trino/trino-gateway chart configuration](./charts/gateway/README.md) +* [Trino Gateway documentation](https://trinodb.github.io/trino-gateway) + +## Development + +To test the chart, install it into a Kubernetes cluster. Use `kind` to create a +Kubernetes cluster running in a container, and `chart-testing` to install the +chart and run [tests](charts/trino/templates/tests). + +```console +brew install helm kind chart-testing +kind create cluster +ct install +``` + +To run tests with specific values: +```console +ct install --helm-extra-set-args "--set image.tag=470" +``` + +Use the `test.sh` script to run a suite of tests, with different chart values. +If some of the tests fail, use the `-s` flag to skip cleanup and inspect the +resources installed in the Kubernetes cluster. Use `-n` to use a specific +namespace, not a randomly generated one. Use `-t` to run only selected tests. +See the command help (`-h`) for a list of available tests. + +Example: +```console +./test.sh -n trino -s -t default +``` + +The documentation is automatically generated from the chart files. Install a +git hook to have it automatically updated when committing changes. Make sure +you [install the pre-commit binary](https://pre-commit.com/#install), then run: + +```console +pre-commit install +pre-commit install-hooks +``` +>>>>>>> 83d9fad (New squashed commit) diff --git a/charts/gateway/Chart.yaml b/charts/gateway/Chart.yaml index c4ae253c..47e406ac 100644 --- a/charts/gateway/Chart.yaml +++ b/charts/gateway/Chart.yaml @@ -2,8 +2,13 @@ apiVersion: v2 name: trino-gateway description: A Helm chart for Trino Gateway type: application +<<<<<<< HEAD version: "1.15.1" appVersion: "15" +======= +version: "1.13.2" +appVersion: "13" +>>>>>>> 83d9fad (New squashed commit) icon: https://trino.io/assets/images/logos/trino-gateway-small.png diff --git a/charts/gateway/README.md b/charts/gateway/README.md index 2025bcc2..47eee473 100644 --- a/charts/gateway/README.md +++ b/charts/gateway/README.md @@ -1,6 +1,10 @@ # trino-gateway +<<<<<<< HEAD ![Version: 1.15.1](https://img.shields.io/badge/Version-1.15.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 15](https://img.shields.io/badge/AppVersion-15-informational?style=flat-square) +======= +![Version: 1.13.2](https://img.shields.io/badge/Version-1.13.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 13](https://img.shields.io/badge/AppVersion-13-informational?style=flat-square) +>>>>>>> 83d9fad (New squashed commit) A Helm chart for Trino Gateway @@ -47,7 +51,15 @@ A Helm chart for Trino Gateway * `config.dataStore.password` - string, default: `"mysecretpassword"` * `config.dataStore.driver` - string, default: `"org.postgresql.Driver"` * `config.clusterStatsConfiguration.monitorType` - string, default: `"INFO_API"` +<<<<<<< HEAD * `command` - list, default: `["java","-XX:MinRAMPercentage=80.0","-XX:MaxRAMPercentage=80.0","-jar","/usr/lib/trino-gateway/gateway-ha-jar-with-dependencies.jar","/etc/trino-gateway/config.yaml"]` +======= +* `config.modules[0]` - string, default: `"io.trino.gateway.ha.module.HaGatewayProviderModule"` +* `config.modules[1]` - string, default: `"io.trino.gateway.ha.module.ClusterStateListenerModule"` +* `config.modules[2]` - string, default: `"io.trino.gateway.ha.module.ClusterStatsMonitorModule"` +* `config.managedApps[0]` - string, default: `"io.trino.gateway.ha.clustermonitor.ActiveClusterMonitor"` +* `command` - list, default: `["java","-XX:MinRAMPercentage=80.0","-XX:MaxRAMPercentage=80.0","-jar","/usr/lib/trino/gateway-ha-jar-with-dependencies.jar","/etc/gateway/config.yaml"]` +>>>>>>> 83d9fad (New squashed commit) Startup command for Trino Gateway process. Add additional Java options and other modifications as desired. * `service` - object, default: `{"ports":[{"name":"gateway","protocol":"TCP"}],"type":"ClusterIP"}` diff --git a/charts/gateway/templates/deployment.yaml b/charts/gateway/templates/deployment.yaml index 1273a916..6362f356 100644 --- a/charts/gateway/templates/deployment.yaml +++ b/charts/gateway/templates/deployment.yaml @@ -65,7 +65,11 @@ spec: {{- end }} livenessProbe: httpGet: +<<<<<<< HEAD path: /trino-gateway/livez +======= + path: /trino-gateway +>>>>>>> 83d9fad (New squashed commit) port: {{ $probePort }} scheme: {{ $probeScheme }} initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} @@ -74,7 +78,11 @@ spec: timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} readinessProbe: httpGet: +<<<<<<< HEAD path: /trino-gateway/readyz +======= + path: /trino-gateway +>>>>>>> 83d9fad (New squashed commit) port: {{ $probePort }} scheme: {{ $probeScheme }} initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} @@ -84,17 +92,28 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: +<<<<<<< HEAD - name: {{ include "trino-gateway.fullname" . }}-configuration mountPath: "/etc/trino-gateway/config.yaml" +======= + - name: trino-gateway-configuration + mountPath: "/etc/gateway/config.yaml" +>>>>>>> 83d9fad (New squashed commit) subPath: "config.yaml" readOnly: true {{- with .Values.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} volumes: +<<<<<<< HEAD - name: {{ include "trino-gateway.fullname" . }}-configuration secret: secretName: {{ include "trino-gateway.fullname" . }}-configuration +======= + - name: trino-gateway-configuration + secret: + secretName: trino-gateway-configuration +>>>>>>> 83d9fad (New squashed commit) optional: false {{- with .Values.volumes }} {{- toYaml . | nindent 8 }} diff --git a/charts/gateway/templates/secrets.yaml b/charts/gateway/templates/secrets.yaml index c3f6b330..caa2bbae 100644 --- a/charts/gateway/templates/secrets.yaml +++ b/charts/gateway/templates/secrets.yaml @@ -1,7 +1,11 @@ apiVersion: v1 kind: Secret metadata: +<<<<<<< HEAD name: {{ include "trino-gateway.fullname" . }}-configuration +======= + name: trino-gateway-configuration +>>>>>>> 83d9fad (New squashed commit) type: "Opaque" data: config.yaml: "{{toYaml .Values.config | b64enc}}" diff --git a/charts/gateway/templates/tests/test-connection.yaml b/charts/gateway/templates/tests/test-connection.yaml index 6130e220..17903a9c 100644 --- a/charts/gateway/templates/tests/test-connection.yaml +++ b/charts/gateway/templates/tests/test-connection.yaml @@ -9,6 +9,36 @@ metadata: annotations: "helm.sh/hook": test spec: +<<<<<<< HEAD +======= + initContainers: + - name: extract-persistence-sql + image: "trinodb/trino-gateway" + command: + - "/bin/sh" + - "-c" + - | + cd /etc/persistence && \ + jar -xvf /usr/lib/trino/gateway-ha-jar-with-dependencies.jar \ + gateway-ha-persistence-postgres.sql + volumeMounts: + - name: persistence-sql + mountPath: /etc/persistence + - name: initialize-db + image: bitnami/postgresql:17.1.0 + command: + - "/bin/sh" + - "-c" + - | + echo "Initialize gateway schema"; + PGPASSWORD=pass0000 psql \ + -h gateway-backend-db-postgresql.postgres-gateway.svc.cluster.local \ + -U gateway -d gateway \ + -f /etc/persistence/gateway-ha-persistence-postgres.sql + volumeMounts: + - name: persistence-sql + mountPath: /etc/persistence +>>>>>>> 83d9fad (New squashed commit) containers: - name: curl image: alpine diff --git a/charts/gateway/values.yaml b/charts/gateway/values.yaml index f434c517..2e2d7aea 100644 --- a/charts/gateway/values.yaml +++ b/charts/gateway/values.yaml @@ -43,6 +43,15 @@ config: driver: org.postgresql.Driver clusterStatsConfiguration: monitorType: INFO_API +<<<<<<< HEAD +======= + modules: + - io.trino.gateway.ha.module.HaGatewayProviderModule + - io.trino.gateway.ha.module.ClusterStateListenerModule + - io.trino.gateway.ha.module.ClusterStatsMonitorModule + managedApps: + - io.trino.gateway.ha.clustermonitor.ActiveClusterMonitor +>>>>>>> 83d9fad (New squashed commit) # -- Startup command for Trino Gateway process. Add additional Java options and other modifications as desired. command: @@ -50,8 +59,13 @@ command: - "-XX:MinRAMPercentage=80.0" - "-XX:MaxRAMPercentage=80.0" - "-jar" +<<<<<<< HEAD - "/usr/lib/trino-gateway/gateway-ha-jar-with-dependencies.jar" - "/etc/trino-gateway/config.yaml" +======= + - "/usr/lib/trino/gateway-ha-jar-with-dependencies.jar" + - "/etc/gateway/config.yaml" +>>>>>>> 83d9fad (New squashed commit) # -- Service for accessing the gateway. The contents of this dictionary are used # for the [service spec](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport). diff --git a/charts/trino/Chart.yaml b/charts/trino/Chart.yaml index ccfba056..3f3f1d86 100644 --- a/charts/trino/Chart.yaml +++ b/charts/trino/Chart.yaml @@ -15,13 +15,29 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) +<<<<<<< HEAD +<<<<<<< HEAD version: 1.38.0 +======= +version: 1.37.0 +>>>>>>> 83d9fad (New squashed commit) +======= +version: 0.2.0 +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. +<<<<<<< HEAD # Same value as in values.yml#image.tag +<<<<<<< HEAD appVersion: "474" +======= +appVersion: "470" +>>>>>>> 83d9fad (New squashed commit) +======= +appVersion: "355" +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) icon: https://trino.io/assets/trino.png diff --git a/charts/trino/README.md b/charts/trino/README.md index 88b390bf..878a7fa9 100644 --- a/charts/trino/README.md +++ b/charts/trino/README.md @@ -1,6 +1,10 @@ # trino +<<<<<<< HEAD ![Version: 1.38.0](https://img.shields.io/badge/Version-1.38.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 474](https://img.shields.io/badge/AppVersion-474-informational?style=flat-square) +======= +![Version: 1.37.0](https://img.shields.io/badge/Version-1.37.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 470](https://img.shields.io/badge/AppVersion-470-informational?style=flat-square) +>>>>>>> 83d9fad (New squashed commit) Fast distributed SQL query engine for big data analytics that helps you explore your data universe @@ -12,6 +16,7 @@ Fast distributed SQL query engine for big data analytics that helps you explore * ## Values +<<<<<<< HEAD * `nameOverride` - string, default: `nil` Override resource names to avoid name conflicts when deploying multiple releases in the same namespace. @@ -176,6 +181,8 @@ Fast distributed SQL query engine for big data analytics that helps you explore autoscaling.keda.sh/paused-replicas: "0" autoscaling.keda.sh/paused: "true" ``` +======= +>>>>>>> 83d9fad (New squashed commit) * `accessControl` - object, default: `{}` [System access control](https://trino.io/docs/current/security/built-in-system-access-control.html) configuration. @@ -241,6 +248,478 @@ Fast distributed SQL query engine for big data analytics that helps you explore ] } ``` +<<<<<<< HEAD +======= +* `additionalCatalogs` - object, default: `{}` + + Deprecated, use `catalogs` instead. Configure additional [catalogs](https://trino.io/docs/current/installation/deployment.html#catalog-properties). +* `additionalConfigProperties` - list, default: `[]` + + [Additional config properties](https://trino.io/docs/current/admin/properties.html). + Example: + ```yaml + - internal-communication.shared-secret=random-value-999 + - http-server.process-forwarded=true + ``` +* `additionalExchangeManagerProperties` - list, default: `[]` + + [Exchange manager properties](https://trino.io/docs/current/admin/fault-tolerant-execution.html#exchange-manager). + Example: + ```yaml + - exchange.s3.region=object-store-region + - exchange.s3.endpoint=your-object-store-endpoint + - exchange.s3.aws-access-key=your-access-key + - exchange.s3.aws-secret-key=your-secret-key + ``` +* `additionalLogProperties` - list, default: `[]` + + [Additional log properties](https://trino.io/docs/current/installation/deployment.html#log-levels). + Example: + ```yaml + - io.airlift=DEBUG + ``` +* `additionalNodeProperties` - list, default: `[]` + + [Additional node properties](https://trino.io/docs/current/installation/deployment.html#log-levels). + Example, assuming the NODE_ID environment variable has been set: + ```yaml + - node.id=${NODE_ID} + ``` +* `auth` - object, default: `{}` + + Available authentication methods. + Use username and password provided as a [password file](https://trino.io/docs/current/security/password-file.html#file-format): + ```yaml + passwordAuth: "username:encrypted-password-with-htpasswd" + ``` + Set the name of a secret containing this file in the password.db key + ```yaml + passwordAuthSecret: "trino-password-authentication" + ``` + Additionally, set [users' groups](https://trino.io/docs/current/security/group-file.html#file-format): + ```yaml + refreshPeriod: 5s + groups: "group_name:user_1,user_2,user_3" + ``` + Set the name of a secret containing this file in the group.db key + ```yaml + groupAuthSecret: "trino-group-authentication" + ``` +* `catalogs` - object, default: `{"tpcds":"connector.name=tpcds\ntpcds.splits-per-node=4\n","tpch":"connector.name=tpch\ntpch.splits-per-node=4\n"}` + + Configure [catalogs](https://trino.io/docs/current/installation/deployment.html#catalog-properties). + Example: + ```yaml + objectstore: | + connector.name=iceberg + iceberg.catalog.type=glue + jmx: | + connector.name=memory + memory: | + connector.name=memory + memory.max-data-per-node=128MB + ``` +* `catalogsSecrets` - list, default: `[]` +* `commonLabels` - object, default: `{}` + + Labels that get applied to every resource's metadata +* `configMounts` - list, default: `[]` + + Allows mounting additional Trino configuration files from Kubernetes config maps on all nodes. + Example: + ```yaml + - name: sample-config-mount + configMap: sample-config-map + path: /config-map/sample.json + subPath: sample.json + ``` +* `containerSecurityContext` - object, default: `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]}}` + + [Container security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) configuration. +* `containerSecurityContext.allowPrivilegeEscalation` - bool, default: `false` + + Control whether a process can gain more privileges than its parent process. +* `containerSecurityContext.capabilities.drop` - list, default: `["ALL"]` + + A list of the Linux kernel capabilities that are dropped from every container. Valid values are listed in [the capabilities manual page](https://man7.org/linux/man-pages/man7/capabilities.7.html). Ensure # to remove the "CAP_" prefix which the kernel attaches to the names of permissions. +* `coordinator.additionalConfigFiles` - object, default: `{}` + + Additional config files placed in the default configuration directory. Supports templating the files' contents with `tpl`. + Example: + ```yaml + secret.txt: | + secret-value={{- .Values.someValue }} + ``` +* `coordinator.additionalExposedPorts` - object, default: `{}` + + Additional ports configured in the coordinator container and the service. + Example: + ```yaml + https: + servicePort: 8443 + name: https + port: 8443 + nodePort: 30443 + protocol: TCP + ``` +* `coordinator.additionalJVMConfig` - list, default: `[]` +* `coordinator.additionalVolumeMounts` - list, default: `[]` + + One or more additional volume mounts to add to the coordinator. + Example: + - name: extras + mountPath: /usr/share/extras + readOnly: true +* `coordinator.additionalVolumes` - list, default: `[]` + + One or more additional volumes to add to the coordinator. + Example: + ```yaml + - name: extras + emptyDir: {} + ``` +* `coordinator.affinity` - object, default: `{}` +* `coordinator.annotations` - object, default: `{}` +* `coordinator.config.memory.heapHeadroomPerNode` - string, default: `""` +* `coordinator.config.nodeScheduler.includeCoordinator` - bool, default: `false` + + Allows scheduling work on the coordinator so that a single machine can function as both coordinator and worker. For large clusters, processing work on the coordinator can negatively impact query performance because the machine's resources are not available for the critical coordinator tasks of scheduling, managing, and monitoring query execution. +* `coordinator.config.query.maxMemoryPerNode` - string, default: `"1GB"` +* `coordinator.configMounts` - list, default: `[]` + + Allows mounting additional Trino configuration files from Kubernetes config maps on the coordinator node. + Example: + ```yaml + - name: sample-config-mount + configMap: sample-config-mount + path: /config-mount/sample.json + subPath: sample.json + ``` +* `coordinator.deployment.annotations` - object, default: `{}` +* `coordinator.deployment.progressDeadlineSeconds` - int, default: `600` + + The maximum time in seconds for a deployment to make progress before it is considered failed. The deployment controller continues to process failed deployments and a condition with a ProgressDeadlineExceeded reason is surfaced in the deployment status. +* `coordinator.deployment.revisionHistoryLimit` - int, default: `10` + + The number of old ReplicaSets to retain to allow rollback. +* `coordinator.deployment.strategy` - object, default: `{"rollingUpdate":{"maxSurge":"25%","maxUnavailable":"25%"},"type":"RollingUpdate"}` + + The deployment strategy to use to replace existing pods with new ones. +* `coordinator.jvm.gcMethod.g1.heapRegionSize` - string, default: `"32M"` +* `coordinator.jvm.gcMethod.type` - string, default: `"UseG1GC"` +* `coordinator.jvm.maxHeapSize` - string, default: `"8G"` +* `coordinator.labels` - object, default: `{}` +* `coordinator.lifecycle` - object, default: `{}` + + Coordinator container [lifecycle events](https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/) + Example: + ```yaml + preStop: + exec: + command: ["/bin/sh", "-c", "sleep 120"] + ``` +* `coordinator.livenessProbe` - object, default: `{}` + + [Liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) options + Example: + ```yaml + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 6 + successThreshold: 1 + ``` +* `coordinator.nodeSelector` - object, default: `{}` +* `coordinator.readinessProbe` - object, default: `{}` + + [Readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) + Example: + ```yaml + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 6 + successThreshold: 1 + ``` +* `coordinator.resources` - object, default: `{}` + + It is recommended not to specify default resources and to leave this as a conscious choice for the user. This also increases chances charts run on environments with little resources, such as Minikube. If you do want to specify resources, use the following example, and adjust it as necessary. + Example: + ```yaml + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 100m + memory: 128Mi + ``` +* `coordinator.secretMounts` - list, default: `[]` + + Allows mounting additional Trino configuration files from Kubernetes secrets on the coordinator node. + Example: + ```yaml + - name: sample-secret + secretName: sample-secret + path: /secrets/sample.json + subPath: sample.json + ``` +* `coordinator.terminationGracePeriodSeconds` - int, default: `30` +* `coordinator.tolerations` - list, default: `[]` +* `coordinatorNameOverride` - string, default: `nil` +* `env` - list, default: `[]` + + additional environment variables added to every pod, specified as a list with explicit values + Example: + ```yaml + - name: NAME + value: "value" + ``` +* `envFrom` - list, default: `[]` + + additional environment variables added to every pod, specified as a list of either `ConfigMap` or `Secret` references + Example: + ```yaml + - secretRef: + name: extra-secret + ``` +* `eventListenerProperties` - list, default: `[]` + + [Event listener](https://trino.io/docs/current/develop/event-listener.html#event-listener) properties. To configure multiple event listeners, add them in `coordinator.additionalConfigFiles` and `worker.additionalConfigFiles`, and set the `event-listener.config-files` property in `additionalConfigProperties` to their locations. + Example: + ```yaml + - event-listener.name=custom-event-listener + - custom-property1=custom-value1 + - custom-property2=custom-value2 + ``` +* `image.digest` - string, default: `""` + + Optional digest value of the image specified as `sha256:abcd...`. A specified value overrides `tag`. +* `image.pullPolicy` - string, default: `"IfNotPresent"` +* `image.registry` - string, default: `""` + + Image registry, defaults to empty, which results in DockerHub usage +* `image.repository` - string, default: `"trinodb/trino"` + + Repository location of the Trino image, typically `organization/imagename` +* `image.tag` - string, default: `""` + + Image tag, defaults to the Trino release version specified as `appVersion` from Chart.yaml +* `image.useRepositoryAsSoleImageReference` - bool, default: `false` + + When true, only the content in `repository` is used as image reference +* `imagePullSecrets` - list, default: `[]` + + An optional list of references to secrets in the same namespace to use for pulling images. + Example: + ```yaml + imagePullSecrets: + - name: registry-credentials + ``` +* `ingress.annotations` - object, default: `{}` +* `ingress.className` - string, default: `""` +* `ingress.enabled` - bool, default: `false` +* `ingress.hosts` - list, default: `[]` + + [Ingress rules](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-rules). + Example: + ```yaml + - host: trino.example.com + paths: + - path: / + pathType: ImplementationSpecific + ``` +* `ingress.tls` - list, default: `[]` + + Ingress [TLS](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls) configuration. + Example: + ```yaml + - secretName: chart-example-tls + hosts: + - chart-example.local + ``` +* `initContainers` - object, default: `{}` + + Additional [containers that run to completion](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) during pod initialization. + Example: + ```yaml + coordinator: + - name: init-coordinator + image: busybox:1.28 + imagePullPolicy: IfNotPresent + command: ['sh', '-c', "until nslookup myservice.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done"] + worker: + - name: init-worker + image: busybox:1.28 + command: ['sh', '-c', 'echo The worker is running! && sleep 3600'] + ``` +* `jmx.coordinator` - object, default: `{}` + + Override JMX configurations for the Trino coordinator. + Example + ```yaml + coordinator: + enabled: true + exporter: + enabled: true + configProperties: |- + hostPort: localhost:{{- .Values.jmx.registryPort }} + startDelaySeconds: 0 + ssl: false + ``` +* `jmx.enabled` - bool, default: `false` + + Set to true to enable the RMI server to expose Trino's [JMX metrics](https://trino.io/docs/current/admin/jmx.html). +* `jmx.exporter.configProperties` - string, default: `""` + + The string value is templated using `tpl`. The JMX config properties file is mounted to `/etc/jmx-exporter/jmx-exporter-config.yaml`. + Example: + ```yaml + configProperties: |- + hostPort: localhost:{{- .Values.jmx.registryPort }} + startDelaySeconds: 0 + ssl: false + lowercaseOutputName: false + lowercaseOutputLabelNames: false + includeObjectNames: ["java.lang:type=Threading"] + autoExcludeObjectNameAttributes: true + excludeObjectNameAttributes: + "java.lang:type=OperatingSystem": + - "ObjectName" + "java.lang:type=Runtime": + - "ClassPath" + - "SystemProperties" + rules: + - pattern: 'java\.lang<(.*)>ThreadCount: (.*)' + name: java_lang_Threading_ThreadCount + value: '$2' + help: 'ThreadCount (java.lang<>ThreadCount)' + type: UNTYPED + ``` +* `jmx.exporter.enabled` - bool, default: `false` + + Set to true to export JMX Metrics via HTTP for [Prometheus](https://github.com/prometheus/jmx_exporter) consumption +* `jmx.exporter.image` - string, default: `"bitnami/jmx-exporter:1.0.1"` +* `jmx.exporter.port` - int, default: `5556` +* `jmx.exporter.pullPolicy` - string, default: `"Always"` +* `jmx.exporter.resources` - object, default: `{}` + + It is recommended not to specify default resources and to leave this as a conscious choice for the user. This also increases chances charts run on environments with little resources, such as Minikube. If you do want to specify resources, use the following example, and adjust it as necessary. + Example: + ```yaml + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 100m + memory: 128Mi + ``` +* `jmx.exporter.securityContext` - object, default: `{}` +* `jmx.registryPort` - int, default: `9080` +* `jmx.serverPort` - int, default: `9081` +* `jmx.worker` - object, default: `{}` + + Override JMX configurations for the Trino workers. + Example + ```yaml + worker: + enabled: true + exporter: + enabled: true + ``` +* `kafka.mountPath` - string, default: `"/etc/trino/schemas"` +* `kafka.tableDescriptions` - object, default: `{}` + + Custom kafka table descriptions that will be mounted in mountPath. + Example: + ```yaml + testschema.json: |- + { + "tableName": "testtable", + "schemaName": "testschema", + "topicName": "testtopic", + "key": { + "dataFormat": "json", + "fields": [ + { + "name": "_key", + "dataFormat": "VARCHAR", + "type": "VARCHAR", + "hidden": "false" + } + ] + }, + "message": { + "dataFormat": "json", + "fields": [ + { + "name": "id", + "mapping": "id", + "type": "BIGINT" + }, + { + "name": "test_field", + "mapping": "test_field", + "type": "VARCHAR" + } + ] + } + } + ``` +* `ldapSecrets` - list, default: `[]` +* `nameOverride` - string, default: `nil` + + Override resource names to avoid name conflicts when deploying multiple releases in the same namespace. + Example: + ```yaml + coordinatorNameOverride: trino-coordinator-adhoc + workerNameOverride: trino-worker-adhoc + nameOverride: trino-adhoc + ``` +* `networkPolicy.egress` - list, default: `[]` + + Egress rules to apply to the Trino pods. + Example: + ```yaml + - to: + - podSelector: + matchLabels: + role: log-ingestor + ports: + - protocol: TCP + port: 9999 + ``` +* `networkPolicy.enabled` - bool, default: `false` + + Set to true to enable Trino pod protection with a [NetworkPolicy](https://kubernetes.io/docs/concepts/services-networking/network-policies/). By default, the NetworkPolicy will only allow Trino pods to communicate with each other. + > [!NOTE] + > - NetworkPolicies cannot block the ingress traffic coming directly + > from the Kubernetes node on which the Pod is running, + > and are thus incompatible with services of type `NodePort`. + > - When using NetworkPolicies together with JMX metrics export, + > additional ingress rules might be required to allow metric scraping. +* `networkPolicy.ingress` - list, default: `[]` + + Additional ingress rules to apply to the Trino pods. + Example: + ```yaml + - from: + - ipBlock: + cidr: 172.17.0.0/16 + except: + - 172.17.1.0/24 + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: prometheus + - podSelector: + matchLabels: + role: backend-app + ports: + - protocol: TCP + port: 8080 + - protocol: TCP + port: 5556 + ``` +>>>>>>> 83d9fad (New squashed commit) * `resourceGroups` - object, default: `{}` [Resource groups control](https://trino.io/docs/current/admin/resource-groups.html) @@ -317,95 +796,291 @@ Fast distributed SQL query engine for big data analytics that helps you explore ] } ``` +<<<<<<< HEAD * `additionalNodeProperties` - list, default: `[]` - [Additional node properties](https://trino.io/docs/current/installation/deployment.html#log-levels). - Example, assuming the NODE_ID environment variable has been set: - ```yaml - - node.id=${NODE_ID} - ``` -* `additionalConfigProperties` - list, default: `[]` + [Additional node properties](https://trino.io/docs/current/installation/deployment.html#log-levels). + Example, assuming the NODE_ID environment variable has been set: + ```yaml + - node.id=${NODE_ID} + ``` +* `additionalConfigProperties` - list, default: `[]` + + [Additional config properties](https://trino.io/docs/current/admin/properties.html). + Example: + ```yaml + - internal-communication.shared-secret=random-value-999 + - http-server.process-forwarded=true + ``` +* `additionalLogProperties` - list, default: `[]` + + [Additional log properties](https://trino.io/docs/current/installation/deployment.html#log-levels). + Example: + ```yaml + - io.airlift=DEBUG + ``` +* `additionalExchangeManagerProperties` - list, default: `[]` + + [Exchange manager properties](https://trino.io/docs/current/admin/fault-tolerant-execution.html#exchange-manager). + Example: + ```yaml + - exchange.s3.region=object-store-region + - exchange.s3.endpoint=your-object-store-endpoint + - exchange.s3.aws-access-key=your-access-key + - exchange.s3.aws-secret-key=your-secret-key + ``` +* `eventListenerProperties` - list, default: `[]` + + [Event listener](https://trino.io/docs/current/develop/event-listener.html#event-listener) properties. To configure multiple event listeners, add them in `coordinator.additionalConfigFiles` and `worker.additionalConfigFiles`, and set the `event-listener.config-files` property in `additionalConfigProperties` to their locations. + Example: + ```yaml + - event-listener.name=custom-event-listener + - custom-property1=custom-value1 + - custom-property2=custom-value2 + ``` +* `catalogs` - object, default: `{"tpcds":"connector.name=tpcds\ntpcds.splits-per-node=4\n","tpch":"connector.name=tpch\ntpch.splits-per-node=4\n"}` + + Configure [catalogs](https://trino.io/docs/current/installation/deployment.html#catalog-properties). + Example: + ```yaml + objectstore: | + connector.name=iceberg + iceberg.catalog.type=glue + jmx: | + connector.name=memory + memory: | + connector.name=memory + memory.max-data-per-node=128MB + ``` +* `additionalCatalogs` - object, default: `{}` + + Deprecated, use `catalogs` instead. Configure additional [catalogs](https://trino.io/docs/current/installation/deployment.html#catalog-properties). +* `env` - list, default: `[]` + + additional environment variables added to every pod, specified as a list with explicit values + Example: + ```yaml + - name: NAME + value: "value" + ``` +* `envFrom` - list, default: `[]` + + additional environment variables added to every pod, specified as a list of either `ConfigMap` or `Secret` references + Example: + ```yaml + - secretRef: + name: extra-secret + ``` +* `initContainers` - object, default: `{}` + + Additional [containers that run to completion](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) during pod initialization. + Example: + ```yaml + coordinator: + - name: init-coordinator + image: busybox:1.28 + imagePullPolicy: IfNotPresent + command: ['sh', '-c', "until nslookup myservice.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done"] + worker: + - name: init-worker + image: busybox:1.28 + command: ['sh', '-c', 'echo The worker is running! && sleep 3600'] + ``` +======= +* `secretMounts` - list, default: `[]` + + Allows mounting additional Trino configuration files from Kubernetes secrets on all nodes. + Example: + ```yaml + - name: sample-secret + secretName: sample-secret + path: /secrets/sample.json + subPath: sample.json + - name: catalogs + secretName: catalogs + path: /etc/trino/catalog + - name: ldap + secretName: ldap + path: /etc/trino/ldap + ``` +* `securityContext` - object, default: `{"runAsGroup":1000,"runAsUser":1000}` + + [Pod security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) configuration. To remove the default, set it to null (or `~`). +* `server.autoscaling` - object, default: `{"behavior":{},"enabled":false,"maxReplicas":5,"targetCPUUtilizationPercentage":50,"targetMemoryUtilizationPercentage":80}` + + Configure [Horizontal Pod Autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) for workers (`server.keda.enabled` must be `false`). +* `server.autoscaling.behavior` - object, default: `{}` + + Configuration for scaling up and down. + Example: + ```yaml + scaleDown: + stabilizationWindowSeconds: 300 + policies: + - type: Percent + value: 100 + periodSeconds: 15 + scaleUp: + stabilizationWindowSeconds: 0 + policies: + - type: Percent + value: 100 + periodSeconds: 15 + - type: Pods + value: 4 + periodSeconds: 15 + selectPolicy: Max + ``` +* `server.autoscaling.targetCPUUtilizationPercentage` - int, default: `50` + + Target average CPU utilization, represented as a percentage of requested CPU. To disable scaling based on CPU, set to an empty string. +* `server.autoscaling.targetMemoryUtilizationPercentage` - int, default: `80` + + Target average memory utilization, represented as a percentage of requested memory. To disable scaling based on memory, set to an empty string. +* `server.config.authenticationType` - string, default: `""` + + Trino supports multiple [authentication types](https://trino.io/docs/current/security/authentication-types.html): PASSWORD, CERTIFICATE, OAUTH2, JWT, KERBEROS. +* `server.config.https.enabled` - bool, default: `false` +* `server.config.https.keystore.path` - string, default: `""` +* `server.config.https.port` - int, default: `8443` +* `server.config.path` - string, default: `"/etc/trino"` +* `server.config.query.maxMemory` - string, default: `"4GB"` +* `server.coordinatorExtraConfig` - string, default: `""` +* `server.exchangeManager` - object, default: `{}` - [Additional config properties](https://trino.io/docs/current/admin/properties.html). + Mandatory [exchange manager configuration](https://trino.io/docs/current/admin/fault-tolerant-execution.html#id1). Used to set the name and location(s) of spooling data storage. For multiple destinations use a list or a comma separated URI locations. To enable fault-tolerant execution, set the `retry-policy` property in `additionalConfigProperties`. Additional exchange manager configurations can be added to `additionalExchangeManagerProperties`. Example: ```yaml - - internal-communication.shared-secret=random-value-999 - - http-server.process-forwarded=true + server: + exchangeManager: + name: "filesystem" + baseDir: + - "/tmp/trino-local-file-system-exchange-manager" + additionalConfigProperties: + - retry-policy=TASK + additionalExchangeManagerProperties: + - exchange.sink-buffer-pool-min-size=10 + - exchange.sink-buffers-per-partition=2 + - exchange.source-concurrent-readers=4 ``` -* `additionalLogProperties` - list, default: `[]` +* `server.keda` - object, default: `{"advanced":{},"annotations":{},"cooldownPeriod":300,"enabled":false,"fallback":{},"initialCooldownPeriod":0,"maxReplicaCount":5,"minReplicaCount":0,"pollingInterval":30,"triggers":[]}` - [Additional log properties](https://trino.io/docs/current/installation/deployment.html#log-levels). - Example: - ```yaml - - io.airlift=DEBUG - ``` -* `additionalExchangeManagerProperties` - list, default: `[]` + Configure [Kubernetes Event-driven Autoscaling](https://keda.sh/) for workers (`server.autoscaling.enabled` must be `false`). +* `server.keda.advanced` - object, default: `{}` - [Exchange manager properties](https://trino.io/docs/current/admin/fault-tolerant-execution.html#exchange-manager). + Specifies HPA related options Example: ```yaml - - exchange.s3.region=object-store-region - - exchange.s3.endpoint=your-object-store-endpoint - - exchange.s3.aws-access-key=your-access-key - - exchange.s3.aws-secret-key=your-secret-key + advanced: + horizontalPodAutoscalerConfig: + behavior: + scaleDown: + stabilizationWindowSeconds: 300 + policies: + - type: Percent + value: 100 + periodSeconds: 15 ``` -* `eventListenerProperties` - list, default: `[]` +* `server.keda.annotations` - object, default: `{}` - [Event listener](https://trino.io/docs/current/develop/event-listener.html#event-listener) properties. To configure multiple event listeners, add them in `coordinator.additionalConfigFiles` and `worker.additionalConfigFiles`, and set the `event-listener.config-files` property in `additionalConfigProperties` to their locations. + Annotations to apply to the ScaledObject CRD. Example: ```yaml - - event-listener.name=custom-event-listener - - custom-property1=custom-value1 - - custom-property2=custom-value2 + annotations: + autoscaling.keda.sh/paused-replicas: "0" + autoscaling.keda.sh/paused: "true" ``` -* `catalogs` - object, default: `{"tpcds":"connector.name=tpcds\ntpcds.splits-per-node=4\n","tpch":"connector.name=tpch\ntpch.splits-per-node=4\n"}` +* `server.keda.cooldownPeriod` - int, default: `300` - Configure [catalogs](https://trino.io/docs/current/installation/deployment.html#catalog-properties). + Period (in seconds) to wait after the last trigger reported active before scaling the resource back to 0 +* `server.keda.fallback` - object, default: `{}` + + Defines a number of replicas to fall back to if a scaler is in an error state. Example: ```yaml - objectstore: | - connector.name=iceberg - iceberg.catalog.type=glue - jmx: | - connector.name=memory - memory: | - connector.name=memory - memory.max-data-per-node=128MB + fallback: # Optional. Section to specify fallback options + failureThreshold: 3 # Mandatory if fallback section is included + replicas: 6 # Mandatory if fallback section is included ``` -* `additionalCatalogs` - object, default: `{}` +* `server.keda.initialCooldownPeriod` - int, default: `0` - Deprecated, use `catalogs` instead. Configure additional [catalogs](https://trino.io/docs/current/installation/deployment.html#catalog-properties). -* `env` - list, default: `[]` + The delay (in seconds) before the `cooldownPeriod` starts after the initial creation of the `ScaledObject`. +* `server.keda.maxReplicaCount` - int, default: `5` - additional environment variables added to every pod, specified as a list with explicit values + This setting is passed to the HPA definition that KEDA will create for a given resource and holds the maximum number of replicas of the target resource. +* `server.keda.minReplicaCount` - int, default: `0` + + Minimum number of replicas KEDA will scale the resource down to. By default, it’s scale to zero, but you can use it with some other value as well. +* `server.keda.triggers` - list, default: `[]` + + List of triggers to activate scaling of the target resource Example: ```yaml - - name: NAME - value: "value" + triggers: + - type: prometheus + metricType: Value + metadata: + serverAddress: "http://prometheus.example.com" + threshold: "1" + metricName: required_workers + query: >- + sum by (service) + (avg_over_time(trino_execution_ClusterSizeMonitor_RequiredWorkers{service={{ include "trino.fullname" . | quote }}}[5s])) ``` -* `envFrom` - list, default: `[]` +* `server.log.trino.level` - string, default: `"INFO"` +* `server.node.dataDir` - string, default: `"/data/trino"` +* `server.node.environment` - string, default: `"production"` +* `server.node.pluginDir` - string, default: `"/usr/lib/trino/plugin"` +* `server.workerExtraConfig` - string, default: `""` +* `server.workers` - int, default: `2` +* `service.annotations` - object, default: `{}` +* `service.nodePort` - string, default: `""` - additional environment variables added to every pod, specified as a list of either `ConfigMap` or `Secret` references - Example: + The port the service listens on the host, for the `NodePort` type. If not set, Kubernetes will [allocate a port automatically](https://kubernetes.io/docs/concepts/services-networking/service/#nodeport-custom-port). +* `service.port` - int, default: `8080` +* `service.type` - string, default: `"ClusterIP"` +* `serviceAccount.annotations` - object, default: `{}` + + Annotations to add to the service account +* `serviceAccount.create` - bool, default: `false` + + Specifies whether a service account should be created +* `serviceAccount.name` - string, default: `""` + + The name of the service account to use. If not set and create is true, a name is generated using the fullname template +* `serviceMonitor.apiVersion` - string, default: `"monitoring.coreos.com/v1"` +* `serviceMonitor.coordinator` - object, default: `{}` + + Override ServiceMonitor configurations for the Trino coordinator. + Example ```yaml - - secretRef: - name: extra-secret + coordinator: + enabled: true + labels: + prometheus: my-prometheus ``` -* `initContainers` - object, default: `{}` +* `serviceMonitor.enabled` - bool, default: `false` - Additional [containers that run to completion](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) during pod initialization. - Example: + Set to true to create resources for the [prometheus-operator](https://github.com/prometheus-operator/prometheus-operator). +* `serviceMonitor.interval` - string, default: `"30s"` + + The serviceMonitor web endpoint interval +* `serviceMonitor.labels` - object, default: `{"prometheus":"kube-prometheus"}` + + Labels for serviceMonitor, so that Prometheus can select it +* `serviceMonitor.worker` - object, default: `{}` + + Override ServiceMonitor configurations for the Trino workers. + Example ```yaml - coordinator: - - name: init-coordinator - image: busybox:1.28 - imagePullPolicy: IfNotPresent - command: ['sh', '-c', "until nslookup myservice.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done"] - worker: - - name: init-worker - image: busybox:1.28 - command: ['sh', '-c', 'echo The worker is running! && sleep 3600'] + worker: + enabled: true + labels: + prometheus: my-prometheus ``` +* `shareProcessNamespace.coordinator` - bool, default: `false` +* `shareProcessNamespace.worker` - bool, default: `false` +>>>>>>> 83d9fad (New squashed commit) * `sidecarContainers` - object, default: `{}` Additional [containers that starts before](https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/) the Trino container and continues to run. @@ -422,6 +1097,7 @@ Fast distributed SQL query engine for big data analytics that helps you explore imagePullPolicy: IfNotPresent command: ['sleep', '1'] ``` +<<<<<<< HEAD * `securityContext` - object, default: `{"runAsGroup":1000,"runAsUser":1000}` [Pod security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) configuration. To remove the default, set it to null (or `~`). @@ -570,6 +1246,9 @@ Fast distributed SQL query engine for big data analytics that helps you explore * `coordinator.tolerations` - list, default: `[]` * `coordinator.affinity` - object, default: `{}` * `coordinator.additionalConfigFiles` - object, default: `{}` +======= +* `worker.additionalConfigFiles` - object, default: `{}` +>>>>>>> 83d9fad (New squashed commit) Additional config files placed in the default configuration directory. Supports templating the files' contents with `tpl`. Example: @@ -577,14 +1256,42 @@ Fast distributed SQL query engine for big data analytics that helps you explore secret.txt: | secret-value={{- .Values.someValue }} ``` +<<<<<<< HEAD * `coordinator.additionalVolumes` - list, default: `[]` One or more additional volumes to add to the coordinator. +======= +* `worker.additionalExposedPorts` - object, default: `{}` + + Additional container ports configured in all worker pods. + Example: + ```yaml + https: + servicePort: 8443 + name: https + port: 8443 + protocol: TCP + ``` +* `worker.additionalJVMConfig` - list, default: `[]` +* `worker.additionalVolumeMounts` - list, default: `[]` + + One or more additional volume mounts to add to all workers. + Example: + ```yaml + - name: extras + mountPath: /usr/share/extras + readOnly: true + ``` +* `worker.additionalVolumes` - list, default: `[]` + + One or more additional volume mounts to add to all workers. +>>>>>>> 83d9fad (New squashed commit) Example: ```yaml - name: extras emptyDir: {} ``` +<<<<<<< HEAD * `coordinator.additionalVolumeMounts` - list, default: `[]` One or more additional volume mounts to add to the coordinator. @@ -613,6 +1320,21 @@ Fast distributed SQL query engine for big data analytics that helps you explore secretName: sample-secret path: /secrets/sample.json subPath: sample.json +======= +* `worker.affinity` - object, default: `{}` +* `worker.annotations` - object, default: `{}` +* `worker.config.memory.heapHeadroomPerNode` - string, default: `""` +* `worker.config.query.maxMemoryPerNode` - string, default: `"1GB"` +* `worker.configMounts` - list, default: `[]` + + Allows mounting additional Trino configuration files from Kubernetes config maps on all worker nodes. + Example: + ```yaml + - name: sample-config-mount + configMap: sample-config-mount + path: /config-mount/sample.json + subPath: sample.json +>>>>>>> 83d9fad (New squashed commit) ``` * `worker.deployment.annotations` - object, default: `{}` * `worker.deployment.progressDeadlineSeconds` - int, default: `600` @@ -624,6 +1346,7 @@ Fast distributed SQL query engine for big data analytics that helps you explore * `worker.deployment.strategy` - object, default: `{"rollingUpdate":{"maxSurge":"25%","maxUnavailable":"25%"},"type":"RollingUpdate"}` The deployment strategy to use to replace existing pods with new ones. +<<<<<<< HEAD * `worker.jvm.maxHeapSize` - string, default: `"8G"` * `worker.jvm.gcMethod.type` - string, default: `"UseG1GC"` * `worker.jvm.gcMethod.g1.heapRegionSize` - string, default: `"32M"` @@ -640,6 +1363,52 @@ Fast distributed SQL query engine for big data analytics that helps you explore name: https port: 8443 protocol: TCP +======= +* `worker.gracefulShutdown` - object, default: `{"enabled":false,"gracePeriodSeconds":120}` + + Configure [graceful shutdown](https://trino.io/docs/current/admin/graceful-shutdown.html) in order to ensure that workers terminate without affecting running queries, given a sufficient grace period. When enabled, the value of `worker.terminationGracePeriodSeconds` must be at least two times greater than the configured `gracePeriodSeconds`. Enabling `worker.gracefulShutdown` conflicts with `worker.lifecycle`. When a custom `worker.lifecycle` configuration needs to be used, graceful shutdown must be configured manually. + Example: + ```yaml + gracefulShutdown: + enabled: true + gracePeriodSeconds: 120 + ``` +* `worker.jvm.gcMethod.g1.heapRegionSize` - string, default: `"32M"` +* `worker.jvm.gcMethod.type` - string, default: `"UseG1GC"` +* `worker.jvm.maxHeapSize` - string, default: `"8G"` +* `worker.labels` - object, default: `{}` +* `worker.lifecycle` - object, default: `{}` + + Worker container [lifecycle events](https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/) Setting `worker.lifecycle` conflicts with `worker.gracefulShutdown`. + Example: + ```yaml + preStop: + exec: + command: ["/bin/sh", "-c", "sleep 120"] + ``` +* `worker.livenessProbe` - object, default: `{}` + + [Liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) + Example: + ```yaml + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 6 + successThreshold: 1 + ``` +* `worker.nodeSelector` - object, default: `{}` +* `worker.readinessProbe` - object, default: `{}` + + [Readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) + Example: + ```yaml + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 6 + successThreshold: 1 +>>>>>>> 83d9fad (New squashed commit) ``` * `worker.resources` - object, default: `{}` @@ -653,6 +1422,7 @@ Fast distributed SQL query engine for big data analytics that helps you explore cpu: 100m memory: 128Mi ``` +<<<<<<< HEAD * `worker.livenessProbe` - object, default: `{}` [Liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) @@ -734,6 +1504,8 @@ Fast distributed SQL query engine for big data analytics that helps you explore path: /config-mount/sample.json subPath: sample.json ``` +======= +>>>>>>> 83d9fad (New squashed commit) * `worker.secretMounts` - list, default: `[]` Allows mounting additional Trino configuration files from Kubernetes secrets on all worker nodes. @@ -744,6 +1516,7 @@ Fast distributed SQL query engine for big data analytics that helps you explore path: /secrets/sample.json subPath: sample.json ``` +<<<<<<< HEAD * `kafka.mountPath` - string, default: `"/etc/trino/schemas"` * `kafka.tableDescriptions` - object, default: `{}` @@ -956,6 +1729,11 @@ Fast distributed SQL query engine for big data analytics that helps you explore - protocol: TCP port: 9999 ``` +======= +* `worker.terminationGracePeriodSeconds` - int, default: `30` +* `worker.tolerations` - list, default: `[]` +* `workerNameOverride` - string, default: `nil` +>>>>>>> 83d9fad (New squashed commit) ---------------------------------------------- Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) diff --git a/charts/trino/cenko.yaml b/charts/trino/cenko.yaml new file mode 100644 index 00000000..9ad9c742 --- /dev/null +++ b/charts/trino/cenko.yaml @@ -0,0 +1,425 @@ +--- +# Source: trino/templates/secret.yaml +--- +apiVersion: v1 +kind: Secret +metadata: + name: "catalogs" +data: + mariadb.properties: + Y29ubmVjdG9yLm5hbWU9bWFyaWFkYgpjb25uZWN0aW9uLXVzZXI9CmNvbm5lY3Rpb24tdXJsPQpjb25uZWN0aW9uLXBhc3N3b3JkPQo= + postgresql.properties: + Y29ubmVjdG9yLm5hbWU9cG9zdGdyZXNxbApjb25uZWN0aW9uLXVzZXI9CmNvbm5lY3Rpb24tdXJsPQpwb3N0Z3Jlc3FsLmFycmF5LW1hcHBpbmc9CmNvbm5lY3Rpb24tcGFzc3dvcmQ9Cg== +type: Opaque +--- +# Source: trino/templates/configmap-coordinator.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: release-name-trino-coordinator + namespace: default + labels: + helm.sh/chart: trino-1.37.0 + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/version: "470" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: coordinator +data: + node.properties: | + node.environment=production + node.data-dir=/data/trino + plugin.dir=/usr/lib/trino/plugin + + jvm.config: | + -server + -agentpath:/usr/lib/trino/bin/libjvmkill.so + -Xmx8G + -XX:+UseG1GC + -XX:G1HeapRegionSize=32M + -XX:+ExplicitGCInvokesConcurrent + -XX:+HeapDumpOnOutOfMemoryError + -XX:+ExitOnOutOfMemoryError + -XX:-OmitStackTraceInFastThrow + -XX:ReservedCodeCacheSize=512M + -XX:PerMethodRecompilationCutoff=10000 + -XX:PerBytecodeRecompilationCutoff=10000 + -Djdk.attach.allowAttachSelf=true + -Djdk.nio.maxCachedBufferSize=2000000 + # Allow loading dynamic agent used by JOL + -XX:+EnableDynamicAgentLoading + + # https://bugs.openjdk.org/browse/JDK-8329528 + -XX:+UnlockDiagnosticVMOptions + -XX:G1NumCollectionsKeepPinned=10000000 + + config.properties: | + coordinator=true + node-scheduler.include-coordinator=false + http-server.http.port=8080 + query.max-memory=4GB + query.max-memory-per-node=1GB + discovery.uri=http://localhost:8080 + + log.properties: | + io.trino=INFO +--- +# Source: trino/templates/configmap-coordinator.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: release-name-trino-schemas-volume-coordinator + namespace: default + labels: + helm.sh/chart: trino-1.37.0 + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/version: "470" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: coordinator +data: +--- +# Source: trino/templates/configmap-worker.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: release-name-trino-worker + namespace: default + labels: + helm.sh/chart: trino-1.37.0 + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/version: "470" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: worker +data: + node.properties: | + node.environment=production + node.data-dir=/data/trino + plugin.dir=/usr/lib/trino/plugin + + jvm.config: | + -server + -agentpath:/usr/lib/trino/bin/libjvmkill.so + -Xmx8G + -XX:+UseG1GC + -XX:G1HeapRegionSize=32M + -XX:+ExplicitGCInvokesConcurrent + -XX:+HeapDumpOnOutOfMemoryError + -XX:+ExitOnOutOfMemoryError + -XX:-OmitStackTraceInFastThrow + -XX:ReservedCodeCacheSize=512M + -XX:PerMethodRecompilationCutoff=10000 + -XX:PerBytecodeRecompilationCutoff=10000 + -Djdk.attach.allowAttachSelf=true + -Djdk.nio.maxCachedBufferSize=2000000 + # Allow loading dynamic agent used by JOL + -XX:+EnableDynamicAgentLoading + + # https://bugs.openjdk.org/browse/JDK-8329528 + -XX:+UnlockDiagnosticVMOptions + -XX:G1NumCollectionsKeepPinned=10000000 + + config.properties: | + coordinator=false + http-server.http.port=8080 + query.max-memory=4GB + query.max-memory-per-node=1GB + discovery.uri=http://release-name-trino:8080 + + log.properties: | + io.trino=INFO +--- +# Source: trino/templates/configmap-worker.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: release-name-trino-schemas-volume-worker + namespace: default + labels: + helm.sh/chart: trino-1.37.0 + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/version: "470" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: worker +data: +--- +# Source: trino/templates/service-coordinator.yaml +apiVersion: v1 +kind: Service +metadata: + name: release-name-trino + namespace: default + labels: + helm.sh/chart: trino-1.37.0 + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/version: "470" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: coordinator + annotations: + {} +spec: + type: ClusterIP + ports: + - port: 8080 + targetPort: http + protocol: TCP + name: http + selector: + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/component: coordinator +--- +# Source: trino/templates/service-worker.yaml +apiVersion: v1 +kind: Service +metadata: + name: release-name-trino-worker + namespace: default + labels: + helm.sh/chart: trino-1.37.0 + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/version: "470" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: worker + annotations: + {} +spec: + clusterIP: None + ports: + - port: 8080 + targetPort: http + protocol: TCP + name: http + selector: + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/component: worker +--- +# Source: trino/templates/deployment-coordinator.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: release-name-trino-coordinator + namespace: default + labels: + helm.sh/chart: trino-1.37.0 + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/version: "470" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: coordinator + trino.io/network-policy-protection: disabled + annotations: + {} +spec: + progressDeadlineSeconds: 600 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + selector: + matchLabels: + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/component: coordinator + template: + metadata: + annotations: + checksum/coordinator-config: 40751d21000a49da8ca8810cbffafd533666be33fdd78b1f93421fa9f5b37a6c + + labels: + helm.sh/chart: trino-1.37.0 + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/version: "470" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: coordinator + trino.io/network-policy-protection: disabled + spec: + serviceAccountName: default + securityContext: + runAsGroup: 1000 + runAsUser: 1000 + volumes: + - name: config-volume + configMap: + name: release-name-trino-coordinator + - name: schemas-volume + configMap: + name: release-name-trino-schemas-volume-coordinator + terminationGracePeriodSeconds: 30 + containers: + - name: trino-coordinator + image: trinodb/trino:470 + imagePullPolicy: IfNotPresent + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + env: + [] + envFrom: + [] + volumeMounts: + - mountPath: /etc/trino + name: config-volume + - mountPath: /etc/trino/schemas + name: schemas-volume + ports: + - name: http + containerPort: 8080 + protocol: TCP + livenessProbe: + httpGet: + path: /v1/info + port: http + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 6 + successThreshold: 1 + readinessProbe: + exec: + command: [/usr/lib/trino/bin/health-check] + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 6 + successThreshold: 1 + lifecycle: + {} + resources: + {} +--- +# Source: trino/templates/deployment-worker.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: release-name-trino-worker + namespace: default + labels: + helm.sh/chart: trino-1.37.0 + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/version: "470" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: worker + trino.io/network-policy-protection: disabled + annotations: + {} +spec: + progressDeadlineSeconds: 600 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + replicas: 2 + selector: + matchLabels: + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/component: worker + template: + metadata: + annotations: + checksum/worker-config: e580771155dcd8953af6dc546e698fd7af4c3b5510b489c6b4463bcec072dda7 + labels: + helm.sh/chart: trino-1.37.0 + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/version: "470" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: worker + trino.io/network-policy-protection: disabled + spec: + serviceAccountName: default + securityContext: + runAsGroup: 1000 + runAsUser: 1000 + volumes: + - name: config-volume + configMap: + name: release-name-trino-worker + - name: schemas-volume + configMap: + name: release-name-trino-schemas-volume-worker + terminationGracePeriodSeconds: 30 + containers: + - name: trino-worker + image: trinodb/trino:470 + imagePullPolicy: IfNotPresent + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + env: + [] + envFrom: + [] + volumeMounts: + - mountPath: /etc/trino + name: config-volume + - mountPath: /etc/trino/schemas + name: schemas-volume + ports: + - name: http + containerPort: 8080 + protocol: TCP + livenessProbe: + httpGet: + path: /v1/info + port: http + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 6 + successThreshold: 1 + readinessProbe: + exec: + command: [/usr/lib/trino/bin/health-check] + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 6 + successThreshold: 1 + lifecycle: + resources: + {} +--- +# Source: trino/templates/tests/test-connection.yaml +apiVersion: v1 +kind: Pod +metadata: + name: release-name-trino-test-connection + labels: + helm.sh/chart: trino-1.37.0 + app.kubernetes.io/name: trino + app.kubernetes.io/instance: release-name + app.kubernetes.io/version: "470" + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: test + test: connection + annotations: + "helm.sh/hook": test +spec: + containers: + - name: cli + image: trinodb/trino:470 + command: ['trino'] + args: + - trino://release-name-trino:8080 + - --user=admin + - --debug + - --execute=SELECT COUNT(*) FROM tpch.tiny.nation + - --no-progress + restartPolicy: Never diff --git a/charts/trino/templates/NOTES.txt b/charts/trino/templates/NOTES.txt index 515512a0..d343b0b4 100644 --- a/charts/trino/templates/NOTES.txt +++ b/charts/trino/templates/NOTES.txt @@ -4,6 +4,12 @@ Get the application URL by running these commands: export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT {{- else if contains "ClusterIP" .Values.service.type }} +<<<<<<< HEAD kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ template "trino.fullname" . }} 8080:{{ .Values.service.port }} echo "Visit http://127.0.0.1:8080 to use your application" +======= + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} --selector "app.kubernetes.io/name={{ template "trino.name" . }},app.kubernetes.io/instance={{ .Release.Name }},app.kubernetes.io/component=coordinator" --output name) + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:8080 +>>>>>>> 83d9fad (New squashed commit) {{- end }} diff --git a/charts/trino/templates/_helpers.tpl b/charts/trino/templates/_helpers.tpl index e6023abd..0c47129a 100644 --- a/charts/trino/templates/_helpers.tpl +++ b/charts/trino/templates/_helpers.tpl @@ -16,8 +16,13 @@ If release name contains chart name it will be used as a full name. {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} {{- $name := default .Chart.Name .Values.nameOverride }} +<<<<<<< HEAD {{- if hasPrefix .Release.Name $name }} {{- $name | trunc 63 | trimSuffix "-" }} +======= +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) {{- else }} {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} {{- end }} @@ -36,10 +41,17 @@ Create chart name and version as used by the chart label. {{- .Values.coordinatorNameOverride | trunc 63 | trimSuffix "-" }} {{- else }} {{- $name := default .Chart.Name .Values.nameOverride }} +<<<<<<< HEAD {{- if hasPrefix .Release.Name $name }} {{- printf "%s-%s" $name "coordinator" | trunc 63 | trimSuffix "-" }} {{- else }} {{- printf "%s-%s-%s" .Release.Name $name "coordinator" | trunc 63 | trimSuffix "-" }} +======= +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }}-coordinator +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}-coordinator +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) {{- end }} {{- end }} {{- end }} @@ -49,10 +61,17 @@ Create chart name and version as used by the chart label. {{- .Values.workerNameOverride | trunc 63 | trimSuffix "-" }} {{- else }} {{- $name := default .Chart.Name .Values.nameOverride }} +<<<<<<< HEAD {{- if hasPrefix .Release.Name $name }} {{- printf "%s-%s" $name "worker" | trunc 63 | trimSuffix "-" }} {{- else }} {{- printf "%s-%s-%s" .Release.Name $name "worker" | trunc 63 | trimSuffix "-" }} +======= +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }}-worker +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}-worker +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) {{- end }} {{- end }} {{- end }} @@ -61,6 +80,7 @@ Create chart name and version as used by the chart label. {{- define "trino.catalog" -}} {{ template "trino.fullname" . }}-catalog {{- end -}} +<<<<<<< HEAD {{/* Common labels @@ -155,3 +175,5 @@ Create the secret name for the group-provider file {{- end }} {{- end }} {{- end }} +======= +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) diff --git a/charts/trino/templates/configmap-catalog.yaml b/charts/trino/templates/configmap-catalog.yaml index 74ef1b16..759ae5aa 100644 --- a/charts/trino/templates/configmap-catalog.yaml +++ b/charts/trino/templates/configmap-catalog.yaml @@ -1,8 +1,16 @@ -{{- if or .Values.catalogs .Values.additionalCatalogs }} +<<<<<<< HEAD +<<<<<<< HEAD +{{- if or .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }} +======= +{{- if or .Values.catalogs .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }} +>>>>>>> 83d9fad (New squashed commit) +======= +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) apiVersion: v1 kind: ConfigMap metadata: name: {{ template "trino.catalog" . }} +<<<<<<< HEAD namespace: {{ .Release.Namespace }} labels: {{- include "trino.labels" . | nindent 4 }} @@ -14,3 +22,24 @@ data: {{- $catalogProperties | nindent 4 }} {{- end }} {{- end }} +======= + labels: + app: {{ template "trino.name" . }} + chart: {{ template "trino.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + role: catalogs +data: + tpch.properties: | + connector.name=tpch + tpch.splits-per-node=4 + tpcds.properties: | + connector.name=tpcds + tpcds.splits-per-node=4 +{{- range $catalogName, $catalogProperties := .Values.additionalCatalogs }} + {{ $catalogName }}.properties: | + {{- $catalogProperties | nindent 4 }} +{{- end }} + + +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) diff --git a/charts/trino/templates/configmap-coordinator.yaml b/charts/trino/templates/configmap-coordinator.yaml index ef822dcc..f18dad08 100644 --- a/charts/trino/templates/configmap-coordinator.yaml +++ b/charts/trino/templates/configmap-coordinator.yaml @@ -1,15 +1,34 @@ +<<<<<<< HEAD {{- $coordinatorJmx := merge .Values.jmx.coordinator (omit .Values.jmx "coordinator" "worker") -}} +======= +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) apiVersion: v1 kind: ConfigMap metadata: name: {{ template "trino.coordinator" . }} +<<<<<<< HEAD namespace: {{ .Release.Namespace }} labels: {{- include "trino.labels" . | nindent 4 }} app.kubernetes.io/component: coordinator data: node.properties: | +<<<<<<< HEAD node.environment={{ tpl .Values.server.node.environment . }} +======= + node.environment={{ .Values.server.node.environment }} +>>>>>>> 83d9fad (New squashed commit) +======= + labels: + app: {{ template "trino.name" . }} + chart: {{ template "trino.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: coordinator +data: + node.properties: | + node.environment={{ .Values.server.node.environment }} +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) node.data-dir={{ .Values.server.node.dataDir }} plugin.dir={{ .Values.server.node.pluginDir }} {{- range $configValue := .Values.additionalNodeProperties }} @@ -18,6 +37,7 @@ data: jvm.config: | -server +<<<<<<< HEAD -agentpath:/usr/lib/trino/bin/libjvmkill.so -Xmx{{ .Values.coordinator.jvm.maxHeapSize }} -XX:+{{ .Values.coordinator.jvm.gcMethod.type }} @@ -125,6 +145,42 @@ data: {{ $configValue }} {{- end }} {{- end }} +======= + -Xmx{{ .Values.server.jvm.maxHeapSize }} + -XX:+{{ .Values.server.jvm.gcMethod.type }} + -XX:G1HeapRegionSize={{ .Values.server.jvm.gcMethod.g1.heapRegionSize }} + -XX:+UseGCOverheadLimit + -XX:+ExplicitGCInvokesConcurrent + -XX:+HeapDumpOnOutOfMemoryError + -XX:+ExitOnOutOfMemoryError + -Djdk.attach.allowAttachSelf=true + -XX:-UseBiasedLocking + -XX:ReservedCodeCacheSize=512M + -XX:PerMethodRecompilationCutoff=10000 + -XX:PerBytecodeRecompilationCutoff=10000 + -Djdk.nio.maxCachedBufferSize=2000000 + {{- range $configValue := .Values.additionalJVMConfig }} + {{ $configValue }} + {{- end }} + + config.properties: | + coordinator=true +{{- if gt (int .Values.server.workers) 0 }} + node-scheduler.include-coordinator=false +{{- else }} + node-scheduler.include-coordinator=true +{{- end }} + http-server.http.port={{ .Values.service.port }} + query.max-memory={{ .Values.server.config.query.maxMemory }} + query.max-memory-per-node={{ .Values.server.config.query.maxMemoryPerNode }} + query.max-total-memory-per-node={{ .Values.server.config.query.maxTotalMemoryPerNode }} + memory.heap-headroom-per-node={{ .Values.server.config.memory.heapHeadroomPerNode }} + discovery-server.enabled=true + discovery.uri=http://localhost:{{ .Values.service.port }} + {{- range $configValue := .Values.additionalConfigProperties }} + {{ $configValue }} + {{- end }} +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) log.properties: | io.trino={{ .Values.server.log.trino.level }} @@ -132,6 +188,7 @@ data: {{ $configValue }} {{- end }} +<<<<<<< HEAD {{- if contains "PASSWORD" .Values.server.config.authenticationType }}{{- if not (index .Values.coordinator.additionalConfigFiles "password-authenticator.properties") }} password-authenticator.properties: | password-authenticator.name=file @@ -185,3 +242,6 @@ data: {{- range $key, $val := .Values.kafka.tableDescriptions }} {{ $key }}: {{ $val | quote }} {{- end }} +======= +--- +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) diff --git a/charts/trino/templates/configmap-worker.yaml b/charts/trino/templates/configmap-worker.yaml index 85236301..ce65864d 100644 --- a/charts/trino/templates/configmap-worker.yaml +++ b/charts/trino/templates/configmap-worker.yaml @@ -1,16 +1,36 @@ +<<<<<<< HEAD {{- $workerJmx := merge .Values.jmx.worker (omit .Values.jmx "coordinator" "worker") -}} {{- if or .Values.server.keda.enabled (gt (int .Values.server.workers) 0) }} +======= +{{- if gt (int .Values.server.workers) 0 }} +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) apiVersion: v1 kind: ConfigMap metadata: name: {{ template "trino.worker" . }} +<<<<<<< HEAD namespace: {{ .Release.Namespace }} labels: {{- include "trino.labels" . | nindent 4 }} app.kubernetes.io/component: worker data: node.properties: | +<<<<<<< HEAD node.environment={{ tpl .Values.server.node.environment . }} +======= + node.environment={{ .Values.server.node.environment }} +>>>>>>> 83d9fad (New squashed commit) +======= + labels: + app: {{ template "trino.name" . }} + chart: {{ template "trino.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: worker +data: + node.properties: | + node.environment={{ .Values.server.node.environment }} +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) node.data-dir={{ .Values.server.node.dataDir }} plugin.dir={{ .Values.server.node.pluginDir }} {{- range $configValue := .Values.additionalNodeProperties }} @@ -19,6 +39,7 @@ data: jvm.config: | -server +<<<<<<< HEAD -agentpath:/usr/lib/trino/bin/libjvmkill.so -Xmx{{ .Values.worker.jvm.maxHeapSize }} -XX:+{{ .Values.worker.jvm.gcMethod.type }} @@ -48,11 +69,30 @@ data: {{- if $workerJmx.enabled }} -Dcom.sun.management.jmxremote.rmi.port={{- $workerJmx.serverPort }} {{- end }} +======= + -Xmx{{ .Values.server.jvm.maxHeapSize }} + -XX:+{{ .Values.server.jvm.gcMethod.type }} + -XX:G1HeapRegionSize={{ .Values.server.jvm.gcMethod.g1.heapRegionSize }} + -XX:+UseGCOverheadLimit + -XX:+ExplicitGCInvokesConcurrent + -XX:+HeapDumpOnOutOfMemoryError + -XX:+ExitOnOutOfMemoryError + -Djdk.attach.allowAttachSelf=true + -XX:-UseBiasedLocking + -XX:ReservedCodeCacheSize=512M + -XX:PerMethodRecompilationCutoff=10000 + -XX:PerBytecodeRecompilationCutoff=10000 + -Djdk.nio.maxCachedBufferSize=2000000 + {{- range $configValue := .Values.additionalJVMConfig }} + {{ $configValue }} + {{- end }} +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) config.properties: | coordinator=false http-server.http.port={{ .Values.service.port }} query.max-memory={{ .Values.server.config.query.maxMemory }} +<<<<<<< HEAD query.max-memory-per-node={{ .Values.worker.config.query.maxMemoryPerNode }} {{- if .Values.worker.config.memory.heapHeadroomPerNode }} memory.heap-headroom-per-node={{ .Values.worker.config.memory.heapHeadroomPerNode }} @@ -86,6 +126,15 @@ data: {{ $configValue }} {{- end }} {{- end }} +======= + query.max-memory-per-node={{ .Values.server.config.query.maxMemoryPerNode }} + query.max-total-memory-per-node={{ .Values.server.config.query.maxTotalMemoryPerNode }} + memory.heap-headroom-per-node={{ .Values.server.config.memory.heapHeadroomPerNode }} + discovery.uri=http://{{ template "trino.fullname" . }}:{{ .Values.service.port }} + {{- range $configValue := .Values.additionalConfigProperties }} + {{ $configValue }} + {{- end }} +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) log.properties: | io.trino={{ .Values.server.log.trino.level }} @@ -93,6 +142,7 @@ data: {{ $configValue }} {{- end }} +<<<<<<< HEAD {{ if .Values.eventListenerProperties }} event-listener.properties: | {{- range $configValue := .Values.eventListenerProperties }} @@ -117,4 +167,6 @@ data: {{- range $key, $val := .Values.kafka.tableDescriptions }} {{ $key }}: {{ $val | quote }} {{- end }} +======= +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) {{- end }} diff --git a/charts/trino/templates/deployment-coordinator.yaml b/charts/trino/templates/deployment-coordinator.yaml index 54319456..965249b6 100644 --- a/charts/trino/templates/deployment-coordinator.yaml +++ b/charts/trino/templates/deployment-coordinator.yaml @@ -1,8 +1,12 @@ +<<<<<<< HEAD {{- $coordinatorJmx := merge .Values.jmx.coordinator (omit .Values.jmx "coordinator" "worker") -}} +======= +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "trino.coordinator" . }} +<<<<<<< HEAD namespace: {{ .Release.Namespace }} labels: {{- include "trino.labels" . | nindent 4 }} @@ -28,7 +32,11 @@ spec: {{- if and (eq .Values.accessControl.type "configmap") (not .Values.accessControl.refreshPeriod) }} checksum/access-control-config: {{ include (print $.Template.BasePath "/configmap-access-control-coordinator.yaml") . | sha256sum }} {{- end }} - {{- if or .Values.catalogs .Values.additionalCatalogs }} +<<<<<<< HEAD + {{- if or .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }} +======= + {{- if or .Values.catalogs .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }} +>>>>>>> 83d9fad (New squashed commit) checksum/catalog-config: {{ include (print $.Template.BasePath "/configmap-catalog.yaml") . | sha256sum }} {{- end }} checksum/coordinator-config: {{ include (print $.Template.BasePath "/configmap-coordinator.yaml") . | sha256sum }} @@ -51,12 +59,42 @@ spec: {{- end }} {{- if .Values.shareProcessNamespace.coordinator }} shareProcessNamespace: {{ .Values.shareProcessNamespace.coordinator }} +======= + labels: + app: {{ template "trino.name" . }} + chart: {{ template "trino.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: coordinator +spec: + selector: + matchLabels: + app: {{ template "trino.name" . }} + release: {{ .Release.Name }} + component: coordinator + template: + metadata: + labels: + app: {{ template "trino.name" . }} + release: {{ .Release.Name }} + component: coordinator + spec: + {{- with .Values.securityContext }} + securityContext: + runAsUser: {{ .runAsUser }} + runAsGroup: {{ .runAsGroup }} +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) {{- end }} volumes: - name: config-volume configMap: name: {{ template "trino.coordinator" . }} - {{- if or .Values.catalogs .Values.additionalCatalogs }} +<<<<<<< HEAD +<<<<<<< HEAD + {{- if or .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }} +======= + {{- if or .Values.catalogs .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }} +>>>>>>> 83d9fad (New squashed commit) - name: catalog-volume configMap: name: {{ template "trino.catalog" . }} @@ -140,7 +178,11 @@ spec: volumeMounts: - mountPath: {{ .Values.server.config.path }} name: config-volume - {{- if or .Values.catalogs .Values.additionalCatalogs }} +<<<<<<< HEAD + {{- if or .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }} +======= + {{- if or .Values.catalogs .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }} +>>>>>>> 83d9fad (New squashed commit) - mountPath: {{ .Values.server.config.path }}/catalog name: catalog-volume {{- end }} @@ -193,10 +235,27 @@ spec: {{- with .Values.coordinator.additionalVolumeMounts }} {{- . | toYaml | nindent 12 }} {{- end }} +======= + - name: catalog-volume + configMap: + name: {{ template "trino.catalog" . }} + imagePullSecrets: + - name: registry-credentials + containers: + - name: {{ .Chart.Name }}-coordinator + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + volumeMounts: + - mountPath: {{ .Values.server.config.path }} + name: config-volume + - mountPath: {{ .Values.server.config.path }}/catalog + name: catalog-volume +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) ports: - name: http containerPort: {{ .Values.service.port }} protocol: TCP +<<<<<<< HEAD {{- if $coordinatorJmx.enabled }} - name: jmx-registry containerPort: {{ $coordinatorJmx.registryPort }} @@ -210,10 +269,13 @@ spec: containerPort: {{ $value.port }} protocol: {{ $value.protocol }} {{- end }} +======= +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) livenessProbe: httpGet: path: /v1/info port: http +<<<<<<< HEAD initialDelaySeconds: {{ .Values.coordinator.livenessProbe.initialDelaySeconds | default 30 }} periodSeconds: {{ .Values.coordinator.livenessProbe.periodSeconds | default 10 }} timeoutSeconds: {{ .Values.coordinator.livenessProbe.timeoutSeconds | default 5 }} @@ -262,6 +324,23 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.coordinator.tolerations }} +======= + readinessProbe: + httpGet: + path: /v1/info + port: http + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/trino/templates/deployment-worker.yaml b/charts/trino/templates/deployment-worker.yaml index 7a69e8ae..00f31640 100644 --- a/charts/trino/templates/deployment-worker.yaml +++ b/charts/trino/templates/deployment-worker.yaml @@ -1,9 +1,14 @@ +<<<<<<< HEAD {{- $workerJmx := merge .Values.jmx.worker (omit .Values.jmx "coordinator" "worker") -}} {{- if or .Values.server.keda.enabled (gt (int .Values.server.workers) 0) }} +======= +{{- if gt (int .Values.server.workers) 0 }} +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "trino.worker" . }} +<<<<<<< HEAD namespace: {{ .Release.Namespace }} labels: {{- include "trino.labels" . | nindent 4 }} @@ -29,7 +34,11 @@ spec: template: metadata: annotations: - {{- if or .Values.catalogs .Values.additionalCatalogs }} +<<<<<<< HEAD + {{- if or .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }} +======= + {{- if or .Values.catalogs .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }} +>>>>>>> 83d9fad (New squashed commit) checksum/catalog-config: {{ include (print $.Template.BasePath "/configmap-catalog.yaml") . | sha256sum }} {{- end }} checksum/worker-config: {{ include (print $.Template.BasePath "/configmap-worker.yaml") . | sha256sum }} @@ -55,11 +64,38 @@ spec: {{- if .Values.shareProcessNamespace.worker }} shareProcessNamespace: {{ .Values.shareProcessNamespace.worker }} {{- end }} +======= + labels: + app: {{ template "trino.name" . }} + chart: {{ template "trino.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: worker +spec: + replicas: {{ .Values.server.workers }} + selector: + matchLabels: + app: {{ template "trino.name" . }} + release: {{ .Release.Name }} + component: worker + template: + metadata: + labels: + app: {{ template "trino.name" . }} + release: {{ .Release.Name }} + component: worker + spec: +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) volumes: - name: config-volume configMap: name: {{ template "trino.worker" . }} - {{- if or .Values.catalogs .Values.additionalCatalogs }} +<<<<<<< HEAD +<<<<<<< HEAD + {{- if or .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }} +======= + {{- if or .Values.catalogs .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }} +>>>>>>> 83d9fad (New squashed commit) - name: catalog-volume configMap: name: {{ template "trino.catalog" . }} @@ -126,7 +162,11 @@ spec: volumeMounts: - mountPath: {{ .Values.server.config.path }} name: config-volume - {{- if or .Values.catalogs .Values.additionalCatalogs }} +<<<<<<< HEAD + {{- if or .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }} +======= + {{- if or .Values.catalogs .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }} +>>>>>>> 83d9fad (New squashed commit) - mountPath: {{ .Values.server.config.path }}/catalog name: catalog-volume {{- end }} @@ -167,10 +207,27 @@ spec: {{- with .Values.worker.additionalVolumeMounts }} {{- . | toYaml | nindent 12 }} {{- end }} +======= + - name: catalog-volume + configMap: + name: {{ template "trino.catalog" . }} + imagePullSecrets: + - name: registry-credentials + containers: + - name: {{ .Chart.Name }}-worker + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + volumeMounts: + - mountPath: {{ .Values.server.config.path }} + name: config-volume + - mountPath: {{ .Values.server.config.path }}/catalog + name: catalog-volume +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) ports: - name: http containerPort: {{ .Values.service.port }} protocol: TCP +<<<<<<< HEAD {{- if $workerJmx.enabled }} - name: jmx-registry containerPort: {{ $workerJmx.registryPort }} @@ -184,10 +241,13 @@ spec: containerPort: {{ $value.port }} protocol: {{ $value.protocol }} {{- end }} +======= +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) livenessProbe: httpGet: path: /v1/info port: http +<<<<<<< HEAD initialDelaySeconds: {{ .Values.worker.livenessProbe.initialDelaySeconds | default 30 }} periodSeconds: {{ .Values.worker.livenessProbe.periodSeconds | default 10 }} timeoutSeconds: {{ .Values.worker.livenessProbe.timeoutSeconds | default 5 }} @@ -253,6 +313,23 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.worker.tolerations }} +======= + readinessProbe: + httpGet: + path: /v1/info + port: http + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/trino/templates/secret.yaml b/charts/trino/templates/secret.yaml index 6f908ec0..5e73c502 100644 --- a/charts/trino/templates/secret.yaml +++ b/charts/trino/templates/secret.yaml @@ -25,3 +25,34 @@ data: group.db: {{ .Values.auth.groups | b64enc }} {{- end }} {{- end }} +<<<<<<< HEAD +======= +--- +{{- if .Values.catalogsSecrets }} +{{- range .Values.catalogsSecrets }} +apiVersion: v1 +kind: Secret +metadata: + name: "{{ .name }}" +data: +{{- range $key, $val := .value }} + {{ $key }}: {{ $val | b64enc | nindent 4 }} +{{- end }} +type: Opaque +{{- end }} +{{- end }} +--- +{{- if .Values.ldapSecrets }} +{{- range .Values.ldapSecrets }} +apiVersion: v1 +kind: Secret +metadata: + name: "{{ .name }}" +data: +{{- range $key, $val := .value }} + {{ $key }}: {{ $val | b64enc | nindent 4 }} +{{- end }} +type: Opaque +{{- end }} +{{- end }} +>>>>>>> 83d9fad (New squashed commit) diff --git a/charts/trino/templates/service.yaml b/charts/trino/templates/service.yaml new file mode 100644 index 00000000..bd137ef6 --- /dev/null +++ b/charts/trino/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "trino.fullname" . }} + labels: + app: {{ template "trino.name" . }} + chart: {{ template "trino.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "trino.name" . }} + release: {{ .Release.Name }} + component: coordinator diff --git a/charts/trino/values.yaml b/charts/trino/values.yaml index e4f754db..5224d15a 100644 --- a/charts/trino/values.yaml +++ b/charts/trino/values.yaml @@ -2,6 +2,7 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +<<<<<<< HEAD # -- Override resource names to avoid name conflicts when deploying multiple # releases in the same namespace. # @raw @@ -36,11 +37,24 @@ image: # - name: registry-credentials # ``` imagePullSecrets: [] +======= +image: + repository: trinodb/trino + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart version. + tag: latest +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) server: workers: 2 node: +<<<<<<< HEAD +<<<<<<< HEAD # server.node.environment -- Supports templating with `tpl`. +======= +>>>>>>> 83d9fad (New squashed commit) +======= +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) environment: production dataDir: /data/trino pluginDir: /usr/lib/trino/plugin @@ -49,6 +63,7 @@ server: level: INFO config: path: /etc/trino +<<<<<<< HEAD https: enabled: false port: 8443 @@ -467,10 +482,38 @@ sidecarContainers: {} # -- [Pod security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) configuration. # To remove the default, set it to null (or `~`). +======= + http: + port: 8080 + query: + maxMemory: "4GB" + maxMemoryPerNode: "1GB" + maxTotalMemoryPerNode: "2GB" + memory: + heapHeadroomPerNode: "1GB" + jvm: + maxHeapSize: "8G" + gcMethod: + type: "UseG1GC" + g1: + heapRegionSize: "32M" + +additionalNodeProperties: {} + +additionalJVMConfig: {} + +additionalConfigProperties: {} + +additionalLogProperties: {} + +additionalCatalogs: {} + +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) securityContext: runAsUser: 1000 runAsGroup: 1000 +<<<<<<< HEAD # -- [Container security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) configuration. containerSecurityContext: # -- Control whether a process can gain more privileges than its parent process. @@ -547,6 +590,15 @@ secretMounts: [] # secretName: sample-secret # path: /secrets/sample.json # subPath: sample.json +<<<<<<< HEAD +======= +# - name: catalogs +# secretName: catalogs +# path: /etc/trino/catalog +# - name: ldap +# secretName: ldap +# path: /etc/trino/ldap +>>>>>>> 83d9fad (New squashed commit) # ``` coordinator: @@ -1134,3 +1186,55 @@ networkPolicy: # port: 9999 # ``` egress: [] +<<<<<<< HEAD +======= + +catalogsSecrets: [] + # - name: catalogs + # value: + # mariadb.properties: | + # connector.name=mariadb + # connection-user= + # connection-url= + # connection-password= + # postgresql.properties: | + # connector.name=postgresql + # connection-user= + # connection-url= + # postgresql.array-mapping= + # connection-password= +ldapSecrets: [] + # - name: ldap + # value: + # ldap.properties: | + # password-authenticator.name=ldap + # ldap.bind-dn=uid= + # ldap.url= + # ldap.bind-password= + # ldap.user-bind-pattern= + # ldap.group-auth-pattern= + # ldap.user-base-dn= +>>>>>>> 83d9fad (New squashed commit) +======= +service: + type: ClusterIP + port: 8080 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} +>>>>>>> 7f0562e (extend chart, add GHA for CI and Release) diff --git a/tests/gateway/test-https.yaml b/tests/gateway/test-https.yaml index 45275858..f35c60d0 100644 --- a/tests/gateway/test-https.yaml +++ b/tests/gateway/test-https.yaml @@ -3,7 +3,11 @@ command: - "-c" - | cat /etc/certificates/tls.crt /etc/certificates/tls.key > /etc/scratch/tls.pem && \ +<<<<<<< HEAD java -XX:MinRAMPercentage=80.0 -XX:MaxRAMPercentage=80.0 -jar /usr/lib/trino-gateway/gateway-ha-jar-with-dependencies.jar /etc/trino-gateway/config.yaml +======= + java -XX:MinRAMPercentage=80.0 -XX:MaxRAMPercentage=80.0 -jar /usr/lib/trino/gateway-ha-jar-with-dependencies.jar /etc/gateway/config.yaml +>>>>>>> 83d9fad (New squashed commit) config: serverConfig: diff --git a/tests/gateway/test-values-with-env.yaml b/tests/gateway/test-values-with-env.yaml index 243e1787..4baec182 100644 --- a/tests/gateway/test-values-with-env.yaml +++ b/tests/gateway/test-values-with-env.yaml @@ -17,6 +17,15 @@ config: driver: org.postgresql.Driver clusterStatsConfiguration: monitorType: INFO_API +<<<<<<< HEAD +======= + modules: + - io.trino.gateway.ha.module.HaGatewayProviderModule + - io.trino.gateway.ha.module.ClusterStateListenerModule + - io.trino.gateway.ha.module.ClusterStatsMonitorModule + managedApps: + - io.trino.gateway.ha.clustermonitor.ActiveClusterMonitor +>>>>>>> 83d9fad (New squashed commit) envFrom: - secretRef: diff --git a/tests/gateway/test-values.yaml b/tests/gateway/test-values.yaml index eeaa875b..f8f48df1 100644 --- a/tests/gateway/test-values.yaml +++ b/tests/gateway/test-values.yaml @@ -17,6 +17,15 @@ config: driver: org.postgresql.Driver clusterStatsConfiguration: monitorType: INFO_API +<<<<<<< HEAD +======= + modules: + - io.trino.gateway.ha.module.HaGatewayProviderModule + - io.trino.gateway.ha.module.ClusterStateListenerModule + - io.trino.gateway.ha.module.ClusterStatsMonitorModule + managedApps: + - io.trino.gateway.ha.clustermonitor.ActiveClusterMonitor +>>>>>>> 83d9fad (New squashed commit) ingress: enabled: true diff --git a/tests/trino/test-values.yaml b/tests/trino/test-values.yaml index ed145cdd..4cb64a28 100644 --- a/tests/trino/test-values.yaml +++ b/tests/trino/test-values.yaml @@ -2,6 +2,7 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +<<<<<<< HEAD global: env: "dev" region: "region_test" @@ -9,6 +10,9 @@ global: server: node: environment: "{{ .Values.global.env }}_{{ .Values.global.region }}" +======= +server: +>>>>>>> 83d9fad (New squashed commit) workers: 0 config: https: