├── .github └── workflows │ └── release.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENCE.md ├── README.md └── charts ├── cube ├── .helmignore ├── CHANGELOG.md ├── Chart.yaml ├── README.md ├── templates │ ├── _env.tpl │ ├── _env_config.tpl │ ├── _env_cubestore.tpl │ ├── _env_db_athena.tpl │ ├── _env_db_bigquery.tpl │ ├── _env_db_clickhouse.tpl │ ├── _env_db_common.tpl │ ├── _env_db_databricks.tpl │ ├── _env_db_duckdb.tpl │ ├── _env_db_elasticsearch.tpl │ ├── _env_db_firebolt.tpl │ ├── _env_db_hive.tpl │ ├── _env_db_materialize.tpl │ ├── _env_db_presto.tpl │ ├── _env_db_snowflake.tpl │ ├── _env_db_trino.tpl │ ├── _env_jwt.tpl │ ├── _env_redis.tpl │ ├── _helpers.tpl │ ├── api │ │ ├── deployment.yaml │ │ ├── service.yaml │ │ └── serviceaccount.yaml │ ├── ingress.yaml │ └── worker │ │ ├── deployment.yaml │ │ └── serviceaccount.yaml └── values.yaml └── cubestore ├── .helmignore ├── CHANGELOG.md ├── Chart.yaml ├── README.md ├── templates ├── _helpers.tpl ├── common-env.tpl ├── pvc.yaml ├── router │ ├── configmap-statsd-mapping.yml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── statefulset.yaml └── workers │ ├── service-headless.yaml │ ├── serviceaccount.yaml │ └── statefulset.yaml └── values.yaml /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release Charts 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | release: 8 | permissions: 9 | contents: write 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v3 14 | with: 15 | fetch-depth: 0 16 | 17 | - name: Configure Git 18 | run: | 19 | git config user.name "$GITHUB_ACTOR" 20 | git config user.email "$GITHUB_ACTOR@users.noreply.github.com" 21 | 22 | - name: Install Helm 23 | uses: azure/setup-helm@v4 24 | 25 | - name: Run chart-releaser 26 | uses: helm/chart-releaser-action@v1.6.0 27 | with: 28 | charts_dir: charts 29 | env: 30 | CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.tgz 2 | /.idea/* 3 | .vscode 4 | .DS_Store 5 | **.~undo-tree~ 6 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Contributions are welcome via GitHub pull requests. This document outlines the process to help get your contribution accepted. 4 | 5 | ## Sign off Your Work 6 | 7 | The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the [DCO](http://developercertificate.org/). Contributors must sign-off that they adhere to these requirements by adding a `Signed-off-by` line to commit messages. 8 | 9 | ```text 10 | This is my commit message 11 | 12 | Signed-off-by: Random J Developer 13 | ``` 14 | 15 | See `git help commit`: 16 | 17 | ```text 18 | -s, --signoff 19 | Add Signed-off-by line by the committer at the end of the commit log 20 | message. The meaning of a signoff depends on the project, but it typically 21 | certifies that committer has the rights to submit this work under the same 22 | license and agrees to a Developer Certificate of Origin (see 23 | http://developercertificate.org/ for more information). 24 | ``` 25 | 26 | ## How to Contribute 27 | 28 | 1. Fork this repository, develop, and test your changes 29 | 1. Remember to sign off your commits as described above 30 | 1. Submit a pull request 31 | 32 | **_NOTE_**: In order to make testing and merging of PRs easier, please submit changes to multiple charts in separate PRs. 33 | 34 | ### Technical Requirements 35 | 36 | - Must pass [DCO check](#sign-off-your-work) 37 | - Must follow [Charts best practices](https://helm.sh/docs/topics/chart_best_practices/) 38 | - Must pass CI jobs for linting and installing changed charts with the [chart-testing](https://github.com/helm/chart-testing) tool 39 | - Any change to a chart requires a version bump following [semver](https://semver.org/) principles. See [Immutability](#immutability) and [Versioning](#versioning) below 40 | 41 | Once changes have been merged, the release job will automatically run to package and release changed charts. 42 | 43 | ### Immutability 44 | 45 | Chart releases must be immutable. Any change to a chart warrants a chart version bump even if it is only changed to the documentation. 46 | 47 | ### Versioning 48 | 49 | The chart `version` should follow [semver](https://semver.org/). 50 | 51 | Charts should start at `1.0.0`. Any breaking (backwards incompatible) changes to a chart should: 52 | 53 | 1. Bump the MAJOR version 54 | 2. In the README, under a section called "Upgrading", describe the manual steps necessary to upgrade to the new (specified) MAJOR version 55 | -------------------------------------------------------------------------------- /LICENCE.md: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Gadsme Helm chart repository 2 | 3 | [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Release Charts](https://github.com/gadsme/charts/workflows/Release%20Charts/badge.svg?branch=main) [![Releases downloads](https://img.shields.io/github/downloads/gadsme/charts/total.svg)](https://github.com/gadsme/charts/releases) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/gadsme)](https://artifacthub.io/packages/search?repo=gadsme) 4 | 5 | ## Usage 6 | 7 | [Helm](https://helm.sh) must be installed to use the charts. 8 | Please refer to Helm's [documentation](https://helm.sh/docs/) to get started. 9 | 10 | Once Helm is set up properly, add the repo as follows: 11 | 12 | ```console 13 | helm repo add gadsme https://gadsme.github.io/charts 14 | ``` 15 | 16 | You can then run `helm search repo gadsme` to see the charts. 17 | 18 | ## Contributing 19 | 20 | We'd love to have you contribute! Please refer to our [contribution guidelines](https://github.com/gadsme/charts/blob/main/CONTRIBUTING.md) for details. 21 | 22 | ## License 23 | 24 | [Apache 2.0 License](https://github.com/gadsme/charts/blob/main/LICENSE.md). 25 | -------------------------------------------------------------------------------- /charts/cube/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/cube/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | The release numbering uses [semantic versioning](http://semver.org). 4 | 5 | ## 3.0.0 6 | 7 | - update to cube 1.2.0 8 | 9 | ## 2.3.1 10 | 11 | - update to cube 0.35.76 12 | - fix CUBEJS_DB_TYPE for presto 13 | 14 | ## 2.3.0 15 | 16 | - update to cube 0.35.67 17 | - add materialize config 18 | - add duckdb config 19 | - remove old mysql sql api 20 | 21 | ## 2.2.0 22 | 23 | - update to cube 0.34.56 24 | - add aws accessKeyID from secret 25 | 26 | ## 2.1.0 27 | 28 | - update to cube 0.34.23 29 | - add support for init containers 30 | 31 | ## 2.0.2 32 | 33 | - update to cube 0.33.48 34 | - run containers as non root 35 | 36 | ## 2.0.1 37 | 38 | - fix databrics database type 39 | 40 | ## 2.0.0 41 | 42 | - remove logic to detect redis as default cacheAndQueueDriver 43 | - add metrics environment variables 44 | - add `config.touchPreAggTimeout`and `config.dropPreAggWithoutTouch` 45 | - fix spreadConstraints condition on router 46 | 47 | Breaking changes: 48 | 49 | - rename `workers.*` config to `worker.*` 50 | 51 | ## 1.4.0 52 | 53 | - Update to cube 0.32.14 54 | - add `config.concurrency` 55 | 56 | ## 1.3.1 57 | 58 | - Fix chart version 59 | 60 | ## 1.3.0 61 | 62 | - Update to cube 0.32.7 63 | 64 | ## 1.2.0 65 | 66 | - Upgrade to cube 0.31.58 67 | - add ability to extend envVars 68 | 69 | ## 1.1.2 70 | 71 | - Fix add missing `cubestore` env vars 72 | 73 | ## 1.1.1 74 | 75 | - Fix `athena` env var generation when used in multiple datasource context 76 | - Add safe checks to only generate current database related env var 77 | 78 | ## 1.1.0 79 | 80 | - Upgrade to cube 0.31.55 81 | - Rename `aws` database config to `athena` 82 | 83 | ## 1.0.0 84 | 85 | - Add multiple datasources support. 86 | - Upgrade to cube 0.31.47 87 | 88 | Breaking changes: 89 | 90 | - move `database` to `datasources.default` 91 | - move `exportsBucket` to `datasources..export` 92 | - rename `jwt.url` to `jwt.jwkUrl` 93 | -------------------------------------------------------------------------------- /charts/cube/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: cube 3 | description: A Helm chart for Cube 4 | home: https://cube.dev 5 | type: application 6 | version: 3.0.0 7 | appVersion: "1.2.0" 8 | keywords: 9 | - cubejs 10 | - cube 11 | maintainers: 12 | - email: luc.vauvillier@gmail.com 13 | name: Luc Vauvillier 14 | sources: 15 | - https://github.com/cube-js/cube.js 16 | annotations: 17 | "artifacthub.io/links": | 18 | - name: Chart Source 19 | url: https://github.com/gadsme/charts 20 | -------------------------------------------------------------------------------- /charts/cube/README.md: -------------------------------------------------------------------------------- 1 | # Cube Chart 2 | 3 | ## Table of Contents 4 | 5 | - [Get Started](#get-started) 6 | - [Install Chart](#install-chart) 7 | - [Uninstall Chart](#uninstall-chart) 8 | - [Upgrading Chart](#upgrading-chart) 9 | - [Configuration](#configuration) 10 | - [Injecting schema](#injecting-schema) 11 | - [Injecting javascript config](#injecting-javascript-config) 12 | - [Fix duplicate schemas issue](#fix-duplicate-schemas-issue) 13 | - [Examples](#examples) 14 | - [Reference](#reference) 15 | - [Global parameters](#global-parameters) 16 | - [Image parameters](#image-parameters) 17 | - [Config parameters](#config-parameters) 18 | - [Redis parameters](#redis-parameters) 19 | - [JWT parameters](#jwt-parameters) 20 | - [Datasources configuration](#datasources-configuration) 21 | - [Common parameters](#common-datasource-parameters) 22 | - [Athena parameters](#athena-datasource-parameters) 23 | - [Bigquery parameters](#bigquery-datasource-parameters) 24 | - [Databricks parameters](#databricks-datasource-parameters) 25 | - [DuckDB parameters](#duckdb-datasource-parameters) 26 | - [ClickHouse parameters](#clickhouse-datasource-parameters) 27 | - [Firebolt parameters](#firebolt-datasource-parameters) 28 | - [Hive parameters](#hive-datasource-parameters) 29 | - [Materialize parameters](#materialize-datasource-parameters) 30 | - [Presto parameters](#presto-datasource-parameters) 31 | - [Snowflake parameters](#snowflake-datasource-parameters) 32 | - [Trino parameters](#trino-datasource-parameters) 33 | - [Api instance parameters](#api-instance-parameters) 34 | - [Refresh worker parameters](#worker-parameters) 35 | - [Ingress parameters](#ingress-parameters) 36 | 37 | ## Get Started 38 | 39 | ```console 40 | helm repo add gadsme https://gadsme.github.io/charts 41 | helm repo update 42 | ``` 43 | 44 | _See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentation._ 45 | 46 | ### Install Chart 47 | 48 | ```console 49 | helm install [RELEASE_NAME] gadsme/cube --set [CONFIGURATION] 50 | ``` 51 | 52 | The command deploys Cube on the Kubernetes cluster using the default configuration. 53 | 54 | _See [configuration](#configuration) below._ 55 | 56 | _See [`helm install`](https://helm.sh/docs/helm/helm_install/) for command documentation._ 57 | 58 | ### Uninstall Chart 59 | 60 | ```console 61 | helm uninstall [RELEASE_NAME] 62 | ``` 63 | 64 | This removes all the Kubernetes components associated with the chart and deletes the release. 65 | 66 | _See [`helm uninstall`](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._ 67 | 68 | ### Upgrading Chart 69 | 70 | ```console 71 | helm upgrade [RELEASE_NAME] gadsme/cube --install 72 | ``` 73 | 74 | ## Configuration 75 | 76 | By default an api instance and one worker will be deployed. You can customize the deployment using helm values. 77 | 78 | Refer to the official documentation for more information: 79 | https://cube.dev/docs/reference/environment-variables 80 | 81 | ### Injecting schema 82 | 83 | To inject your schema files in the deployment you have to use `config.volumes` and `config.volumeMounts` values. 84 | 85 | Mount path is `/cube/conf/schema` by default and can be customized with the `config.schemaPath` value. 86 | 87 | A good practice is to use a ConfigMap to store your all the cube definition files: 88 | 89 | ```yaml 90 | apiVersion: v1 91 | kind: ConfigMap 92 | metadata: 93 | name: cube-schema 94 | data: 95 | Cube1.js: | 96 | cube(`Cube1`, { 97 | sql: `SELECT * FROM cube1_data`, 98 | 99 | measures: { 100 | count: { 101 | type: `count`, 102 | }, 103 | }, 104 | }); 105 | Cube2.js: | 106 | cube(`Cube2`, { 107 | sql: `SELECT * FROM cube2_data`, 108 | 109 | measures: { 110 | count: { 111 | type: `count`, 112 | }, 113 | }, 114 | }); 115 | ``` 116 | 117 | or using a template: 118 | 119 | ```yaml 120 | apiVersion: v1 121 | kind: ConfigMap 122 | metadata: 123 | name: cube-schema 124 | data: 125 | {{ (.Files.Glob "schema/**.js").AsConfig | indent 2 }} 126 | ``` 127 | 128 | ### Injecting javascript config 129 | 130 | To inject a javascript config in the deployment you can use `config.volumes` and `config.volumeMounts` values. 131 | 132 | Mount path is `/cube/conf/` 133 | 134 | ### Fix duplicate schemas issue 135 | 136 | When you mount a secret or configmap as volume, the path at which Kubernetes will mount it will contain the root level items symlinking the same names into a `..data` directory, which is symlink to real mountpoint. 137 | 138 | As cube will recursively browse the schema folder, it will found duplicate schemas. 139 | 140 | To fix this issue you can mount each schema files using a `subPath` or change the default behavior using your own `repositoryFactory`: 141 | 142 | ```javascript 143 | const path = require("path"); 144 | const fs = require("fs"); 145 | 146 | module.exports = { 147 | repositoryFactory: () => ({ 148 | dataSchemaFiles: async () => { 149 | const files = await fs.promises.readdir( 150 | path.join(process.cwd(), "schema") 151 | ); 152 | return await Promise.all( 153 | files 154 | .filter((file) => file.endsWith(".js") || file.endsWith(".yaml")) 155 | .map(async (file) => ({ 156 | fileName: file, 157 | content: await fs.promises.readFile( 158 | path.join(process.cwd(), "schema", file), 159 | "utf-8" 160 | ), 161 | })) 162 | ); 163 | }, 164 | }), 165 | }; 166 | ``` 167 | 168 | ### Examples 169 | 170 | Deployment with: 171 | 172 | - BigQuery db with export Bucket on GCS 173 | - Schema located in a `cube-schema` ConfigMap 174 | - Cubestore 175 | 176 | ```bash 177 | $ helm install my-release -f values.yaml gadsme/cube 178 | ``` 179 | 180 | ```yaml 181 | # values.yaml 182 | config: 183 | volumes: 184 | - name: schema 185 | configMap: 186 | name: cube-schema 187 | volumeMounts: 188 | - name: schema 189 | readOnly: true 190 | mountPath: /cube/conf/schema 191 | 192 | datasources: 193 | default: 194 | type: bigquery 195 | export: 196 | type: gcp 197 | name: 198 | gcsCredentialsFromSecret: 199 | name: 200 | key: 201 | bigquery: 202 | projectId: 203 | credentialsFromSecret: 204 | name: 205 | key: 206 | 207 | cubestore: 208 | host: 209 | ``` 210 | 211 | Multiple datasources sample: 212 | 213 | ```yaml 214 | # values.yaml 215 | config: 216 | volumes: 217 | - name: schema 218 | configMap: 219 | name: cube-schema 220 | volumeMounts: 221 | - name: schema 222 | readOnly: true 223 | mountPath: /cube/conf/schema 224 | 225 | datasources: 226 | default: 227 | type: bigquery 228 | export: 229 | type: gcp 230 | name: 231 | gcsCredentialsFromSecret: 232 | name: 233 | key: 234 | bigquery: 235 | projectId: 236 | credentialsFromSecret: 237 | name: 238 | key: 239 | postgres: 240 | type: postgres 241 | host: 242 | name: 243 | user: 244 | passFromSecret: 245 | name: 246 | key: 247 | 248 | cubestore: 249 | host: 250 | ``` 251 | 252 | ## Reference 253 | 254 | ### Global parameters 255 | 256 | | Name | Description | Value | 257 | | --------------------------- | ---------------------------------------------------------------------------------------- | ----- | 258 | | `nameOverride` | Override the name | `""` | 259 | | `fullnameOverride` | Provide a name to substitute for the full names of resources | `""` | 260 | | `commonLabels` | Labels to add to all deployed objects | `{}` | 261 | | `commonAnnotations` | Annotations to add to all deployed objects | `{}` | 262 | | `extraEnvVars` | Extra environment variables to pass on to all pods. The value is evaluated as a template | `[]` | 263 | | `extraEnvVarsFromConfigMap` | Name of a Config Map containing extra environment variables to pass on to all pods | | 264 | | `extraEnvVarsFromSecret` | Name of a Secret containing extra environment variables to pass on to all pods | | 265 | 266 | ### Image parameters 267 | 268 | | Name | Description | Value | 269 | | ------------------- | --------------------------------------------------------------------------------------- | -------------- | 270 | | `image.repository` | Cube image repository | `cubejs/cube` | 271 | | `image.tag` | Cube image tag (immutable tags are recommended) | `1.2.0` | 272 | | `image.pullPolicy` | Cube image pull policy | `IfNotPresent` | 273 | | `image.pullSecrets` | If defined, uses a Secret to pull an image from a private Docker registry or repository | `[]` | 274 | 275 | ### Config parameters 276 | 277 | | Name | Description | Value | 278 | | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------- | 279 | | `config.apiPort` | The port for a Cube deployment to listen to API connections on | `4000` | 280 | | `config.pgSqlPort` | The port to listen to Postgres-compatible connections on | | 281 | | `config.sqlUser` | The username to access the SQL api | | 282 | | `config.sqlPassword` | The password to access the SQL api | | 283 | | `config.sqlPasswordFromSecret.name` | The password to access the SQL api (using secret) | | 284 | | `config.sqlPasswordFromSecret.key` | The password to access the SQL api (using secret) | | 285 | | `config.devMode` | If true, enables development mode | `false` | 286 | | `config.debug` | If true, enables debug logging | `false` | 287 | | `config.logLevel` | The logging level for Cube | `warn` | 288 | | `config.telemetry` | If true, then send telemetry to Cube | `false` | 289 | | `config.apiSecret` | The secret key used to sign and verify JWTs. Generated on project scaffold | | 290 | | `config.apiSecretFromSecret.name` | The secret key used to sign and verify JWTs. Generated on project scaffold (using secret) | | 291 | | `config.apiSecretFromSecret.key` | The secret key used to sign and verify JWTs. Generated on project scaffold (using secret) | | 292 | | `config.Values.config.playgroundAuthSecret` | The secret key used to enable system APIs | | 293 | | `config.Values.config.playgroundAuthSecretFromSecret.name` | The secret key used to enable system APIs (using secret) | | 294 | | `config.Values.config.playgroundAuthSecretFromSecret.key` | The secret key used to enable system APIs (using secret) | | 295 | | `config.schemaPath` | The path where Cube loads schemas from. Defaults to schema | | 296 | | `config.app` | An application ID used to uniquely identify the Cube deployment. Can be different for multitenant setups. Defaults to cubejs | | 297 | | `config.rollupOnly` | If true, this instance of Cube will only query rollup pre-aggregations. Defaults to false | | 298 | | `config.scheduledRefreshTimezones` | A comma-separated list of timezones to schedule refreshes for | | 299 | | `config.webSockets` | If true, then use WebSocket for data fetching. Defaults to true | | 300 | | `config.preAggregationsSchema` | The schema name to use for storing pre-aggregations true | | 301 | | `config.cacheAndQueueDriver` | The cache and queue driver to use for the Cube deployment. Defaults to cubestore | | 302 | | `config.concurrency` | The number of concurrent connections each query queue has to the database | | 303 | | `config.topicName` | The name of the Amazon SNS or Google Cloud Pub/Sub topicredis | | 304 | | `config.touchPreAggTimeout` | The number of seconds without a touch before pre-aggregation is considered orphaned and marked for removal | | 305 | | `config.dropPreAggWithoutTouch` | If true, it enables dropping pre-aggregations that Refresh Worker doesn't touch within touchPreAggTimeout | | 306 | | `config.volumes` | The config volumes. Will be used to both api and worker | `[]` | 307 | | `config.volumeMounts` | The config volumeMounts. Will be used to both api and worker | `[]` | 308 | | `config.initContainers` | Add init containers to load models using volume mounts ( an alternative to using configs, example in values) | `[]` | 309 | | `config.sidecarContainers` | Add sidecar containers to load models using volume mounts ( an alternative to using configs, example in values) | `[]` | 310 | 311 | ### Redis parameters 312 | 313 | | Name | Description | Value | 314 | | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | 315 | | `redis.url` | The host URL for a Redis server. Note that this must include the `redis://` protocol prefix. | | 316 | | `redis.password` | The password used to connect to the Redis server | | 317 | | `redis.passwordFromSecret.name` | The password used to connect to the Redis server (using secret) | | 318 | | `redis.passwordFromSecret.key` | The password used to connect to the Redis server (using secret) | | 319 | | `redis.tls` | If true, then the connection to the Redis server is protected by TLS authentication. Defaults to false | | 320 | | `redis.poolMin` | The minimum number of connections to keep active in the Redis connection pool for a single appId (tenant). Must be lower than poolMax. Defaults to 2 | | 321 | | `redis.poolMax` | The maximum number of connections to keep active in the Redis connection pool for a single appId (tenant). Must be higher than poolMin. Defaults to 1000 | | 322 | | `redis.useIoRedis` | Use ioredis instead of redis. Defaults to false | | 323 | 324 | ### JWT parameters 325 | 326 | | Name | Description | Value | 327 | | ------------------------- | ----------------------------------------------------------------------------------------- | ----- | 328 | | `jwt.jwkUrl` | A valid URL to a JSON Web Key Sets (JWKS) | | 329 | | `jwt.key` | The secret key used to sign and verify JWTs. Generated on project scaffold | | 330 | | `jwt.keyFromSecret.name` | The secret key used to sign and verify JWTs. Generated on project scaffold (using secret) | | 331 | | `jwt.keyFromSecret.value` | The secret key used to sign and verify JWTs. Generated on project scaffold (using secret) | | 332 | | `jwt.audience` | An audience value which will be used to enforce the aud claim from inbound JWTs | | 333 | | `jwt.issuer` | An issuer value which will be used to enforce the iss claim from inbound JWTs | | 334 | | `jwt.subject` | A subject value which will be used to enforce the sub claim from inbound JWTs | | 335 | | `jwt.algs` | Any supported algorithm for decoding JWTs | | 336 | | `jwt.claimsNamespace` | A namespace within the decoded JWT under which any custom claims can be found | | 337 | 338 | ### Datasources configuration 339 | 340 | | Name | Description | Value | 341 | | ------------- | ------------------------------------------------------------------------ | -------------- | 342 | | `datasources` | map of named datasources. The first datasource has to be named "default" | { default: {}} | 343 | 344 | ### Common datasource parameters 345 | 346 | | Name | Description | Value | 347 | | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | 348 | | `datasources..type` | A database type supported by Cube.js | | 349 | | `datasources..url` | The URL for a database | | 350 | | `datasources..host` | The host URL for a database | | 351 | | `datasources..port` | The port for the database connection | | 352 | | `datasources..schema` | The schema within the database to connect to | | 353 | | `datasources..name` | The name of the database to connect to | | 354 | | `datasources..user` | The username used to connect to the database | | 355 | | `datasources..pass` | The password used to connect to the database | | 356 | | `datasources..passFromSecret.name` | The password used to connect to the database (using secret) | | 357 | | `datasources..passFromSecret.key` | The password used to connect to the database (using secret) | | 358 | | `datasources..domain` | A domain name within the database to connect to | | 359 | | `datasources..socketPath` | The path to a Unix socket for a MySQL database | | 360 | | `datasources..catalog` | The catalog within the database to connect to | | 361 | | `datasources..maxPool` | The maximum number of connections to keep active in the database connection pool | | 362 | | `datasources..queryTimeout` | The timeout value for any queries made to the database by Cube | | 363 | | `datasources..fetchColumnsByOrdinalPosition` | Force fetching of columns by ordinal positions. Certain data-providers (e.g., Redshift) do not guarantee columns in the same order on each request (e.g., SELECT \* FROM foo). This flag ensures that columns will be fetched in proper order for pre-aggregation generation. | 364 | | | 365 | | `datasources..export.name` | The name of a bucket in cloud storage | | 366 | | `datasources..export.type` | The cloud provider where the bucket is hosted (gcs, s3) | | 367 | | `datasources..export.gcs.credentials` | Base64 encoded JSON key file for connecting to Google Cloud | | 368 | | `datasources..export.gcs.credentialsFromSecret.name` | Base64 encoded JSON key file for connecting to Google Cloud (using secret) | | 369 | | `datasources..export.gcs.credentialsFromSecret.key` | Base64 encoded JSON key file for connecting to Google Cloud (using secret) | | 370 | | `datasources..export.aws.key` | The AWS Access Key ID to use for the export bucket | | 371 | | `datasources..export.aws.secret` | The AWS Secret Access Key to use for the export bucket | | 372 | | `datasources..export.aws.secretFromSecret.name` | The AWS Secret Access Key to use for the export bucket (using secret) | | 373 | | `datasources..export.aws.secretFromSecret.key` | The AWS Secret Access Key to use for the export bucket (using secret) | | 374 | | `datasources..export.aws.region` | The AWS region of the export bucket | | 375 | | `datasources..export.redshift.arn` | An ARN of an AWS IAM role with permission to write to the configured bucket (see export.name) | | 376 | | `datasources..ssl.enabled` | If true, enables SSL encryption for database connections from Cube.js | `false` | 377 | | `datasources..ssl.rejectUnAuthorized` | If true, verifies the CA chain with the system's built-in CA chain | | 378 | | `datasources..ssl.ca` | The contents of a CA bundle in PEM format, or a path to one | | 379 | | `datasources..ssl.cert` | The contents of an SSL certificate in PEM format, or a path to one | | 380 | | `datasources..ssl.key` | The contents of a private key in PEM format, or a path to one | | 381 | | `datasources..ssl.ciphers` | The ciphers used by the SSL certificate | | 382 | | `datasources..ssl.serverName` | The server name for the SNI TLS extension | | 383 | | `datasources..ssl.passPhrase` | he passphrase used to encrypt the SSL private key | | 384 | 385 | ### Athena datasource parameters 386 | 387 | | Name | Description | Value | 388 | | ------------------------------------------------- | ------------------------------------------------------------------------ | ----- | 389 | | `datasources..athena.key` | The AWS Access Key ID to use for database connections | | 390 | | `datasources..athena.keyFromSecret.name` | The AWS Access Key ID to use for database connections (using secret) | | 391 | | `datasources..athena.keyFromSecret.key` | The AWS Access Key ID to use for database connections (using secret) | | 392 | | `datasources..athena.region` | The AWS region of the Cube.js deployment | | 393 | | `datasources..athena.s3OutputLocation` | The S3 path to store query results made by the Cube.js deployment | | 394 | | `datasources..athena.secret` | The AWS Secret Access Key to use for database connections | | 395 | | `datasources..athena.secretFromSecret.name` | The AWS Secret Access Key to use for database connections (using secret) | | 396 | | `datasources..athena.secretFromSecret.key` | The AWS Secret Access Key to use for database connections (using secret) | | 397 | | `datasources..athena.workgroup` | The name of the workgroup in which the query is being started | | 398 | | `datasources..athena.catalog` | The name of the catalog to use by default | | 399 | 400 | ### Bigquery datasource parameters 401 | 402 | | Name | Description | Value | 403 | | -------------------------------------------------------- | ------------------------------------------------------------------------------- | ----- | 404 | | `datasources..bigquery.projectId` | The Google BigQuery project ID to connect to | | 405 | | `datasources..bigquery.location` | The Google BigQuery dataset location to connect to | | 406 | | `datasources..bigquery.credentials` | A Base64 encoded JSON key file for connecting to Google BigQuery | | 407 | | `datasources..bigquery.credentialsFromSecret.name` | A Base64 encoded JSON key file for connecting to Google BigQuery (using secret) | | 408 | | `datasources..bigquery.credentialsFromSecret.key` | A Base64 encoded JSON key file for connecting to Google BigQuery (using secret) | | 409 | | `datasources..bigquery.keyFile` | The path to a JSON key file for connecting to Google BigQuery | | 410 | 411 | ### Databricks datasource parameters 412 | 413 | | Name | Description | Value | 414 | | -------------------------------------------- | ------------------------------------------------------------------------- | ----- | 415 | | `datasources..databricks.url` | The URL for a JDBC connection | | 416 | | `datasources..databricks.acceptPolicy` | Whether or not to accept the license terms for the Databricks JDBC driver | | 417 | | `datasources..databricks.token` | The personal access token used to authenticate the Databricks connection | | 418 | | `datasources..databricks.catalog` | Databricks catalog name | | 419 | 420 | ### DuckDB datasource parameters 421 | 422 | | Name | Description | Value | 423 | | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------- | 424 | | `datasources..duckdb.memoryLimit` | The maximum memory limit for DuckDB. Equivalent to SET memory_limit=. Default is 75% of available RAM | | 425 | | `datasources..duckdb.schema` | The default search schema | | 426 | | `datasources..duckdb.motherduckToken` | The service token to use for connections to MotherDuck | | 427 | | `datasources..duckdb.databasePath` | The database filepath to use for connection to a local database. | | 428 | | `datasources..duckdb.s3.accessKeyId` | The Access Key ID to use for database connections | | 429 | | `datasources..duckdb.s3.secretAccessKey` | The Secret Access Key to use for database connections | | 430 | | `datasources..duckdb.s3.secretAccessKeyFromSecret.name` | The Secret Access Key to use for database connections (using secret) | | 431 | | `datasources..duckdb.s3.secretAccessKeyFromSecret.key` | The Secret Access Key to use for database connections (using secret) | | 432 | | `datasources..duckdb.s3.endpoint` | The S3 endpoint | | 433 | | `datasources..duckdb.s3.region` | The region of the bucket | | 434 | | `datasources..duckdb.s3.useSSL` | Use SSL for connection | | 435 | | `datasources..duckdb.s3.urlStyle` | To choose the S3 URL style(vhost or path) | `vhost` \| `path` | 436 | | `datasources..duckdb.s3.sessionToken` | The token for the S3 session | | 437 | 438 | ### Clickhouse datasource parameters 439 | 440 | | Name | Description | Value | 441 | | ---------------------------------------- | ------------------------------------------------------- | ----- | 442 | | `datasources..clickhouse.readonly` | Whether the ClickHouse user has read-only access or not | | 443 | 444 | ### Firebolt datasource parameters 445 | 446 | | Name | Description | Value | 447 | | ----------------------------------------- | ---------------------------------------------- | ----- | 448 | | `datasources..firebolt.account` | Account name | | 449 | | `datasources..firebolt.engineName` | Engine name to connect to | | 450 | | `datasources..firebolt.apiEndpoint` | Firebolt API endpoint. Used for authentication | | 451 | 452 | ### Hive datasource parameters 453 | 454 | | Name | Description | Value | 455 | | --------------------------------------- | ----------------------------------------------- | ----- | 456 | | `datasources..hive.cdhVersion` | The version of the CDH instance for Apache Hive | | 457 | | `datasources..hive.thriftVersion` | The version of Thrift Server for Apache Hive | | 458 | | `datasources..hive.type` | The type of Apache Hive server | | 459 | | `datasources..hive.version` | The version of Apache Hive | | 460 | 461 | ### Materialize datasource parameters 462 | 463 | | Name | Description | Value | 464 | | ---------------------------------------- | ------------------------------------------------- | ----- | 465 | | `datasources..materialize.cluster` | The name of the Materialize cluster to connect to | | 466 | 467 | ### Presto datasource parameters 468 | 469 | | Name | Description | Value | 470 | | ----------------------------------- | --------------------------------------- | ----- | 471 | | `datasources..presto.catalog` | The catalog within Presto to connect to | | 472 | 473 | ### Snowflake datasource parameters 474 | 475 | | Name | Description | Value | 476 | | ----------------------------------------------------- | ---------------------------------------------------------------------- | ----- | 477 | | `datasources..snowFlake.account` | The Snowflake account ID to use when connecting to the database | | 478 | | `datasources..snowFlake.region` | The Snowflake region to use when connecting to the database | | 479 | | `datasources..snowFlake.role` | The Snowflake role to use when connecting to the database | | 480 | | `datasources..snowFlake.warehouse` | The Snowflake warehouse to use when connecting to the database | | 481 | | `datasources..snowFlake.clientSessionKeepAlive` | If true, keep the Snowflake connection alive indefinitely | | 482 | | `datasources..snowFlake.authenticator` | The type of authenticator to use with Snowflake. Defaults to SNOWFLAKE | | 483 | | `datasources..snowFlake.privateKeyPath` | The path to the private RSA key folder | | 484 | | `datasources..snowFlake.privateKeyPass` | The password for the private RSA key. Only required for encrypted keys | | 485 | 486 | ### Trino datasource parameters 487 | 488 | | Name | Description | Value | 489 | | ---------------------------------- | -------------------------------------- | ----- | 490 | | `datasources..trino.catalog` | The catalog within Trino to connect to | | 491 | 492 | ### Cubestore parameters 493 | 494 | | Name | Description | Value | 495 | | ---------------- | ----------------------------------------- | ----- | 496 | | `cubestore.host` | The hostname of the Cube Store deployment | | 497 | | `cubestore.port` | The port of the Cube Store deployment | 3030 | 498 | 499 | ### Api instance parameters 500 | 501 | | Name | Description | Value | 502 | | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------- | 503 | | `api.serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | 504 | | `api.serviceAccount.name` | Name of the service account to use. If not set and create is true, a name is generated using the fullname template. | `""` | 505 | | `api.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `true` | 506 | | `api.serviceAccount.annotations` | Annotations for service account. Evaluated as a template. Only used if create is true. | `{}` | 507 | | `api.apiCount` | Number of api instances to deploy | `1` | 508 | | `api.affinity` | Affinity for pod assignment | `{}` | 509 | | `api.spreadConstraints` | Topology spread constraint for pod assignment | `[]` | 510 | | `api.resources` | Define resources requests and limits for single Pods | `{}` | 511 | | `api.livenessProbe.enabled` | Enable livenessProbe | `true` | 512 | | `api.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `10` | 513 | | `api.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `30` | 514 | | `api.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `3` | 515 | | `api.livenessProbe.successThreshold` | Failure threshold for livenessProbe | `1` | 516 | | `api.livenessProbe.failureThreshold` | Success threshold for livenessProbe | `3` | 517 | | `api.readinessProbe.enabled` | Enable readinessProbe | `true` | 518 | | `api.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` | 519 | | `api.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `30` | 520 | | `api.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `3` | 521 | | `api.readinessProbe.successThreshold` | Failure threshold for readinessProbe | `1` | 522 | | `api.readinessProbe.failureThreshold` | Success threshold for readinessProbe | `3` | 523 | | `api.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | 524 | | `api.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | 525 | | `api.extraEnvVars` | Extra environment variables to pass on to the pod. The value is evaluated as a template | `[]` | 526 | | `api.extraEnvVarsFromConfigMap` | Name of a Config Map containing extra environment variables to pass on to the pod | | 527 | | `api.extraEnvVarsFromSecret` | Name of a Secret containing extra environment variables to pass on to the pod | | 528 | 529 | ### Worker parameters 530 | 531 | | Name | Description | Value | 532 | | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------- | 533 | | `worker.enabled` | Set to true to enable refresh worker | `true` | 534 | | `worker.serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | 535 | | `worker.serviceAccount.name` | Name of the service account to use. If not set and create is true, a name is generated using the fullname template. | `""` | 536 | | `worker.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `true` | 537 | | `worker.serviceAccount.annotations` | Annotations for service account. Evaluated as a template. Only used if create is true. | `{}` | 538 | | `worker.affinity` | Affinity for pod assignment | `{}` | 539 | | `worker.spreadConstraints` | Topology spread constraint for pod assignment | `[]` | 540 | | `worker.resources` | Define resources requests and limits for single Pods | `{}` | 541 | | `worker.livenessProbe.enabled` | Enable livenessProbe | `true` | 542 | | `worker.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `10` | 543 | | `worker.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `30` | 544 | | `worker.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `3` | 545 | | `worker.livenessProbe.successThreshold` | Failure threshold for livenessProbe | `1` | 546 | | `worker.livenessProbe.failureThreshold` | Success threshold for livenessProbe | `3` | 547 | | `worker.readinessProbe.enabled` | Enable readinessProbe | `true` | 548 | | `worker.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` | 549 | | `worker.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `30` | 550 | | `worker.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `3` | 551 | | `worker.readinessProbe.successThreshold` | Failure threshold for readinessProbe | `1` | 552 | | `worker.readinessProbe.failureThreshold` | Success threshold for readinessProbe | `3` | 553 | | `worker.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | 554 | | `worker.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | 555 | | `worker.extraEnvVars` | Extra environment variables to pass on to the pod. The value is evaluated as a template | `[]` | 556 | | `worker.extraEnvVarsFromConfigMap` | Name of a Config Map containing extra environment variables to pass on to the pod | | 557 | | `worker.extraEnvVarsFromSecret` | Name of a Secret containing extra environment variables to pass on to the pod | | 558 | 559 | ## Ingress parameters 560 | 561 | | Name | Description | Value | 562 | | -------------------------- | ------------------------------------------------------------------------------- | ------------------------ | 563 | | `ingress.enabled` | Set to true to enable ingress record generation | `false` | 564 | | `ingress.hostname` | When the ingress is enabled, a host pointing to this will be created | `cube.local` | 565 | | `ingress.path` | The Path to Cube | `/` | 566 | | `ingress.pathPrefix` | The PathPrefix | `ImplementationSpecific` | 567 | | `ingress.ingressClassName` | The Ingress class name | | 568 | | `ingress.annotations` | Ingress annotations | `{}` | 569 | | `ingress.tls` | Enable TLS configuration for the hostname defined at ingress.hostname parameter | `false` | 570 | -------------------------------------------------------------------------------- /charts/cube/templates/_env.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env" -}} 2 | {{- include "cube.env.config" . }} 3 | {{- include "cube.env.jwt" . }} 4 | {{- include "cube.env.redis" . }} 5 | {{- include "cube.env.cubestore" . }} 6 | 7 | {{- $datasources := list }} 8 | {{- range $e, $i := $.Values.datasources }} 9 | {{- $datasources = append $datasources $e }} 10 | {{- if not $i.type }} 11 | {{- fail (printf "database.%s.type is required" $e) }} 12 | {{- end }} 13 | {{- include "cube.env.database.common" (set $i "datasource" $e) }} 14 | {{- if eq $i.type "athena" }} 15 | {{- include "cube.env.database.athena" (set $i "datasource" $e) }} 16 | {{- end }} 17 | {{- if eq $i.type "bigquery" }} 18 | {{- include "cube.env.database.bigquery" (set $i "datasource" $e) }} 19 | {{- end }} 20 | {{- if eq $i.type "clickhouse" }} 21 | {{- include "cube.env.database.clickhouse" (set $i "datasource" $e) }} 22 | {{- end }} 23 | {{- if eq $i.type "databricks-jdbc" }} 24 | {{- include "cube.env.database.databricks" (set $i "datasource" $e) }} 25 | {{- end }} 26 | {{- if eq $i.type "duckdb" }} 27 | {{- include "cube.env.database.duckdb" (set $i "datasource" $e) }} 28 | {{- end }} 29 | {{- if eq $i.type "elasticsearch" }} 30 | {{- include "cube.env.database.elasticsearch" (set $i "datasource" $e) }} 31 | {{- end }} 32 | {{- if eq $i.type "firebolt" }} 33 | {{- include "cube.env.database.firebolt" (set $i "datasource" $e) }} 34 | {{- end }} 35 | {{- if eq $i.type "hive" }} 36 | {{- include "cube.env.database.hive" (set $i "datasource" $e) }} 37 | {{- end }} 38 | {{- if eq $i.type "materialize" }} 39 | {{- include "cube.env.database.materialize" (set $i "datasource" $e) }} 40 | {{- end }} 41 | {{- if eq $i.type "prestodb" }} 42 | {{- include "cube.env.database.presto" (set $i "datasource" $e) }} 43 | {{- end }} 44 | {{- if eq $i.type "snowflake" }} 45 | {{- include "cube.env.database.snowflake" (set $i "datasource" $e) }} 46 | {{- end }} 47 | {{- if eq $i.type "trino" }} 48 | {{- include "cube.env.database.trino" (set $i "datasource" $e) }} 49 | {{- end }} 50 | {{- end }} 51 | {{- if gt (len $datasources) 1 }} 52 | - name: CUBEJS_DATASOURCES 53 | value: {{ join "," $datasources | quote }} 54 | {{- end }} 55 | {{- end }} 56 | -------------------------------------------------------------------------------- /charts/cube/templates/_env_config.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.config" -}} 2 | - name: PORT 3 | value: {{ .Values.config.apiPort | quote }} 4 | {{- if .Values.config.debug }} 5 | - name: DEBUG_LOG 6 | value: {{ .Values.config.debug | quote }} 7 | {{- end }} 8 | {{- if .Values.config.pgSqlPort }} 9 | - name: CUBEJS_PG_SQL_PORT 10 | value: {{ .Values.config.pgSqlPort | quote }} 11 | {{- end }} 12 | {{- if .Values.config.sqlUser }} 13 | - name: CUBEJS_SQL_USER 14 | value: {{ .Values.config.sqlUser | quote }} 15 | {{- end }} 16 | {{- if .Values.config.sqlPassword }} 17 | - name: CUBEJS_SQL_PASSWORD 18 | value: {{ .Values.config.sqlPassword | quote }} 19 | {{- else if .Values.config.sqlPasswordFromSecret }} 20 | - name: CUBEJS_SQL_PASSWORD 21 | valueFrom: 22 | secretKeyRef: 23 | name: {{ .Values.config.sqlPasswordFromSecret.name | required "config.sqlPasswordFromSecret.name is required" }} 24 | key: {{ .Values.config.sqlPasswordFromSecret.key | required "config.sqlPasswordFromSecret.key is required" }} 25 | {{- end }} 26 | {{- if .Values.config.devMode }} 27 | - name: CUBEJS_DEV_MODE 28 | value: {{ .Values.config.devMode | quote }} 29 | {{- end }} 30 | {{- if .Values.config.logLevel }} 31 | - name: CUBEJS_LOG_LEVEL 32 | value: {{ .Values.config.logLevel | quote }} 33 | {{- end }} 34 | {{- if .Values.config.app }} 35 | - name: CUBEJS_APP 36 | value: {{ .Values.config.app | quote }} 37 | {{- end }} 38 | {{- if .Values.config.cacheAndQueueDriver }} 39 | - name: CUBEJS_CACHE_AND_QUEUE_DRIVER 40 | value: {{ .Values.config.cacheAndQueueDriver | quote }} 41 | {{- end }} 42 | {{- if .Values.config.concurrency }} 43 | - name: CUBEJS_CONCURRENCY 44 | value: {{ .Values.config.concurrency | quote }} 45 | {{- end }} 46 | {{- if .Values.config.rollupOnly }} 47 | - name: CUBEJS_ROLLUP_ONLY 48 | value: {{ .Values.config.rollupOnly | quote }} 49 | {{- end }} 50 | {{- if .Values.config.scheduledRefreshTimezones }} 51 | - name: CUBEJS_SCHEDULED_REFRESH_TIMEZONES 52 | value: {{ .Values.config.scheduledRefreshTimezones | quote }} 53 | {{- end }} 54 | {{- if .Values.config.scheduledRefreshConcurrency }} 55 | - name: CUBEJS_SCHEDULED_REFRESH_CONCURRENCY 56 | value: {{ .Values.config.scheduledRefreshConcurrency | quote }} 57 | {{- end }} 58 | {{- if .Values.config.preAggregationsSchema }} 59 | - name: CUBEJS_PRE_AGGREGATIONS_SCHEMA 60 | value: {{ .Values.config.preAggregationsSchema | quote }} 61 | {{- end }} 62 | {{- if .Values.config.webSockets }} 63 | - name: CUBEJS_WEB_SOCKETS 64 | value: {{ .Values.config.webSockets | quote }} 65 | {{- end }} 66 | - name: CUBEJS_TELEMETRY 67 | value: {{ .Values.config.telemetry | quote }} 68 | {{- if .Values.config.apiSecret }} 69 | - name: CUBEJS_API_SECRET 70 | value: {{ .Values.config.apiSecret | quote }} 71 | {{- else if .Values.config.apiSecretFromSecret }} 72 | - name: CUBEJS_API_SECRET 73 | valueFrom: 74 | secretKeyRef: 75 | name: {{ .Values.config.apiSecretFromSecret.name | required "config.apiSecretFromSecret.name is required" }} 76 | key: {{ .Values.config.apiSecretFromSecret.key | required "config.apiSecretFromSecret.key is required" }} 77 | {{- end }} 78 | {{- if .Values.config.playgroundAuthSecret }} 79 | - name: CUBEJS_PLAYGROUND_AUTH_SECRET 80 | value: {{ .Values.config.playgroundAuthSecret | quote }} 81 | {{- else if .Values.config.playgroundAuthSecretFromSecret }} 82 | - name: CUBEJS_PLAYGROUND_AUTH_SECRET 83 | valueFrom: 84 | secretKeyRef: 85 | name: {{ .Values.config.playgroundAuthSecretFromSecret.name | required "config.playgroundAuthSecretFromSecret.name is required" }} 86 | key: {{ .Values.config.playgroundAuthSecretFromSecret.key | required "config.playgroundAuthSecretFromSecret.key is required" }} 87 | {{- end }} 88 | {{- if .Values.config.schemaPath }} 89 | - name: CUBEJS_SCHEMA_PATH 90 | value: {{ .Values.config.schemaPath | quote }} 91 | {{- end }} 92 | {{- if .Values.config.topicName }} 93 | - name: CUBEJS_TOPIC_NAME 94 | value: {{ .Values.config.topicName | quote }} 95 | {{- end }} 96 | {{- if .Values.config.dropPreAggWithoutTouch }} 97 | - name: CUBEJS_DROP_PRE_AGG_WITHOUT_TOUCH 98 | value: {{ .Values.config.dropPreAggWithoutTouch | quote }} 99 | {{- end }} 100 | {{- if .Values.config.touchPreAggTimeout }} 101 | - name: CUBEJS_TOUCH_PRE_AGG_TIMEOUT 102 | value: {{ .Values.config.touchPreAggTimeout | quote }} 103 | {{- end }} 104 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_cubestore.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.cubestore" -}} 2 | {{- if .Values.cubestore.host }} 3 | - name: CUBEJS_CUBESTORE_HOST 4 | value: {{ .Values.cubestore.host | quote }} 5 | {{- end }} 6 | {{- if .Values.cubestore.port }} 7 | - name: CUBEJS_CUBESTORE_PORT 8 | value: {{ .Values.cubestore.port | quote }} 9 | {{- end }} 10 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_db_athena.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.database.athena" }} 2 | {{- if (.athena).key }} 3 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_AWS_KEY" "datasource" .datasource) }} 4 | value: {{ .athena.key | quote }} 5 | {{- end }} 6 | {{- if (.athena).secret }} 7 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_AWS_SECRET" "datasource" .datasource) }} 8 | value: {{ .athena.secret | quote }} 9 | {{- end }} 10 | {{- if (.athena).region }} 11 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_AWS_REGION" "datasource" .datasource) }} 12 | value: {{ .athena.region | quote }} 13 | {{- end }} 14 | {{- if (.athena).s3OutputLocation }} 15 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_AWS_S3_OUTPUT_LOCATION" "datasource" .datasource) }} 16 | value: {{ .athena.s3OutputLocation | quote }} 17 | {{- end }} 18 | {{- if (.athena).workgroup }} 19 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_AWS_ATHENA_WORKGROUP" "datasource" .datasource) }} 20 | value: {{ .athena.workgroup | quote }} 21 | {{- end }} 22 | {{- if (.athena).catalog }} 23 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_AWS_ATHENA_CATALOG" "datasource" .datasource) }} 24 | value: {{ .athena.catalog | quote }} 25 | {{- end }} 26 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_db_bigquery.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.database.bigquery" }} 2 | {{- if (.bigquery).projectId }} 3 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_BQ_PROJECT_ID" "datasource" .datasource) }} 4 | value: {{ .bigquery.projectId | quote }} 5 | {{- end }} 6 | {{- if (.bigquery).location }} 7 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_BQ_LOCATION" "datasource" .datasource) }} 8 | value: {{ .bigquery.location | quote }} 9 | {{- end }} 10 | {{- if (.bigquery).credentials }} 11 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_BQ_CREDENTIALS" "datasource" .datasource) }} 12 | value: {{ .bigquery.credentials | quote }} 13 | {{- else if (.bigquery).credentialsFromSecret }} 14 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_BQ_CREDENTIALS" "datasource" .datasource) }} 15 | valueFrom: 16 | secretKeyRef: 17 | name: {{ .bigquery.credentialsFromSecret.name | required "bigquery.credentialsFromSecret.name is required" }} 18 | key: {{ .bigquery.credentialsFromSecret.key | required "bigquery.credentialsFromSecret.key is required" }} 19 | {{- end }} 20 | {{- if (.bigquery).keyFile }} 21 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_BQ_KEY_FILE" "datasource" .datasource) }} 22 | value: {{ .bigquery.keyFile }} 23 | {{- end }} 24 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_db_clickhouse.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.database.clickhouse" }} 2 | {{- if (.clickhouse).readOnly }} 3 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_CLICKHOUSE_READONLY" "datasource" .datasource) }} 4 | value: {{ .clickhouse.readOnly | quote }} 5 | {{- end }} 6 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_db_common.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.database.common" }} 2 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_TYPE" "datasource" .datasource) }} 3 | value: {{ .type | quote | required "database.type is required" }} 4 | {{- if .url }} 5 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_URL" "datasource" .datasource) }} 6 | value: {{ .url | quote }} 7 | {{- end }} 8 | {{- if .host }} 9 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_HOST" "datasource" .datasource) }} 10 | value: {{ .host | quote }} 11 | {{- end }} 12 | {{- if .port }} 13 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_PORT" "datasource" .datasource) }} 14 | value: {{ .port | quote }} 15 | {{- end }} 16 | {{- if .schema }} 17 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SCHEMA" "datasource" .datasource) }} 18 | value: {{ .schema | quote }} 19 | {{- end }} 20 | {{- if .name }} 21 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_NAME" "datasource" .datasource) }} 22 | value: {{ .name | quote }} 23 | {{- end }} 24 | {{- if .user }} 25 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_USER" "datasource" .datasource) }} 26 | value: {{ .user | quote }} 27 | {{- end }} 28 | {{- if .pass }} 29 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_PASS" "datasource" .datasource) }} 30 | value: {{ .pass | quote }} 31 | {{- else if .passFromSecret }} 32 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_PASS" "datasource" .datasource) }} 33 | valueFrom: 34 | secretKeyRef: 35 | name: {{ .passFromSecret.name | required "database.passFromSecret.name is required" }} 36 | key: {{ .passFromSecret.key | required "database.passFromSecret.key is required" }} 37 | {{- end }} 38 | {{- if .domain }} 39 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DOMAIN" "datasource" .datasource) }} 40 | value: {{ .domain | quote }} 41 | {{- end }} 42 | {{- if .socketPath }} 43 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SOCKET_PATH" "datasource" .datasource) }} 44 | value: {{ .socketPath | quote }} 45 | {{- end }} 46 | {{- if .catalog }} 47 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_CATALOG" "datasource" .datasource) }} 48 | value: {{ .catalog | quote }} 49 | {{- end }} 50 | {{- if .maxPool }} 51 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_MAX_POOL" "datasource" .datasource) }} 52 | value: {{ .maxPool | quote }} 53 | {{- end }} 54 | {{- if .queryTimeout }} 55 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_QUERY_TIMEOUT" "datasource" .datasource) }} 56 | value: {{ .queryTimeout | quote }} 57 | {{- end }} 58 | {{- if .fetchColumnsByOrdinalPosition }} 59 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_FETCH_COLUMNS_BY_ORDINAL_POSITION" "datasource" .datasource) }} 60 | value: {{ .fetchColumnsByOrdinalPosition | quote }} 61 | {{- end }} 62 | {{- if (.export).name }} 63 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_EXPORT_BUCKET" "datasource" .datasource) }} 64 | value: {{ .export.name | quote }} 65 | {{- end }} 66 | {{- if (.export).type }} 67 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_EXPORT_BUCKET_TYPE" "datasource" .datasource) }} 68 | value: {{ .export.type | quote }} 69 | {{- end }} 70 | {{- if (.export).integration }} 71 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_EXPORT_INTEGRATION" "datasource" .datasource) }} 72 | value: {{ .export.integration | quote }} 73 | {{- end }} 74 | {{- if ((.export).gcs).credentials }} 75 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_EXPORT_GCS_CREDENTIALS" "datasource" .datasource) }} 76 | value: {{ .export.gcs.credentials | quote }} 77 | {{- else if ((.export).gcs).credentialsFromSecret }} 78 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_EXPORT_GCS_CREDENTIALS" "datasource" .datasource) }} 79 | valueFrom: 80 | secretKeyRef: 81 | name: {{ .export.gcs.credentialsFromSecret.name | required "export.gcs.credentialsFromSecret.name is required" }} 82 | key: {{ .export.gcs.credentialsFromSecret.key | required "export.gcs.credentialsFromSecret.key is required" }} 83 | {{- end }} 84 | {{- if ((.export).aws).key }} 85 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_EXPORT_BUCKET_AWS_KEY" "datasource" .datasource) }} 86 | value: {{ .export.aws.key | quote }} 87 | {{- else if ((.export).aws).keyFromSecret }} 88 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_EXPORT_BUCKET_AWS_KEY" "datasource" .datasource) }} 89 | valueFrom: 90 | secretKeyRef: 91 | name: {{ .export.aws.keyFromSecret.name | required "export.aws.keyFromSecret.name is required" }} 92 | key: {{ .export.aws.keyFromSecret.key | required "export.aws.keyFromSecret.key is required" }} 93 | {{- end }} 94 | {{- if ((.export).aws).secret }} 95 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET" "datasource" .datasource) }} 96 | value: {{ .export.aws.secret | quote }} 97 | {{- else if ((.export).aws).secretFromSecret }} 98 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET" "datasource" .datasource) }} 99 | valueFrom: 100 | secretKeyRef: 101 | name: {{ .export.aws.secretFromSecret.name | required "export.aws.secretFromSecret.name is required" }} 102 | key: {{ .export.aws.secretFromSecret.key | required "export.aws.secretFromSecret.key is required" }} 103 | {{- end }} 104 | {{- if ((.export).aws).region }} 105 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_EXPORT_BUCKET_AWS_REGION" "datasource" .datasource) }} 106 | value: {{ .export.aws.region | quote }} 107 | {{- end }} 108 | {{- if ((.export).redshift).arn }} 109 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_EXPORT_BUCKET_REDSHIFT_ARN" "datasource" .datasource) }} 110 | value: {{ .export.redshift.arn | quote }} 111 | {{- end }} 112 | {{- if (.ssl).enabled }} 113 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SSL" "datasource" .datasource) }} 114 | value: "true" 115 | {{- if (.ssl).rejectUnAuthorized }} 116 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SSL_REJECT_UNAUTHORIZED" "datasource" .datasource) }} 117 | value: {{ .ssl.rejectUnAuthorized | quote }} 118 | {{- end }} 119 | {{- if (.ssl).ca }} 120 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SSL_CA" "datasource" .datasource) }} 121 | value: {{ .ssl.ca | quote }} 122 | {{- end }} 123 | {{- if (.ssl).cert }} 124 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SSL_CERT" "datasource" .datasource) }} 125 | value: {{ .ssl.cert | quote }} 126 | {{- end }} 127 | {{- if (.ssl).key }} 128 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SSL_KEY" "datasource" .datasource) }} 129 | value: {{ .ssl.key | quote }} 130 | {{- end }} 131 | {{- if (.ssl).ciphers }} 132 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SSL_CIPHERS" "datasource" .datasource) }} 133 | value: {{ .ssl.ciphers | quote }} 134 | {{- end }} 135 | {{- if (.ssl).serverName }} 136 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SSL_SERVERNAME" "datasource" .datasource) }} 137 | value: {{ .ssl.serverName | quote }} 138 | {{- end }} 139 | {{- if (.ssl).passPhrase }} 140 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SSL_PASSPHRASE" "datasource" .datasource) }} 141 | value: {{ .ssl.passPhrase | quote }} 142 | {{- end }} 143 | {{- end }} 144 | 145 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_db_databricks.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.database.databricks" }} 2 | {{- if (.databricks).url }} 3 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DATABRICKS_URL" "datasource" .datasource) }} 4 | value: {{ .databricks.url | quote }} 5 | {{- end }} 6 | {{- if (.databricks).acceptPolicy }} 7 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DATABRICKS_ACCEPT_POLICY" "datasource" .datasource) }} 8 | value: {{ .databricks.acceptPolicy | quote }} 9 | {{- end }} 10 | {{- if (.databricks).token }} 11 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DATABRICKS_TOKEN" "datasource" .datasource) }} 12 | value: {{ .databricks.token | quote }} 13 | {{- end }} 14 | {{- if (.databricks).catalog }} 15 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DATABRICKS_CATALOG" "datasource" .datasource) }} 16 | value: {{ .databricks.catalog | quote }} 17 | {{- end }} 18 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_db_duckdb.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.database.duckdb" }} 2 | {{- if (.duckdb).memoryLimit }} 3 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DUCKDB_MEMORY_LIMIT" "datasource" .datasource) }} 4 | value: {{ .duckdb.memoryLimit | quote }} 5 | {{- end }} 6 | {{- if (.duckdb).schema }} 7 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DUCKDB_SCHEMA" "datasource" .datasource) }} 8 | value: {{ .duckdb.schema | quote }} 9 | {{- end }} 10 | {{- if (.duckdb).motherduckToken }} 11 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DUCKDB_MOTHERDUCK_TOKEN" "datasource" .datasource) }} 12 | value: {{ .duckdb.motherduckToken | quote }} 13 | {{- end }} 14 | {{- if (.duckdb).databasePath }} 15 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DUCKDB_DATABASE_PATH" "datasource" .datasource) }} 16 | value: {{ .duckdb.databasePath | quote }} 17 | {{- end }} 18 | {{- if (.duckdb).s3.accessKeyId }} 19 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DUCKDB_S3_ACCESS_KEY_ID" "datasource" .datasource) }} 20 | value: {{ .duckdb.s3.accessKeyId | quote }} 21 | {{- end }} 22 | {{- if (.duckdb).s3.secretAccessKey }} 23 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DUCKDB_S3_SECRET_ACCESS_KEY" "datasource" .datasource) }} 24 | value: {{ .duckdb.s3.secretAccessKey | quote }} 25 | {{- else if (.duckdb).s3.secretAccessKeyFromSecret }} 26 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DUCKDB_S3_SECRET_ACCESS_KEY" "datasource" .datasource) }} 27 | valueFrom: 28 | secretKeyRef: 29 | name: {{ .bigquery.s3.secretAccessKeyFromSecret.name | required "duckdb.s3.secretAccessKeyFromSecret.name is required" }} 30 | key: {{ .bigquery.s3.secretAccessKeyFromSecret.key | required "bigqduckdbuery.s3.secretAccessKeyFromSecret.key is required" }} 31 | {{- end }} 32 | {{- if (.duckdb).s3.endpoint }} 33 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DUCKDB_S3_ENDPOINT" "datasource" .datasource) }} 34 | value: {{ .duckdb.s3.endpoint | quote }} 35 | {{- end }} 36 | {{- if (.duckdb).s3.region }} 37 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DUCKDB_S3_REGION" "datasource" .datasource) }} 38 | value: {{ .duckdb.s3.region | quote }} 39 | {{- end }} 40 | {{- if (.duckdb).s3.useSSL }} 41 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DUCKDB_S3_USE_SSL" "datasource" .datasource) }} 42 | value: {{ .duckdb.s3.useSSL | quote }} 43 | {{- end }} 44 | {{- if (.duckdb).s3.URLStyle }} 45 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DUCKDB_S3_URL_STYLE" "datasource" .datasource) }} 46 | value: {{ .duckdb.s3.URLStyle | quote }} 47 | {{- end }} 48 | {{- if (.duckdb).s3.sessionToken }} 49 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_DUCKDB_S3_SESSION_TOKEN" "datasource" .datasource) }} 50 | value: {{ .duckdb.s3.sessionToken | quote }} 51 | {{- end }} 52 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_db_elasticsearch.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.database.elasticsearch" }} 2 | {{- if (.elasticsearch).queryFormat }} 3 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_ELASTIC_QUERY_FORMAT" "datasource" .datasource) }} 4 | value: {{ .elasticsearch.queryFormat | quote }} 5 | {{- end }} 6 | {{- if (.elasticsearch).openDistro }} 7 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_ELASTIC_OPENDISTRO" "datasource" .datasource) }} 8 | value: {{ .elasticsearch.openDistro | quote }} 9 | {{- end }} 10 | {{- if (.elasticsearch).apiKeyId }} 11 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_ELASTIC_APIKEY_ID" "datasource" .datasource) }} 12 | value: {{ .elasticsearch.apiKeyId | quote }} 13 | {{- end }} 14 | {{- if (.elasticsearch).apiKeyKey }} 15 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_ELASTIC_APIKEY_KEY" "datasource" .datasource) }} 16 | value: {{ .elasticsearch.apiKeyKey | quote }} 17 | {{- end }} 18 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_db_firebolt.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.database.firebolt" }} 2 | {{- if (.firebolt).account }} 3 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_FIREBOLT_ACCOUNT" "datasource" .datasource) }} 4 | value: {{ .firebolt.account | quote }} 5 | {{- end }} 6 | {{- if (.firebolt).engineName }} 7 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_FIREBOLT_ENGINE_NAME" "datasource" .datasource) }} 8 | value: {{ .firebolt.engineName | quote }} 9 | {{- end }} 10 | {{- if (.firebolt).apiEndpoint }} 11 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_FIREBOLT_API_ENDPOINT" "datasource" .datasource) }} 12 | value: {{ .firebolt.apiEndpoint | quote }} 13 | {{- end }} 14 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_db_hive.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.database.hive" }} 2 | {{- if (.hive).type }} 3 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_HIVE_TYPE" "datasource" .datasource) }} 4 | value: {{ .hive.type | quote }} 5 | {{- end }} 6 | {{- if (.hive).version }} 7 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_HIVE_VER" "datasource" .datasource) }} 8 | value: {{ .hive.version | quote }} 9 | {{- end }} 10 | {{- if (.hive).thriftVersion }} 11 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_HIVE_THRIFT_VER" "datasource" .datasource) }} 12 | value: {{ .hive.thriftVersion | quote }} 13 | {{- end }} 14 | {{- if (.hive).cdhVersion }} 15 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_HIVE_CDH_VER" "datasource" .datasource) }} 16 | value: {{ .hive.cdhVersion | quote }} 17 | {{- end }} 18 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_db_materialize.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.database.materialize" }} 2 | {{- if (.materialize).cluster }} 3 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_MATERIALIZE_CLUSTER" "datasource" .datasource) }} 4 | value: {{ .materialize.cluster | quote }} 5 | {{- end }} 6 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_db_presto.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.database.presto" }} 2 | {{- if (.presto).catalog }} 3 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_PRESTO_CATALOG" "datasource" .datasource) }} 4 | value: {{ .presto.catalog | quote }} 5 | {{- end }} 6 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_db_snowflake.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.database.snowflake" }} 2 | {{- if (.snowFlake).account }} 3 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SNOWFLAKE_ACCOUNT" "datasource" .datasource) }} 4 | value: {{ .snowFlake.account | quote }} 5 | {{- end }} 6 | {{- if (.snowFlake).region }} 7 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SNOWFLAKE_REGION" "datasource" .datasource) }} 8 | value: {{ .snowFlake.region | quote }} 9 | {{- end }} 10 | {{- if (.snowFlake).role }} 11 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SNOWFLAKE_ROLE" "datasource" .datasource) }} 12 | value: {{ .snowFlake.role | quote }} 13 | {{- end }} 14 | {{- if (.snowFlake).warehouse }} 15 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SNOWFLAKE_WAREHOUSE" "datasource" .datasource) }} 16 | value: {{ .snowFlake.warehouse | quote }} 17 | {{- end }} 18 | {{- if (.snowFlake).clientSessionKeepAlive }} 19 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SNOWFLAKE_CLIENT_SESSION_KEEP_ALIVE" "datasource" .datasource) }} 20 | value: {{ .snowFlake.clientSessionKeepAlive | quote }} 21 | {{- end }} 22 | {{- if (.snowFlake).authenticator }} 23 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SNOWFLAKE_AUTHENTICATOR" "datasource" .datasource) }} 24 | value: {{ .snowFlake.authenticator | quote }} 25 | {{- end }} 26 | {{- if (.snowFlake).privateKeyPath }} 27 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SNOWFLAKE_PRIVATE_KEY_PATH" "datasource" .datasource) }} 28 | value: {{ .snowFlake.privateKeyPath | quote }} 29 | {{- end }} 30 | {{- if (.snowFlake).urprivateKeyPassl }} 31 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_SNOWFLAKE_PRIVATE_KEY_PASS" "datasource" .datasource) }} 32 | value: {{ .snowFlake.privateKeyPass | quote }} 33 | {{- end }} 34 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_db_trino.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.database.trino" }} 2 | {{- if (.trino).catalog }} 3 | - name: {{ include "cube.env.decorated" (dict "key" "CUBEJS_DB_PRESTO_CATALOG" "datasource" .datasource) }} 4 | value: {{ .trino.catalog | quote }} 5 | {{- end }} 6 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_jwt.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.jwt" -}} 2 | {{- if .Values.jwt.jwkUrl }} 3 | - name: CUBEJS_JWK_URL 4 | value: {{ .Values.jwt.jwkUrl | quote }} 5 | {{- end }} 6 | {{- if .Values.jwt.key }} 7 | - name: CUBEJS_JWT_KEY 8 | value: {{ .Values.jwt.key | quote }} 9 | {{- else if .Values.jwt.keyFromSecret }} 10 | - name: CUBEJS_JWT_KEY 11 | valueFrom: 12 | secretKeyRef: 13 | name: {{ .Values.jwt.keyFromSecret.name | required "jwt.keyFromSecret.name is required" }} 14 | key: {{ .Values.jwt.keyFromSecret.key | required "jwt.keyFromSecret.key is required" }} 15 | {{- end }} 16 | {{- if .Values.jwt.audience }} 17 | - name: CUBEJS_JWT_AUDIENCE 18 | value: {{ .Values.jwt.audience | quote }} 19 | {{- end }} 20 | {{- if .Values.jwt.issuer }} 21 | - name: CUBEJS_JWT_ISSUER 22 | value: {{ .Values.jwt.issuer | quote }} 23 | {{- end }} 24 | {{- if .Values.jwt.subject }} 25 | - name: CUBEJS_JWT_SUBJECT 26 | value: {{ .Values.jwt.subject | quote }} 27 | {{- end }} 28 | {{- if .Values.jwt.algs }} 29 | - name: CUBEJS_JWT_ALGS 30 | value: {{ .Values.jwt.algs | quote }} 31 | {{- end }} 32 | {{- if .Values.jwt.claimsNamespace }} 33 | - name: CUBEJS_JWT_CLAIMS_NAMESPACE 34 | value: {{ .Values.jwt.claimsNamespace | quote }} 35 | {{- end }} 36 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_env_redis.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cube.env.redis" -}} 2 | {{- if .Values.redis.url }} 3 | - name: CUBEJS_REDIS_URL 4 | value: {{ .Values.redis.url | quote | required "redis.url is required" }} 5 | {{- end }} 6 | {{- if .Values.redis.password }} 7 | - name: CUBEJS_REDIS_PASSWORD 8 | value: {{ .Values.redis.password | quote }} 9 | {{- else if .Values.redis.passwordFromSecret }} 10 | - name: CUBEJS_REDIS_PASSWORD 11 | valueFrom: 12 | secretKeyRef: 13 | name: {{ .Values.redis.passwordFromSecret.name | required "redis.passwordFromSecret.name is required" }} 14 | key: {{ .Values.redis.passwordFromSecret.key | required "redis.passwordFromSecret.key is required" }} 15 | {{- end }} 16 | {{- if .Values.redis.tls }} 17 | - name: CUBEJS_REDIS_TLS 18 | value: {{ .Values.redis.tls | quote }} 19 | {{- end }} 20 | {{- if .Values.redis.poolMin }} 21 | - name: CUBEJS_REDIS_POOL_MIN 22 | value: {{ .Values.redis.poolMin | quote }} 23 | {{- end }} 24 | {{- if .Values.redis.poolMax }} 25 | - name: CUBEJS_REDIS_POOL_MAX 26 | value: {{ .Values.redis.poolMax | quote }} 27 | {{- end }} 28 | {{- if .Values.redis.useIoRedis }} 29 | - name: CUBEJS_REDIS_USE_IOREDIS 30 | value: {{ .Values.redis.useIoRedis | quote }} 31 | {{- end }} 32 | {{- end }} -------------------------------------------------------------------------------- /charts/cube/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* 2 | Expand the name of the chart. 3 | */}} 4 | {{- define "cube.name" -}} 5 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 6 | {{- end }} 7 | 8 | {{/* 9 | Create a default fully qualified app name. 10 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 11 | If release name contains chart name it will be used as a full name. 12 | */}} 13 | {{- define "cube.fullname" -}} 14 | {{- if .Values.fullnameOverride }} 15 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 16 | {{- else }} 17 | {{- $name := default .Chart.Name .Values.nameOverride }} 18 | {{- if contains $name .Release.Name }} 19 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 20 | {{- else }} 21 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 22 | {{- end }} 23 | {{- end }} 24 | {{- end }} 25 | 26 | {{/* 27 | Create chart name and version as used by the chart label. 28 | */}} 29 | {{- define "cube.chart" -}} 30 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 31 | {{- end }} 32 | 33 | {{/* 34 | Common labels 35 | */}} 36 | {{- define "cube.labels" -}} 37 | helm.sh/chart: {{ include "cube.chart" . }} 38 | {{ include "cube.selectorLabels" . }} 39 | {{- if .Chart.AppVersion }} 40 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 41 | {{- end }} 42 | app.kubernetes.io/managed-by: {{ .Release.Service }} 43 | {{- end }} 44 | 45 | {{/* 46 | Selector labels 47 | */}} 48 | {{- define "cube.selectorLabels" -}} 49 | app.kubernetes.io/name: {{ include "cube.name" . }} 50 | app.kubernetes.io/instance: {{ .Release.Name }} 51 | {{- end }} 52 | 53 | {{/* 54 | Return the appropriate apiVersion for ingress. 55 | */}} 56 | {{- define "cube.ingress.apiVersion" -}} 57 | {{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.Version -}} 58 | {{- print "extensions/v1beta1" -}} 59 | {{- else if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version -}} 60 | {{- print "networking.k8s.io/v1beta1" -}} 61 | {{- else -}} 62 | {{- print "networking.k8s.io/v1" -}} 63 | {{- end -}} 64 | {{- end -}} 65 | 66 | {{/* 67 | Return "true" if the API pathType field is supported 68 | */}} 69 | {{- define "cube.ingress.supportsPathType" -}} 70 | {{- if semverCompare "<1.18-0" .Capabilities.KubeVersion.Version -}} 71 | {{- print "false" -}} 72 | {{- else -}} 73 | {{- print "true" -}} 74 | {{- end -}} 75 | {{- end -}} 76 | 77 | {{/* 78 | Return "true" if the API ingressClassName field is supported 79 | */}} 80 | {{- define "cube.ingress.supportsIngressClassname" -}} 81 | {{- if semverCompare "<1.18-0" .Capabilities.KubeVersion.Version -}} 82 | {{- print "false" -}} 83 | {{- else -}} 84 | {{- print "true" -}} 85 | {{- end -}} 86 | {{- end -}} 87 | 88 | {{/* 89 | Create the name of cube api service account to use 90 | */}} 91 | {{- define "cube.api.serviceAccountName" -}} 92 | {{- if .Values.api.serviceAccount.create -}} 93 | {{ default (printf "%s-api" (include "cube.fullname" .)) .Values.api.serviceAccount.name }} 94 | {{- else -}} 95 | {{ default "default" .Values.api.serviceAccount.name }} 96 | {{- end -}} 97 | {{- end -}} 98 | 99 | {{/* 100 | Create the name of cube worker service account to use 101 | */}} 102 | {{- define "cube.worker.serviceAccountName" -}} 103 | {{- if .Values.worker.serviceAccount.create -}} 104 | {{ default (printf "%s-worker" (include "cube.fullname" .)) .Values.worker.serviceAccount.name }} 105 | {{- else -}} 106 | {{ default "default" .Values.worker.serviceAccount.name }} 107 | {{- end -}} 108 | {{- end -}} 109 | 110 | {{/* 111 | Create a decorated env var using datasource name 112 | https://cube.dev/docs/config/multiple-data-sources#configuring-data-sources-with-environment-variables-decorated-environment-variables 113 | */}} 114 | {{- define "cube.env.decorated" -}} 115 | {{- $parts := split "CUBEJS_" .key -}} 116 | {{- if eq .datasource "default" -}} 117 | {{- .key }} 118 | {{- else -}} 119 | {{- printf "CUBEJS_DS_%s_%s" (upper .datasource) $parts._1 }} 120 | {{- end -}} 121 | {{- end}} 122 | 123 | {{/* 124 | Renders a value that contains template. 125 | Usage: 126 | {{ include "cube.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }} 127 | */}} 128 | {{- define "cube.tplvalues.render" -}} 129 | {{- if typeIs "string" .value }} 130 | {{- tpl .value .context }} 131 | {{- else }} 132 | {{- tpl (.value | toYaml) .context }} 133 | {{- end }} 134 | {{- end -}} 135 | -------------------------------------------------------------------------------- /charts/cube/templates/api/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ printf "%s-api" (include "cube.fullname" .) }} 5 | labels: 6 | {{- include "cube.labels" . | nindent 4 }} 7 | {{- if .Values.commonLabels }} 8 | {{- toYaml .Values.commonLabels | nindent 4 }} 9 | {{- end }} 10 | {{- if .Values.commonAnnotations }} 11 | annotations: 12 | {{- toYaml .Values.commonAnnotations | nindent 4 }} 13 | {{- end }} 14 | spec: 15 | replicas: {{ .Values.api.apiCount }} 16 | selector: 17 | matchLabels: 18 | app.kubernetes.io/component: api 19 | {{- include "cube.selectorLabels" . | nindent 6 }} 20 | template: 21 | metadata: 22 | labels: 23 | app.kubernetes.io/component: api 24 | {{- include "cube.selectorLabels" . | nindent 8 }} 25 | {{- if .Values.commonLabels }} 26 | {{- toYaml .Values.commonLabels | nindent 8 }} 27 | {{- end }} 28 | {{- if .Values.commonAnnotations }} 29 | annotations: 30 | {{- toYaml .Values.commonAnnotations | nindent 8 }} 31 | {{- end }} 32 | spec: 33 | {{- if .Values.securityContext.enabled }} 34 | securityContext: 35 | runAsUser: {{ .Values.securityContext.runAsUser }} 36 | fsGroup: {{ .Values.securityContext.fsGroup }} 37 | {{- end }} 38 | serviceAccountName: {{ template "cube.api.serviceAccountName" . }} 39 | {{- with .Values.image.pullSecrets }} 40 | imagePullSecrets: 41 | {{- toYaml . | nindent 8 }} 42 | {{- end }} 43 | {{- if .Values.config.initContainers }} 44 | initContainers: 45 | {{- toYaml .Values.config.initContainers | nindent 8 }} 46 | {{- end }} 47 | containers: 48 | - name: cube 49 | {{- if .Values.image.tag }} 50 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 51 | {{- else }} 52 | image: "{{ .Values.image.repository }}:v{{ .Chart.AppVersion }}" 53 | {{- end }} 54 | imagePullPolicy: {{ .Values.image.pullPolicy | quote }} 55 | ports: 56 | - name: http 57 | containerPort: {{ .Values.config.apiPort }} 58 | protocol: TCP 59 | {{- if .Values.config.pgSqlPort }} 60 | - name: pgsql 61 | containerPort: {{ .Values.config.pgSqlPort }} 62 | protocol: TCP 63 | {{- end }} 64 | env: 65 | {{- include "cube.env" . | nindent 12 }} 66 | {{- if .Values.extraEnvVars }} 67 | {{- include "cube.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }} 68 | {{- end }} 69 | {{- if .Values.api.extraEnvVars }} 70 | {{- include "cube.tplvalues.render" (dict "value" .Values.api.extraEnvVars "context" $) | nindent 12 }} 71 | {{- end }} 72 | {{- if or .Values.extraEnvVarsFromConfigMap .Values.extraEnvVarsFromSecret .Values.api.extraEnvVarsFromConfigMap .Values.api.extraEnvVarsFromSecret }} 73 | envFrom: 74 | {{- if .Values.extraEnvVarsFromConfigMap }} 75 | - configMapRef: 76 | name: {{ include "cube.tplvalues.render" (dict "value" .Values.extraEnvVarsFromConfigMap "context" $) }} 77 | {{- end }} 78 | {{- if .Values.extraEnvVarsFromSecret }} 79 | - secretRef: 80 | name: {{ include "cube.tplvalues.render" (dict "value" .Values.extraEnvVarsFromSecret "context" $) }} 81 | {{- end }} 82 | {{- if .Values.api.extraEnvVarsFromConfigMap }} 83 | - configMapRef: 84 | name: {{ include "cube.tplvalues.render" (dict "value" .Values.api.extraEnvVarsFromConfigMap "context" $) }} 85 | {{- end }} 86 | {{- if .Values.api.extraEnvVarsFromSecret }} 87 | - secretRef: 88 | name: {{ include "cube.tplvalues.render" (dict "value" .Values.api.extraEnvVarsFromSecret "context" $) }} 89 | {{- end }} 90 | {{- end }} 91 | {{- if .Values.api.livenessProbe.enabled }} 92 | livenessProbe: 93 | initialDelaySeconds: {{ .Values.api.livenessProbe.initialDelaySeconds }} 94 | periodSeconds: {{ .Values.api.livenessProbe.periodSeconds }} 95 | timeoutSeconds: {{ .Values.api.livenessProbe.timeoutSeconds }} 96 | successThreshold: {{ .Values.api.livenessProbe.successThreshold }} 97 | failureThreshold: {{ .Values.api.livenessProbe.failureThreshold }} 98 | httpGet: 99 | path: /livez 100 | port: http 101 | {{- else if .Values.api.customLivenessProbe }} 102 | livenessProbe: 103 | {{- toYaml .Values.api.customLivenessProbe | nindent 12 }} 104 | {{- end }} 105 | {{- if .Values.api.readinessProbe.enabled }} 106 | readinessProbe: 107 | initialDelaySeconds: {{ .Values.api.readinessProbe.initialDelaySeconds }} 108 | periodSeconds: {{ .Values.api.readinessProbe.periodSeconds }} 109 | timeoutSeconds: {{ .Values.api.readinessProbe.timeoutSeconds }} 110 | successThreshold: {{ .Values.api.readinessProbe.successThreshold }} 111 | failureThreshold: {{ .Values.api.readinessProbe.failureThreshold }} 112 | httpGet: 113 | path: /readyz 114 | port: http 115 | {{- else if .Values.api.customReadinessProbe }} 116 | readinessProbe: 117 | {{- toYaml .Values.api.customReadinessProbe | nindent 12 }} 118 | {{- end }} 119 | {{- if .Values.api.resources }} 120 | resources: 121 | {{- toYaml .Values.api.resources | nindent 12 }} 122 | {{- end }} 123 | {{- if .Values.config.volumeMounts }} 124 | volumeMounts: 125 | {{- toYaml .Values.config.volumeMounts | nindent 12 }} 126 | {{- end }} 127 | {{- if .Values.config.sidecarContainers }} 128 | {{- toYaml .Values.config.sidecarContainers | nindent 8 }} 129 | {{- end }} 130 | {{- if .Values.api.affinity }} 131 | affinity: 132 | {{- toYaml .Values.api.affinity | nindent 8 }} 133 | {{- end }} 134 | {{- if .Values.api.tolerations }} 135 | tolerations: 136 | {{- toYaml .Values.api.tolerations | nindent 8 }} 137 | {{- end }} 138 | {{- if .Values.api.nodeSelector }} 139 | nodeSelector: 140 | {{- toYaml .Values.api.nodeSelector | nindent 8 }} 141 | {{- end }} 142 | {{- if .Values.api.spreadConstraints }} 143 | topologySpreadConstraints: 144 | {{- toYaml .Values.api.spreadConstraints | nindent 8 }} 145 | {{- end }} 146 | {{- if .Values.config.volumes }} 147 | volumes: 148 | {{- toYaml .Values.config.volumes | nindent 8 }} 149 | {{- end }} 150 | -------------------------------------------------------------------------------- /charts/cube/templates/api/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "cube.fullname" . }} 5 | labels: 6 | app.kubernetes.io/component: api 7 | {{- include "cube.labels" . | nindent 4 }} 8 | {{- if .Values.commonLabels }} 9 | {{- toYaml .Values.commonLabels | nindent 4 }} 10 | {{- end }} 11 | {{- if .Values.commonAnnotations }} 12 | annotations: 13 | {{- toYaml .Values.commonAnnotations | nindent 4 }} 14 | {{- end }} 15 | spec: 16 | ports: 17 | - name: http 18 | port: {{ .Values.config.apiPort }} 19 | targetPort: http 20 | {{- if .Values.config.sqlPort }} 21 | - name: sql 22 | port: {{ .Values.config.sqlPort }} 23 | targetPort: sql 24 | {{- end}} 25 | {{- if .Values.config.pgSqlPort }} 26 | - name: pgsql 27 | port: {{ .Values.config.pgSqlPort }} 28 | targetPort: pgsql 29 | {{- end}} 30 | selector: 31 | app.kubernetes.io/component: api 32 | {{- include "cube.selectorLabels" . | nindent 4 }} 33 | -------------------------------------------------------------------------------- /charts/cube/templates/api/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.api.serviceAccount.create }} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ template "cube.api.serviceAccountName" . }} 6 | labels: 7 | {{- include "cube.labels" . | nindent 4 }} 8 | {{- if .Values.commonLabels }} 9 | {{- toYaml .Values.commonLabels | nindent 4 }} 10 | {{- end }} 11 | {{- if .Values.api.serviceAccount.annotations }} 12 | annotations: 13 | {{- toYaml .Values.api.serviceAccount.annotations | nindent 4 }} 14 | {{- end }} 15 | automountServiceAccountToken: {{ .Values.api.serviceAccount.automountServiceAccountToken }} 16 | {{- end }} 17 | -------------------------------------------------------------------------------- /charts/cube/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled }} 2 | apiVersion: {{ include "cube.ingress.apiVersion" . }} 3 | kind: Ingress 4 | metadata: 5 | name: {{ include "cube.fullname" . }} 6 | labels: 7 | {{- include "cube.labels" . | nindent 4 }} 8 | {{- if .Values.commonLabels }} 9 | {{- toYaml .Values.commonLabels | nindent 4 }} 10 | {{- end }} 11 | {{- if or .Values.ingress.annotations .Values.commonAnnotations }} 12 | annotations: 13 | {{- if .Values.commonAnnotations }} 14 | {{- toYaml .Values.commonAnnotations | nindent 4 }} 15 | {{- end }} 16 | {{- if .Values.ingress.annotations }} 17 | {{- toYaml .Values.ingress.annotations | nindent 4 }} 18 | {{- end }} 19 | {{- end }} 20 | spec: 21 | {{- if and .Values.ingress.ingressClassName (eq "true" (include "cube.ingress.supportsIngressClassname" .)) }} 22 | ingressClassName: {{ .Values.ingress.ingressClassName | quote }} 23 | {{- end }} 24 | rules: 25 | {{- if .Values.ingress.hostname }} 26 | - host: {{ .Values.ingress.hostname }} 27 | http: 28 | paths: 29 | - path: {{ .Values.ingress.path }} 30 | {{- if eq "true" (include "cube.ingress.supportsPathType" .) }} 31 | pathType: {{ .Values.ingress.pathType }} 32 | {{- end }} 33 | backend: 34 | service: 35 | name: {{ include "cube.fullname" . }} 36 | port: 37 | name: http 38 | {{- end }} 39 | {{- if .Values.ingress.tls }} 40 | tls: 41 | {{- if .Values.ingress.tls }} 42 | - hosts: 43 | - {{ .Values.ingress.hostname }} 44 | secretName: {{ printf "%s-tls" .Values.ingress.hostname }} 45 | {{- end }} 46 | {{- end }} 47 | {{- end }} 48 | -------------------------------------------------------------------------------- /charts/cube/templates/worker/deployment.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.worker.enabled }} 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: {{ printf "%s-worker" (include "cube.fullname" .) }} 6 | labels: 7 | {{- include "cube.labels" . | nindent 4 }} 8 | {{- if .Values.commonLabels }} 9 | {{- toYaml .Values.commonLabels | nindent 4 }} 10 | {{- end }} 11 | {{- if .Values.commonAnnotations }} 12 | annotations: 13 | {{- toYaml .Values.commonAnnotations | nindent 4 }} 14 | {{- end }} 15 | spec: 16 | replicas: 1 17 | selector: 18 | matchLabels: 19 | app.kubernetes.io/component: worker 20 | {{- include "cube.selectorLabels" . | nindent 6 }} 21 | template: 22 | metadata: 23 | labels: 24 | app.kubernetes.io/component: worker 25 | {{- include "cube.selectorLabels" . | nindent 8 }} 26 | {{- if .Values.commonLabels }} 27 | {{- toYaml .Values.commonLabels | nindent 8 }} 28 | {{- end }} 29 | {{- if .Values.commonAnnotations }} 30 | annotations: 31 | {{- toYaml .Values.commonAnnotations | nindent 8 }} 32 | {{- end }} 33 | spec: 34 | {{- if .Values.securityContext.enabled }} 35 | securityContext: 36 | runAsUser: {{ .Values.securityContext.runAsUser }} 37 | fsGroup: {{ .Values.securityContext.fsGroup }} 38 | {{- end }} 39 | serviceAccountName: {{ template "cube.worker.serviceAccountName" . }} 40 | {{- with .Values.image.pullSecrets }} 41 | imagePullSecrets: 42 | {{- toYaml . | nindent 8 }} 43 | {{- end }} 44 | {{- if .Values.config.initContainers }} 45 | initContainers: 46 | {{- toYaml .Values.config.initContainers | nindent 8 }} 47 | {{- end }} 48 | containers: 49 | - name: cube 50 | {{- if .Values.image.tag }} 51 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 52 | {{- else }} 53 | image: "{{ .Values.image.repository }}:v{{ .Chart.AppVersion }}" 54 | {{- end }} 55 | imagePullPolicy: {{ .Values.image.pullPolicy | quote }} 56 | ports: 57 | - name: http 58 | containerPort: {{ .Values.config.apiPort }} 59 | protocol: TCP 60 | env: 61 | {{- include "cube.env" . | nindent 12 }} 62 | - name: CUBEJS_REFRESH_WORKER 63 | value: "true" 64 | {{- if .Values.extraEnvVars }} 65 | {{- include "cube.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }} 66 | {{- end }} 67 | {{- if .Values.worker.extraEnvVars }} 68 | {{- include "cube.tplvalues.render" (dict "value" .Values.worker.extraEnvVars "context" $) | nindent 12 }} 69 | {{- end }} 70 | {{- if or .Values.extraEnvVarsFromConfigMap .Values.extraEnvVarsFromSecret .Values.worker.extraEnvVarsFromConfigMap .Values.worker.extraEnvVarsFromSecret }} 71 | envFrom: 72 | {{- if .Values.extraEnvVarsFromConfigMap }} 73 | - configMapRef: 74 | name: {{ include "cube.tplvalues.render" (dict "value" .Values.extraEnvVarsFromConfigMap "context" $) }} 75 | {{- end }} 76 | {{- if .Values.extraEnvVarsFromSecret }} 77 | - secretRef: 78 | name: {{ include "cube.tplvalues.render" (dict "value" .Values.extraEnvVarsFromSecret "context" $) }} 79 | {{- end }} 80 | {{- if .Values.worker.extraEnvVarsFromConfigMap }} 81 | - configMapRef: 82 | name: {{ include "cube.tplvalues.render" (dict "value" .Values.worker.extraEnvVarsFromConfigMap "context" $) }} 83 | {{- end }} 84 | {{- if .Values.worker.extraEnvVarsFromSecret }} 85 | - secretRef: 86 | name: {{ include "cube.tplvalues.render" (dict "value" .Values.worker.extraEnvVarsFromSecret "context" $) }} 87 | {{- end }} 88 | {{- end }} 89 | {{- if .Values.worker.livenessProbe.enabled }} 90 | livenessProbe: 91 | initialDelaySeconds: {{ .Values.worker.livenessProbe.initialDelaySeconds }} 92 | periodSeconds: {{ .Values.worker.livenessProbe.periodSeconds }} 93 | timeoutSeconds: {{ .Values.worker.livenessProbe.timeoutSeconds }} 94 | successThreshold: {{ .Values.worker.livenessProbe.successThreshold }} 95 | failureThreshold: {{ .Values.worker.livenessProbe.failureThreshold }} 96 | httpGet: 97 | path: /livez 98 | port: http 99 | {{- else if .Values.worker.customLivenessProbe }} 100 | livenessProbe: 101 | {{- toYaml .Values.worker.customLivenessProbe | nindent 12 }} 102 | {{- end }} 103 | {{- if .Values.worker.readinessProbe.enabled }} 104 | readinessProbe: 105 | initialDelaySeconds: {{ .Values.worker.readinessProbe.initialDelaySeconds }} 106 | periodSeconds: {{ .Values.worker.readinessProbe.periodSeconds }} 107 | timeoutSeconds: {{ .Values.worker.readinessProbe.timeoutSeconds }} 108 | successThreshold: {{ .Values.worker.readinessProbe.successThreshold }} 109 | failureThreshold: {{ .Values.worker.readinessProbe.failureThreshold }} 110 | httpGet: 111 | path: /readyz 112 | port: http 113 | {{- else if .Values.worker.customReadinessProbe }} 114 | readinessProbe: 115 | {{- toYaml .Values.worker.customReadinessProbe | nindent 12 }} 116 | {{- end }} 117 | {{- if .Values.worker.resources }} 118 | resources: 119 | {{- toYaml .Values.worker.resources | nindent 12 }} 120 | {{- end }} 121 | {{- if .Values.config.volumeMounts }} 122 | volumeMounts: 123 | {{- toYaml .Values.config.volumeMounts | nindent 12 }} 124 | {{- end }} 125 | {{- if .Values.config.sidecarContainers }} 126 | {{- toYaml .Values.config.sidecarContainers | nindent 8 }} 127 | {{- end }} 128 | {{- if .Values.worker.affinity }} 129 | affinity: 130 | {{- toYaml .Values.worker.affinity | nindent 8 }} 131 | {{- end }} 132 | {{- if .Values.worker.tolerations }} 133 | tolerations: 134 | {{- toYaml .Values.worker.tolerations | nindent 8 }} 135 | {{- end }} 136 | {{- if .Values.worker.nodeSelector }} 137 | nodeSelector: 138 | {{- toYaml .Values.worker.nodeSelector | nindent 8 }} 139 | {{- end }} 140 | {{- if .Values.worker.spreadConstraints }} 141 | topologySpreadConstraints: 142 | {{- toYaml .Values.worker.spreadConstraints | nindent 8 }} 143 | {{- end }} 144 | {{- if .Values.config.volumes }} 145 | volumes: 146 | {{- toYaml .Values.config.volumes | nindent 8 }} 147 | {{- end }} 148 | 149 | {{- end }} 150 | -------------------------------------------------------------------------------- /charts/cube/templates/worker/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.worker.serviceAccount.create }} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ template "cube.worker.serviceAccountName" . }} 6 | labels: 7 | {{- include "cube.labels" . | nindent 4 }} 8 | {{- if .Values.commonLabels }} 9 | {{- toYaml .Values.commonLabels | nindent 4 }} 10 | {{- end }} 11 | {{- if .Values.worker.serviceAccount.annotations }} 12 | annotations: 13 | {{- toYaml .Values.worker.serviceAccount.annotations | nindent 4 }} 14 | {{- end }} 15 | automountServiceAccountToken: {{ .Values.worker.serviceAccount.automountServiceAccountToken }} 16 | {{- end }} 17 | -------------------------------------------------------------------------------- /charts/cube/values.yaml: -------------------------------------------------------------------------------- 1 | ## Override the name 2 | ## 3 | nameOverride: "" 4 | 5 | ## Provide a name to substitute for the full names of resources 6 | ## 7 | fullnameOverride: "" 8 | 9 | ## Labels to add to all deployed objects 10 | ## 11 | commonLabels: {} 12 | 13 | ## Annotations to add to all deployed objects 14 | ## 15 | commonAnnotations: {} 16 | 17 | ## Extra environment variables to pass on to all pods. The value is evaluated as a template 18 | ## e.g: 19 | ## extraEnvVars: 20 | ## - name: FOO 21 | ## value: "bar" 22 | ## 23 | extraEnvVars: [] 24 | 25 | ## Name of a Config Map containing extra environment variables to pass on to all pods 26 | ## 27 | extraEnvVarsFromConfigMap: 28 | 29 | ## Name of a Secret containing extra environment variables to pass on to all pods 30 | ## 31 | extraEnvVarsFromSecret: 32 | 33 | image: 34 | ## Docker image repository 35 | ## 36 | repository: cubejs/cube 37 | 38 | ## Docker image tag. 39 | ## 40 | tag: 41 | 42 | ## Specify a imagePullPolicy 43 | ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images 44 | ## 45 | pullPolicy: IfNotPresent 46 | 47 | ## Specify a imagePullSecrets 48 | ## ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod 49 | ## 50 | pullSecrets: [] 51 | 52 | ## Pod Security Context 53 | ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ 54 | ## Some admission policies only allow use of non root containers 55 | securityContext: 56 | enabled: false 57 | # fsGroup: 1001 58 | # runAsUser: 1001 59 | 60 | 61 | config: 62 | ## The port for a Cube deployment to listen to API connections on 63 | ## 64 | apiPort: 4000 65 | 66 | ## The port to listen to Postgres-compatible connections on 67 | ## 68 | pgSqlPort: 69 | 70 | ## The username to access the SQL api 71 | ## 72 | sqlUser: 73 | 74 | ## The password to access the SQL api 75 | ## 76 | sqlPassword: 77 | # apiPasswordFromSecret: 78 | # name: 79 | # key: 80 | 81 | ## If true, enables development mode 82 | ## 83 | devMode: false 84 | 85 | ## If true, enables debug logging 86 | ## 87 | debug: false 88 | 89 | ## The logging level for Cube 90 | ## 91 | logLevel: "warn" 92 | 93 | ## If true, then send telemetry to Cube 94 | ## 95 | telemetry: false 96 | 97 | ## The secret key used to sign and verify JWTs. Generated on project scaffold 98 | ## 99 | apiSecret: 100 | # apiSecretFromSecret: 101 | # name: 102 | # key: 103 | 104 | ## The secret key used to enable playground and system apis 105 | ## 106 | playgroundAuthSecret: 107 | # apiSecretFromSecret: 108 | # name: 109 | # key: 110 | 111 | ## The path where Cube loads schemas from. Defaults to schema 112 | ## 113 | schemaPath: 114 | 115 | ## An application ID used to uniquely identify the Cube deployment. Can be different for multitenant setups 116 | ## Defaults to cubejs 117 | ## 118 | app: 119 | 120 | ## If true, this instance of Cube will only query rollup pre-aggregations. Defaults to false 121 | ## 122 | rollupOnly: 123 | 124 | ## A comma-separated list of timezones to schedule refreshes for. 125 | ## 126 | scheduledRefreshTimezones: 127 | 128 | ## How many pre-aggregations refresh worker will build in parallel. Please note changing this param doesn't change queue concurrency and it should be adjusted accordingly 129 | ## 130 | scheduledRefreshConcurrency: 131 | 132 | ## The schema name to use for storing pre-aggregations. 133 | ## Defaults to dev_pre_aggregations/prod_pre_aggregations for development/production mode 134 | ## 135 | preAggregationsSchema: 136 | 137 | ## If true, then use WebSocket for data fetching. Defaults to true 138 | ## 139 | webSockets: 140 | 141 | ## The cache and queue driver to use for the Cube deployment. Defaults to cubestore 142 | ## 143 | cacheAndQueueDriver: 144 | 145 | ## The number of concurrent connections each query queue has to the database 146 | ## 147 | concurrency: 148 | 149 | ## The name of the Amazon SNS or Google Cloud Pub/Sub topic 150 | ## Defaults to -process if undefined, and finally cubejs-process 151 | ## 152 | topicName: 153 | 154 | ## The number of seconds without a touch before pre-aggregation is considered orphaned and marked for removal. 155 | ## 156 | touchPreAggTimeout: 157 | 158 | ## If true, it enables dropping pre-aggregations that Refresh Worker doesn't touch within touchPreAggTimeout. 159 | ## Pre-aggregations are touched whenever they are rebuilt or a Refresh Worker checks its freshness. 160 | ## The first drop will be initiated when the Refresh Worker is able to check freshness for every scheduledRefresh: true pre-aggregation. 161 | ## If you have multiple Refresh Workers with different data model versions sharing the same Cube Store cluster, 162 | ## then touches from both refresh workers are respected. 163 | ## 164 | dropPreAggWithoutTouch: 165 | 166 | ## Init containers to run before starting the main container 167 | ## We can use an empty volume and volume mounts to copy data 168 | ## from a remote location like s3 to the local volume 169 | ## 170 | initContainers: [] 171 | # - name: aws-init-container 172 | # image: amazon/aws-cli:latest 173 | # command: ['sh', '-c', 'aws s3 cp s3://your-s3-bucket/your-data /path/to/volume/mount'] 174 | # volumeMounts: 175 | # - name: data-volume 176 | # mountPath: /path/to/volume/mount 177 | 178 | ## Side containers to run before along with the main container 179 | ## We can use an empty volume and volume mounts to sync data 180 | ## from a remote location like s3 to the local volume 181 | ## 182 | sidecarContainers: [] 183 | # - name: aws-sync-container 184 | # image: amazon/aws-cli:latest 185 | # command: ['sh', '-c', 'while true; do aws s3 cp s3://your-s3-bucket/your-data /path/to/volume/mount; sleep 30; done'] 186 | # volumeMounts: 187 | # - name: data-volume 188 | # mountPath: /path/to/volume/mount 189 | 190 | ## The config volumes 191 | ## Will be used to both api and worker 192 | volumes: [] 193 | ## In case you want to use configMap 194 | # - name: schema 195 | # configMap: 196 | # name: schema 197 | ## In case you want to use init container 198 | # - name: data-volume 199 | # emptyDir: {} 200 | 201 | ## The config volumeMounts 202 | ## Will be used to both api and worker 203 | volumeMounts: [] 204 | ## In case you want to use configMap 205 | # - name: schema 206 | # readOnly: true 207 | # mountPath: /cube/conf/schema 208 | ## In case you want to use init container 209 | # - name: data-volume 210 | # readOnly: true 211 | # mountPath: /cube/conf/schema 212 | # subPath: model 213 | 214 | redis: 215 | ## The host URL for a Redis server 216 | ## 217 | url: 218 | 219 | ## The password used to connect to the Redis server 220 | ## 221 | password: 222 | # passwordFromSecret: 223 | # name: 224 | # key: 225 | 226 | ## If true, then the connection to the Redis server is protected by TLS authentication. Defaults to false 227 | ## 228 | tls: 229 | 230 | ## The minimum number of connections to keep active in the Redis connection pool for a single appId (tenant). 231 | ## Must be lower than poolMax. Defaults to 2 232 | ## 233 | poolMin: 234 | 235 | ## The maximum number of connections to keep active in the Redis connection pool for a single appId (tenant). 236 | ## Must be higher than poolMin. Defaults to 1000 237 | ## 238 | poolMax: 239 | 240 | ## Use ioredis instead of redis. Defaults to false 241 | ## 242 | useIoRedis: 243 | 244 | jwt: 245 | ## A valid URL to a JSON Web Key Sets (JWKS) 246 | ## 247 | jwkUrl: 248 | 249 | ## The secret key used to sign and verify JWTs. Generated on project scaffold 250 | ## 251 | key: 252 | # keyFromSecret: 253 | # name: 254 | # key: 255 | 256 | ## An audience value which will be used to enforce the aud claim from inbound JWTs 257 | ## 258 | audience: 259 | 260 | ## An issuer value which will be used to enforce the iss claim from inbound JWTs 261 | ## 262 | issuer: 263 | 264 | ## A subject value which will be used to enforce the sub claim from inbound JWTs 265 | ## 266 | subject: 267 | 268 | ## Any supported algorithm for decoding JWTs 269 | ## 270 | algs: 271 | 272 | ## A namespace within the decoded JWT under which any custom claims can be found 273 | ## 274 | claimsNamespace: 275 | 276 | ## Datasource configuration 277 | ## 278 | datasources: 279 | ## Default datasource 280 | default: 281 | ## A database type supported by Cube 282 | ## 283 | type: 284 | 285 | ## The URL for a database 286 | ## 287 | url: 288 | 289 | ## The host URL for a database 290 | ## 291 | host: 292 | 293 | ## The port for the database connection 294 | ## 295 | port: 296 | 297 | ## The schema within the database to connect to 298 | ## 299 | schema: 300 | 301 | ## The name of the database to connect to 302 | ## 303 | name: 304 | 305 | ## The username used to connect to the database 306 | ## 307 | user: 308 | 309 | ## The password used to connect to the database 310 | ## 311 | pass: 312 | # passFromSecret: 313 | # name: 314 | # key: 315 | 316 | ## A domain name within the database to connect to 317 | ## 318 | domain: 319 | 320 | ## The path to a Unix socket for a MySQL database 321 | ## 322 | socketPath: 323 | 324 | ## The catalog within the database to connect to 325 | ## 326 | catalog: 327 | 328 | ## The maximum number of connections to keep active in the database connection pool 329 | ## 330 | maxPool: 331 | 332 | ## A number in seconds or a duration string 333 | ## 334 | queryTimeout: 335 | 336 | ## Force fetching of columns by ordinal positions. Certain data-providers (e.g., Redshift) do not guarantee columns in the same order on each request (e.g., SELECT * FROM foo). This flag ensures that columns will be fetched in proper order for pre-aggregation generation. 337 | ## 338 | fetchColumnsByOrdinalPosition: 339 | 340 | ssl: 341 | ## If true, enables SSL encryption for database connections from Cube 342 | ## 343 | enabled: false 344 | 345 | ## If true, verifies the CA chain with the system's built-in CA chain 346 | ## 347 | rejectUnAuthorized: 348 | ## The contents of a CA bundle in PEM format, or a path to one. 349 | ## For more information, check the options.ca property for TLS Secure Contexts in the Node.js documentation 350 | ## https://nodejs.org/docs/latest/api/tls.html#tls_tls_createsecurecontext_options 351 | ## 352 | ca: 353 | 354 | ## The contents of an SSL certificate in PEM format, or a path to one. 355 | ## For more information, check the options.cert property for TLS Secure Contexts in the Node.js documentation 356 | ## https://nodejs.org/docs/latest/api/tls.html#tls_tls_createsecurecontext_options 357 | ## 358 | cert: 359 | 360 | ## The contents of a private key in PEM format, or a path to one. 361 | ## For more information, check the options.key property for TLS Secure Contexts in the Node.js documentation 362 | ## https://nodejs.org/docs/latest/api/tls.html#tls_tls_createsecurecontext_options 363 | ## 364 | key: 365 | 366 | ## The ciphers used by the SSL certificate. 367 | ## For more information, check the options.ciphers property for TLS Secure Contexts in the Node.js documentation 368 | ## https://nodejs.org/docs/latest/api/tls.html#tls_tls_createsecurecontext_options 369 | ## 370 | ciphers: 371 | 372 | ## The server name for the SNI TLS extension. 373 | ## For more information, check the options.servername property for TLS Connections in the Node.js documentation 374 | ## https://nodejs.org/docs/latest/api/tls.html#tls_tls_createsecurecontext_options 375 | ## 376 | serverName: 377 | 378 | ## The passphrase used to encrypt the SSL private key. 379 | ## For more information, check the options.passphrase property for TLS Secure Contexts in the Node.js documentation 380 | ## https://nodejs.org/docs/latest/api/tls.html#tls_tls_createsecurecontext_options 381 | ## 382 | passPhrase: 383 | 384 | ## Export Bucket configuration 385 | ## 386 | export: 387 | ## The name of a bucket in cloud storage to store the database export snapshots. 388 | ## 389 | name: 390 | 391 | ## The cloud provider where the bucket is hosted (gcp, s3) 392 | ## 393 | type: 394 | 395 | ## The name of the integration used in the database. Only required when using Snowflake and Google Cloud Storage 396 | ## 397 | integration: 398 | 399 | gcs: 400 | ## A Base64 encoded JSON key file for connecting to Google Cloud 401 | ## 402 | credentials: 403 | # credentialsFromSecret: 404 | # name: 405 | # key: 406 | 407 | aws: 408 | ## The AWS Access Key ID to use for the export bucket. 409 | ## 410 | key: 411 | # keyFromSecret: 412 | # name: 413 | # key: 414 | 415 | ## The AWS Secret Access Key to use for the export bucket. 416 | ## 417 | secret: 418 | # secretFromSecret: 419 | # name: 420 | # key: 421 | 422 | ## The AWS region of the export bucket. 423 | ## 424 | region: 425 | 426 | redshift: 427 | ## An ARN of an AWS IAM role with permission to write to the configured bucket (see export.name). 428 | arn: 429 | 430 | athena: 431 | ## The AWS Access Key ID to use for database connections 432 | ## 433 | key: 434 | # keyFromSecret: 435 | # name: 436 | # key: 437 | 438 | ## The AWS region of the Cube deployment 439 | ## 440 | region: 441 | 442 | ## The S3 path to store query results made by the Cube deployment 443 | ## 444 | s3OutputLocation: 445 | 446 | ## The AWS Secret Access Key to use for database connections 447 | ## 448 | secret: 449 | # secretFromSecret: 450 | # name: 451 | # key: 452 | 453 | ## The name of the workgroup in which the query is being started 454 | ## 455 | workgroup: 456 | 457 | ## The name of the catalog to use by default 458 | ## 459 | catalog: 460 | 461 | bigquery: 462 | ## The Google BigQuery project ID to connect to 463 | ## 464 | projectId: 465 | 466 | ## The Google BigQuery dataset location to connect to 467 | ## 468 | location: 469 | 470 | ## A Base64 encoded JSON key file for connecting to Google BigQuery 471 | ## 472 | credentials: 473 | # credentialsFromSecret: 474 | # name: 475 | # key: 476 | 477 | ## The path to a JSON key file for connecting to Google BigQuery 478 | ## 479 | keyFile: 480 | 481 | dubckdb: 482 | ## The maximum memory limit for DuckDB. Equivalent to SET memory_limit=. Default is 75% of available RAM 483 | ## 484 | memoryLimit: 485 | 486 | ## The default search schema 487 | ## 488 | schema: 489 | 490 | ## The service token to use for connections to MotherDuck 491 | ## 492 | motherduckToken: 493 | 494 | ## The database filepath to use for connection to a local 495 | ## 496 | databasePath: 497 | 498 | s3: 499 | ## The Access Key ID to use for database 500 | ## 501 | accessKeyId: 502 | 503 | ## The Secret Access Key to use for database 504 | ## 505 | secretAccessKey: 506 | # secretAccessKeyFromSecret: 507 | # name: 508 | # key: 509 | 510 | ## The S3 endpoint 511 | ## 512 | endpoint: 513 | 514 | ## The region of the bucket 515 | ## 516 | region: 517 | 518 | ## Use SSL for connection 519 | ## 520 | useSSL: 521 | 522 | ## To choose the S3 URL style(vhost or path) 523 | ## 524 | urlStyle: 525 | 526 | ## The token for the S3 session 527 | ## 528 | sessionToken: 529 | 530 | hive: 531 | ## The version of the CDH instance for Apache Hive 532 | ## 533 | cdhVersion: 534 | 535 | ## The version of Thrift Server for Apache Hive 536 | ## 537 | thriftVersion: 538 | 539 | ## The type of Apache Hive server 540 | ## 541 | type: 542 | 543 | ## The version of Apache Hive 544 | version: 545 | 546 | materialize: 547 | ## The name of the Materialize cluster to connect to 548 | ## 549 | cluster: 550 | 551 | snowFlake: 552 | ## The Snowflake account ID to use when connecting to the database 553 | ## 554 | account: 555 | 556 | ## The Snowflake region to use when connecting to the database 557 | ## 558 | region: 559 | 560 | ## The Snowflake role to use when connecting to the database 561 | ## 562 | role: 563 | 564 | ## The Snowflake warehouse to use when connecting to the database 565 | ## 566 | warehouse: 567 | 568 | ## If true, keep the Snowflake connection alive indefinitely 569 | ## 570 | clientSessionKeepAlive: 571 | 572 | ## The type of authenticator to use with Snowflake. 573 | ## Use SNOWFLAKE with username/password, or SNOWFLAKE_JWT with key pairs. 574 | ## Defaults to SNOWFLAKE 575 | ## 576 | authenticator: 577 | 578 | ## The path to the private RSA key folder 579 | ## 580 | privateKeyPath: 581 | 582 | ## The password for the private RSA key. Only required for encrypted keys 583 | ## 584 | privateKeyPass: 585 | 586 | databricks: 587 | ## The URL for a JDBC connection 588 | ## 589 | url: 590 | 591 | ## Whether or not to accept the license terms for the Databricks JDBC driver 592 | ## 593 | acceptPolicy: 594 | 595 | ## The personal access token used to authenticate the Databricks connection 596 | ## 597 | token: 598 | 599 | ## Databricks catalog name 600 | ## 601 | catalog: 602 | 603 | clickhouse: 604 | ## Whether the ClickHouse user has read-only access or not 605 | ## 606 | readonly: 607 | 608 | firebolt: 609 | ## Account name 610 | ## 611 | account: 612 | 613 | ## Engine name to connect to 614 | ## 615 | engineName: 616 | 617 | ## Firebolt API endpoint. Used for authentication 618 | ## 619 | apiEndpoint: 620 | 621 | presto: 622 | ## The catalog within Presto to connect to 623 | ## 624 | catalog: 625 | 626 | elasticsearch: 627 | ## By default, queries return data in JDBC format, but you can also return data in standard Elasticsearch JDBC, JSON, CSV, YAML or raw formats (only JSON and JDBC are currently supported) 628 | ## 629 | queryFormat: 630 | 631 | ## If true, then use the Open Distro for Elasticsearch 632 | ## 633 | openDistro: 634 | 635 | ## ID of the API key from elastic.co 636 | ## 637 | apiKeyId: 638 | 639 | ## Value of the API key from elastic.co 640 | ## 641 | apiKeyKey: 642 | 643 | trino: 644 | ## The catalog within Trino to connect to 645 | ## 646 | catalog: 647 | ## Cubestore configuration 648 | ## 649 | cubestore: 650 | ## The hostname of the Cube Store deployment 651 | ## 652 | host: 653 | 654 | ## The port of the Cube Store deployment 655 | ## 656 | port: 3030 657 | 658 | api: 659 | ## Service account for cube api to use 660 | ## 661 | serviceAccount: 662 | create: false 663 | name: "" 664 | automountServiceAccountToken: true 665 | annotations: {} 666 | 667 | apiCount: 1 668 | 669 | ## Affinity for pod assignment 670 | ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity 671 | ## 672 | affinity: {} 673 | 674 | ## Topology spread constraint for pod assignment 675 | ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ 676 | ## 677 | spreadConstraints: [] 678 | 679 | ## Define resources requests and limits for single Pods. 680 | ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ 681 | ## 682 | resources: {} 683 | ## to match guidance: https://cube.dev/docs/product/deployment/production-checklist#appropriate-cluster-sizing 684 | # resources: 685 | # requests: 686 | # cpu: "2" 687 | # memory: "3Gi" 688 | # limits: 689 | # cpu: "2" 690 | # memory: "3Gi" 691 | 692 | ## Configure options for liveness probes 693 | ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes 694 | ## 695 | livenessProbe: 696 | enabled: true 697 | initialDelaySeconds: 10 698 | periodSeconds: 30 699 | timeoutSeconds: 3 700 | successThreshold: 1 701 | failureThreshold: 3 702 | 703 | ## Configure options for liveness probes 704 | ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes 705 | ## 706 | readinessProbe: 707 | enabled: true 708 | initialDelaySeconds: 10 709 | periodSeconds: 30 710 | timeoutSeconds: 3 711 | successThreshold: 1 712 | failureThreshold: 3 713 | 714 | ## Custom livenessProbe that overrides the default one 715 | ## 716 | customLivenessProbe: {} 717 | 718 | ## Custom readinessProbe that overrides the default one 719 | ## 720 | customReadinessProbe: {} 721 | 722 | ## Tolerations for pod assignment 723 | ## 724 | tolerations: {} 725 | 726 | ## Node selector for pod assignment 727 | ## 728 | nodeSelector: {} 729 | 730 | ## Extra environment variables to pass on to the pod. The value is evaluated as a template 731 | ## e.g: 732 | ## extraEnvVars: 733 | ## - name: FOO 734 | ## value: "bar" 735 | ## 736 | extraEnvVars: [] 737 | 738 | ## Name of a Config Map containing extra environment variables to pass on to the pod 739 | ## 740 | extraEnvVarsFromConfigMap: 741 | 742 | ## Name of a Secret containing extra environment variables to pass on to the pod 743 | ## 744 | extraEnvVarsFromSecret: 745 | 746 | worker: 747 | ## Set to true to enable a separate refresh worker 748 | ## 749 | enabled: true 750 | 751 | ## Service account for cube worker to use 752 | ## 753 | serviceAccount: 754 | create: false 755 | name: "" 756 | automountServiceAccountToken: true 757 | annotations: {} 758 | 759 | ## Affinity for pod assignment 760 | ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity 761 | ## 762 | affinity: {} 763 | 764 | ## topology spread constraint for pod assignment 765 | ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ 766 | ## 767 | spreadConstraints: [] 768 | 769 | ## Define resources requests and limits for single Pods. 770 | ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ 771 | ## 772 | resources: {} 773 | ## to match guidance: https://cube.dev/docs/product/deployment/production-checklist#appropriate-cluster-sizing 774 | # resources: 775 | # requests: 776 | # cpu: "2" 777 | # memory: "6Gi" 778 | # limits: 779 | # cpu: "2" 780 | # memory: "6Gi" 781 | 782 | ## Configure options for liveness probes 783 | ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes 784 | ## 785 | livenessProbe: 786 | enabled: true 787 | initialDelaySeconds: 10 788 | periodSeconds: 30 789 | timeoutSeconds: 3 790 | successThreshold: 1 791 | failureThreshold: 3 792 | 793 | ## Configure options for liveness probes 794 | ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes 795 | ## 796 | readinessProbe: 797 | enabled: true 798 | initialDelaySeconds: 10 799 | periodSeconds: 30 800 | timeoutSeconds: 3 801 | successThreshold: 1 802 | failureThreshold: 3 803 | 804 | ## Custom livenessProbe that overrides the default one 805 | ## 806 | customLivenessProbe: {} 807 | 808 | ## Custom readinessProbe that overrides the default one 809 | ## 810 | customReadinessProbe: {} 811 | 812 | ## Tolerations for pod assignment 813 | ## 814 | tolerations: {} 815 | 816 | ## Node selector for pod assignment 817 | ## 818 | nodeSelector: {} 819 | 820 | ## Extra environment variables to pass on to the pod. The value is evaluated as a template 821 | ## e.g: 822 | ## extraEnvVars: 823 | ## - name: FOO 824 | ## value: "bar" 825 | ## 826 | extraEnvVars: [] 827 | 828 | ## Name of a Config Map containing extra environment variables to pass on to the pod 829 | ## 830 | extraEnvVarsFromConfigMap: 831 | 832 | ## Name of a Secret containing extra environment variables to pass on to the pod 833 | ## 834 | extraEnvVarsFromSecret: 835 | 836 | ## Configure the ingress resource that allows you to access the 837 | ## Cube installation. Set up the URL 838 | ## ref: http://kubernetes.io/docs/user-guide/ingress/ 839 | ## 840 | ingress: 841 | ## Set to true to enable ingress record generation 842 | ## 843 | enabled: false 844 | 845 | ## When the ingress is enabled, a host pointing to this will be created 846 | ## 847 | hostname: cube.local 848 | 849 | ## The Path to Cube. You may need to set this to '/*' in order to use this 850 | ## with ALB ingress controllers. 851 | ## 852 | path: / 853 | 854 | ## Ingress Path type 855 | ## 856 | pathType: ImplementationSpecific 857 | 858 | ## Ingress Class name 859 | ## 860 | ingressClassName: 861 | 862 | ## Ingress annotations done as key:value pairs 863 | ## For a full list of possible ingress annotations, please see 864 | ## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md 865 | ## 866 | annotations: {} 867 | 868 | ## Enable TLS configuration for the hostname defined at ingress.hostname parameter 869 | ## TLS certificates will be retrieved from a TLS secret with name: {{- printf "%s-tls" .Values.ingress.hostname }} 870 | ## You can use the ingress.secrets parameter to create this TLS secret or relay on cert-manager to create it 871 | ## 872 | tls: false 873 | -------------------------------------------------------------------------------- /charts/cubestore/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/cubestore/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | The release numbering uses [semantic versioning](http://semver.org). 4 | 5 | ## 1.0.0 6 | 7 | - update to cubestore 1.2.0 8 | 9 | ## 0.12.1 10 | 11 | - update to cubestore 0.35.76 12 | 13 | ## 0.12.0 14 | 15 | - update to cubestore 0.35.67 16 | 17 | ## 0.11.0 18 | 19 | - update to cubestore 0.34.56 20 | - add aws accessKeyID from secret 21 | 22 | ## 0.10.0 23 | 24 | - update to cubestore 0.34.23 25 | - made initRouter image repository and tag configurable 26 | 27 | ## 0.9.4 28 | 29 | - add workers statsd sidecar to get metrics 30 | 31 | ## 0.9.3 32 | 33 | - update to cubestore 0.33.48 34 | - add metrics statsd sidecar container 35 | - run containers as non root 36 | 37 | ## 0.9.2 38 | 39 | - add init-router resource configuration 40 | 41 | ## 0.9.1 42 | 43 | - fix documentation 44 | 45 | ## 0.9.0 46 | 47 | - Update to cubestore 0.33.4 48 | - Add annotations and types to the router service 49 | - Define environment variables specific to either router or workers 50 | 51 | ## 0.8.0 52 | 53 | - Update to cubestore 0.32.14 54 | 55 | ## 0.7.0 56 | 57 | - Update to cubestore 0.32.7 58 | - add persistance storageClass config 59 | 60 | ## 0.6.0 61 | 62 | - Update to cubestore 0.31.58 63 | - disable router mysql port by default 64 | - set default PVC to `ReadWriteMany` storage class 65 | 66 | ## 0.5.1 67 | 68 | - add missing `cloudStorage.minio.subPath` and `cloudStorage.minio.credentialsRefreshEveryMinutes` config 69 | 70 | ## 0.5.0 71 | 72 | - Upgrade to cubestore 0.31.55 73 | 74 | ## 0.4.0 75 | 76 | - add `config.telemetry` 77 | - Upgrade to cubestore 0.31.47 78 | -------------------------------------------------------------------------------- /charts/cubestore/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: cubestore 3 | description: A Helm chart for Cubestore 4 | type: application 5 | version: 1.0.0 6 | appVersion: "1.2.0" 7 | keywords: 8 | - cube 9 | - cubejs 10 | - cubestore 11 | maintainers: 12 | - email: luc.vauvillier@gmail.com 13 | name: Luc Vauvillier 14 | sources: 15 | - https://github.com/cube-js/cube.js 16 | annotations: 17 | "artifacthub.io/links": | 18 | - name: Chart Source 19 | url: https://github.com/gadsme/charts 20 | -------------------------------------------------------------------------------- /charts/cubestore/README.md: -------------------------------------------------------------------------------- 1 | # Cubestore Chart 2 | 3 | ## Get Helm Repository Info 4 | 5 | ```console 6 | helm repo add gadsme https://gadsme.github.io/charts 7 | helm repo update 8 | ``` 9 | 10 | _See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentation._ 11 | 12 | ## Install Chart 13 | 14 | ```console 15 | helm install [RELEASE_NAME] gadsme/cubestore 16 | ``` 17 | 18 | The command deploys Cubestore on the Kubernetes cluster using the default configuration. 19 | 20 | _See [configuration](#configuration) below._ 21 | 22 | _See [`helm install`](https://helm.sh/docs/helm/helm_install/) for command documentation._ 23 | 24 | ## Uninstall Chart 25 | 26 | ```console 27 | helm uninstall [RELEASE_NAME] 28 | ``` 29 | 30 | This removes all the Kubernetes components associated with the chart and deletes the release. 31 | 32 | _See [`helm uninstall`](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._ 33 | 34 | ## Upgrading Chart 35 | 36 | ```console 37 | helm upgrade [RELEASE_NAME] gadsme/cubestore --install 38 | ``` 39 | 40 | ## Configuration 41 | 42 | By default, a router and two workers will be deployed. You can customize the deployment using helm values. 43 | 44 | Refer to the official documentation for more information: 45 | https://cube.dev/docs/reference/environment-variables#cube-store 46 | 47 | ### Example 48 | 49 | Deployment with: 50 | 51 | - 3 workers 52 | - GCP cloud storage (using a secret) 53 | 54 | ```bash 55 | $ helm install my-release \ 56 | --set workers.workersCount=3 \ 57 | --set cloudStorage.gcp.credentialsFromSecret.name= \ 58 | --set cloudStorage.gcp.credentialsFromSecret.key= \ 59 | --set cloudStorage.gcp.bucket= 60 | gadsme/cubestore 61 | ``` 62 | 63 | ## Persistence 64 | 65 | ### Remote dir 66 | 67 | By default, a shared remoteDir is created to store metadata and datasets if no cloudstorage is configured. 68 | Prefer using cloudStorage if you are running on `gcp` or `aws`. 69 | 70 | ### Local dir 71 | 72 | By default, local dir is not persisted. You can enable persistence on router and master. 73 | 74 | ## Parameters 75 | 76 | ### Common parameters 77 | 78 | | Name | Description | Value | 79 | |---------------------|--------------------------------------------------------------|-------| 80 | | `nameOverride` | Override the name | `""` | 81 | | `fullnameOverride` | Provide a name to substitute for the full names of resources | `""` | 82 | | `commonLabels` | Labels to add to all deployed objects | `{}` | 83 | | `commonAnnotations` | Annotations to add to all deployed objects | `{}` | 84 | 85 | ### Image parameters 86 | 87 | | Name | Description | Value | 88 | |---------------------|-----------------------------------------------------------------------------------------|--------------------| 89 | | `image.repository` | Cubestore image repository | `cubejs/cubestore` | 90 | | `image.tag` | Cubestore image tag (immutable tags are recommended) | `1.2.0` | 91 | | `image.pullPolicy` | Cubestore image pull policy | `IfNotPresent` | 92 | | `image.pullSecrets` | If defined, uses a Secret to pull an image from a private Docker registry or repository | `[]` | 93 | 94 | ### Global parameters 95 | 96 | | Name | Description | Value | 97 | |----------------------------|-------------------------------------------------------------------------------------------------------------------|---------| 98 | | `config.logLevel` | The logging level for Cube Store | `error` | 99 | | `config.noUpload` | If true, prevents uploading serialized pre-aggregations to cloud storage | | 100 | | `config.jobRunners` | The number of parallel tasks that process non-interactive jobs like data insertion, compaction etc. Defaults to 4 | | 101 | | `config.telemetry` | If true, then send telemetry to Cube | `false` | 102 | | `config.queryTimeout` | The timeout for SQL queries in seconds. Defaults to 120 | | 103 | | `config.selectWorkers` | The number of Cube Store sub-processes that handle SELECT queries. Defaults to 4 | | 104 | | `config.walSplitThreshold` | The maximum number of rows to keep in a single chunk of data right after insertion. Defaults to 262144 | | 105 | 106 | ### Remote dir parameters 107 | 108 | | Name | Description | Value | 109 | |----------------------------------------|----------------------------------------------------------------------------|-------------------| 110 | | `remoteDir.persistence.resourcePolicy` | Setting it to "keep" to avoid removing PVCs during a helm delete operation | `keep` | 111 | | `remoteDir.persistence.size` | Persistent Volume size | `10Gi` | 112 | | `remoteDir.persistence.annotations` | Additional custom annotations for the PVC | `{}` | 113 | | `remoteDir.persistence.accessModes` | Persistent Volume access modes | [`ReadWriteOnce`] | 114 | | `remoteDir.persistence.storageClass` | The storage class to use for the remoteDir pvc | `""` | 115 | 116 | ### Cloud Storage parameters 117 | 118 | | Name | Description | Value | 119 | |-----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|-------| 120 | | `cloudStorage.gcp.credentials` | A Base64 encoded JSON key file for connecting to Google Cloud. Required when using Google Cloud Storage | | 121 | | `cloudStorage.gcp.credentialsFromSecret.name` | A Base64 encoded JSON key file for connecting to Google Cloud. Required when using Google Cloud Storage (using secret) | | 122 | | `cloudStorage.gcp.credentialsFromSecret.key` | A Base64 encoded JSON key file for connecting to Google Cloud. Required when using Google Cloud Storage (using secret) | | 123 | | `cloudStorage.gcp.bucket` | The name of a bucket in GCS. Required when using GCS | | 124 | | `cloudStorage.gcp.subPath` | The path in a GCS bucket to store pre-aggregations. Optional | | 125 | | `cloudStorage.aws.accessKeyID` | The Access Key ID for AWS. Required when using AWS S3 | | 126 | | `cloudStorage.aws.secretKey` | The Secret Access Key for AWS. Required when using AWS S3 | | 127 | | `cloudStorage.aws.secretKeyFromSecret.name` | The Secret Access Key for AWS. Required when using AWS S3 (using secret) | | 128 | | `cloudStorage.aws.secretKeyFromSecret.key` | The Secret Access Key for AWS. Required when using AWS S3 (using secret) | | 129 | | `cloudStorage.aws.bucket` | The name of a bucket in AWS S3. Required when using AWS S3 | | 130 | | `cloudStorage.aws.region` | The region of a bucket in AWS S3. Required when using AWS S3 | | 131 | | `cloudStorage.aws.subPath` | The path in a AWS S3 bucket to store pre-aggregations. Optional | | 132 | | `cloudStorage.aws.refreshCredsEveryMinutes` | The number of minutes after which Cube Store should refresh AWS credentials | | 133 | | `cloudStorage.minio.accessKeyID` | The The Access Key ID for minIO. Required when using minIO | | 134 | | `cloudStorage.minio.secretKey` | The Secret Access Key for minIO. Required when using minIO | | 135 | | `cloudStorage.minio.secretKeyFromSecret.name` | The Secret Access Key for minIO. Required when using minIO (using secret) | | 136 | | `cloudStorage.minio.secretKeyFromSecret.key` | The Secret Access Key for minIO. Required when using minIO (using secret) | | 137 | | `cloudStorage.minio.bucket` | The name of the bucket that you want to use minIO. Required when using minIO | | 138 | | `cloudStorage.minio.region` | The region of a bucket in S3 that you want to use minIO. Optional when using minIO | | 139 | | `cloudStorage.minio.subPath` | The path in a minIO bucket to store pre-aggregations. Optional | | 140 | | `cloudStorage.minio.endpoint` | The minIO server endpoint. Required when using minIO | | 141 | | `cloudStorage.minio.credentialsRefreshEveryMinutes` | The number of minutes after which Cube Store should refresh minIO credentials | | 142 | 143 | ### Metrics 144 | 145 | | Name | Description | Value | 146 | |-------------------|-----------------------------------------------------------------------------------------------------------------------|-------| 147 | | `metrics.format` | Define which metrics collector format. Set it to `statsd` if exporter.enabled is set to `true` | | 148 | | `metrics.address` | Required IP address to send metrics. Leave it blank if exporter.enabled is set to `true` | | 149 | | `metrics.port` | Required port to send where collector server accept UDP connections. Must be set if exporter.enabled is set to `true` | | 150 | 151 | ### Router parameters 152 | 153 | | Name | Description | Value | 154 | |------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|-------------------| 155 | | `router.serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | 156 | | `router.serviceAccount.name` | Name of the service account to use. If not set and create is true, a name is generated using the fullname template. | `""` | 157 | | `router.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `true` | 158 | | `router.serviceAccount.annotations` | Annotations for service account. Evaluated as a template. Only used if create is true. | `{}` | 159 | | `router.httpPort` | The port for Cube Store to listen to HTTP connections on | `3030` | 160 | | `router.metaPort` | The port for the router node to listen for connections on | `9999` | 161 | | `router.mysqlPort` | The port for Cube Store to listen to connections on | | 162 | | `router.statusPort` | The port for Cube Store to expose status probes | `3331` | 163 | | `router.extraEnvVars` | Extra environment variables to pass on to the pod. The value is evaluated as a template | `[]` | 164 | | `router.persistence.enabled` | Enable persistence for local data using Persistent Volume Claims | `false` | 165 | | `router.persistance.size` | Persistent Volume size | `10Gi` | 166 | | `router.persistence.storageClass` | The storage class to use for the router pvc | `""` | 167 | | `router.persistance.accessModes` | Persistent Volume access modes | [`ReadWriteOnce`] | 168 | | `router.persistance.annotations` | Additional custom annotations for the PVC | `{}` | 169 | | `router.affinity` | Affinity for pod assignment | `{}` | 170 | | `router.tolerations` | Tolerations for pod assignment | `{}` | 171 | | `router.nodeSelector` | Node selector for pod assignment | `{}` | 172 | | `router.spreadConstraints` | Topology spread constraint for pod assignment | `[]` | 173 | | `router.resources` | Define resources requests and limits for single Pods | `{}` | 174 | | `router.livenessProbe.enabled` | Enable livenessProbe | `true` | 175 | | `router.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `10` | 176 | | `router.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `30` | 177 | | `router.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `3` | 178 | | `router.livenessProbe.successThreshold` | Failure threshold for livenessProbe | `1` | 179 | | `router.livenessProbe.failureThreshold` | Success threshold for livenessProbe | `3` | 180 | | `router.readinessProbe.enabled` | Enable readinessProbe | `true` | 181 | | `router.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` | 182 | | `router.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `30` | 183 | | `router.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `3` | 184 | | `router.readinessProbe.successThreshold` | Failure threshold for readinessProbe | `1` | 185 | | `router.readinessProbe.failureThreshold` | Success threshold for readinessProbe | `3` | 186 | | `router.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | 187 | | `router.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | 188 | | `router.service.annotations` | Additional custom annotations for router service | `{}` | 189 | 190 | ### Workers parameters 191 | 192 | | Name | Description | Value | 193 | |-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|-------------------| 194 | | `workers.serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | 195 | | `workers.serviceAccount.name` | Name of the service account to use. If not set and create is true, a name is generated using the fullname template. | `""` | 196 | | `workers.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `true` | 197 | | `workers.serviceAccount.annotations` | Annotations for service account. Evaluated as a template. Only used if create is true. | `{}` | 198 | | `workers.workersCount` | Number of workers to deploy | `1` | 199 | | `workers.port` | The port for the router node to listen for connections on | `9001` | 200 | | `workers.extraEnvVars` | Extra environment variables to pass on to the pod. The value is evaluated as a template | `[]` | 201 | | `workers.persistence.enabled` | Enable persistence for local data using Persistent Volume Claims | `false` | 202 | | `workers.persistance.size` | Persistent Volume size | `10Gi` | 203 | | `workers.persistence.storageClass` | The storage class to use for the workers pvc | `""` | 204 | | `workers.persistance.accessModes` | Persistent Volume access modes | [`ReadWriteOnce`] | 205 | | `workers.persistance.annotations` | Additional custom annotations for the PVC | `{}` | 206 | | `workers.affinity` | Affinity for pod assignment | `{}` | 207 | | `workers.tolerations` | Tolerations for pod assignment | `{}` | 208 | | `workers.nodeSelector` | Node selector for pod assignment | `{}` | 209 | | `workers.spreadConstraints` | Topology spread constraint for pod assignment | `[]` | 210 | | `workers.resources` | Define resources requests and limits for single Pods | `{}` | 211 | | `workers.service.annotations` | Additional custom annotations for workers service | `{}` | 212 | | `workers.initRouter.image.repository` | Defines the image repository for the init-router initContainer | `busybox` | 213 | | `workers.initRouter.image.tag` | Defines the image tag for the init-router initContainer | `latest` | 214 | | `workers.initRouter.resources` | Defines resources for init-router initContainer | `{}` | 215 | 216 | ### Statsd exporter parameters 217 | 218 | You can enable statsd-prometheus-exporter as sidecar container for router stateful set. 219 | 220 | | Name | Description | Value | 221 | |----------------------------------------|-----------------------------------------------------------------------------------------------------------------|-----------------------------| 222 | | `exporter.enabled` | Whether statsd-prometheus-exporter will be enabled | `true` | 223 | | `exporter.image.repository` | Exporter image repo | `prom/statsd-exporter` | 224 | | `exporter.image.tag` | Labels to add to all deployed objects | `v0.24.0` | 225 | | `exporter.extraArgs` | Extra arguments for pass for statsd-prometheus-exporter | `[]` | 226 | | `exporter.statsd.cacheSize` | Maximum size of your metric mapping cache | `1000` | 227 | | `exporter.statsd.eventQueueSize` | Size of internal queue for processing events | `10000` | 228 | | `exporter.statsd.eventFlushThreshold` | Number of events to hold in queue before flushing | `1000` | 229 | | `exporter.statsd.eventFlushInterval` | Time interval before flushing events in queue | `200ms` | 230 | | `exporter.statsd.useDefaultMapping` | Whether use default mapping. If set to false, you should provide your own configMap with statsd metrics mapping | `true` | 231 | | `exporter.statsd.mappingConfigMapName` | Metrics mapping ConfigMap | `cubestore-metrics-mapping` | 232 | | `exporter.statsd.mappingConfigMapKey` | Name of the key inside Metric mapping ConfigMap. | `statsd.mappingConf` | 233 | | `exporter.livenessProbe` | Liveness probe for exporter container | `{ }` | 234 | | `exporter.readinessProbe` | Readiness probe for exporter container | `{ }` | 235 | | `exporter.resources` | Resources for exporter container | `{ }` | 236 | | `exporter.service.port` | The address on which to expose the web interface and generated Prometheus metrics container | `9102` | 237 | | `exporter.service.path` | Path under which to expose metrics | `/metrics` | 238 | -------------------------------------------------------------------------------- /charts/cubestore/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* 2 | Expand the name of the chart. 3 | */}} 4 | {{- define "cubestore.name" -}} 5 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 6 | {{- end }} 7 | 8 | {{/* 9 | Create a default fully qualified app name. 10 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 11 | If release name contains chart name it will be used as a full name. 12 | */}} 13 | {{- define "cubestore.fullname" -}} 14 | {{- if .Values.fullnameOverride }} 15 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 16 | {{- else }} 17 | {{- $name := default .Chart.Name .Values.nameOverride }} 18 | {{- if contains $name .Release.Name }} 19 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 20 | {{- else }} 21 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 22 | {{- end }} 23 | {{- end }} 24 | {{- end }} 25 | 26 | {{/* 27 | Create chart name and version as used by the chart label. 28 | */}} 29 | {{- define "cubestore.chart" -}} 30 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 31 | {{- end }} 32 | 33 | {{/* 34 | Common labels 35 | */}} 36 | {{- define "cubestore.labels" -}} 37 | helm.sh/chart: {{ include "cubestore.chart" . }} 38 | {{ include "cubestore.selectorLabels" . }} 39 | {{- if .Chart.AppVersion }} 40 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 41 | {{- end }} 42 | app.kubernetes.io/managed-by: {{ .Release.Service }} 43 | {{- end }} 44 | 45 | {{/* 46 | Selector labels 47 | */}} 48 | {{- define "cubestore.selectorLabels" -}} 49 | app.kubernetes.io/name: {{ include "cubestore.name" . }} 50 | app.kubernetes.io/instance: {{ .Release.Name }} 51 | {{- end }} 52 | 53 | {{/* 54 | Create the name of cubestore router service account to use 55 | */}} 56 | {{- define "cubestore.router.serviceAccountName" -}} 57 | {{- if .Values.router.serviceAccount.create -}} 58 | {{ default (printf "%s-router" (include "cubestore.fullname" .)) .Values.router.serviceAccount.name }} 59 | {{- else -}} 60 | {{ default "default" .Values.router.serviceAccount.name }} 61 | {{- end -}} 62 | {{- end -}} 63 | 64 | {{/* 65 | Create the name of cubestore workers service account to use 66 | */}} 67 | {{- define "cubestore.workers.serviceAccountName" -}} 68 | {{- if .Values.workers.serviceAccount.create -}} 69 | {{ default (printf "%s-workers" (include "cubestore.fullname" .)) .Values.workers.serviceAccount.name }} 70 | {{- else -}} 71 | {{ default "default" .Values.workers.serviceAccount.name }} 72 | {{- end -}} 73 | {{- end -}} 74 | 75 | {{/* 76 | Renders a value that contains template. 77 | Usage: 78 | {{ include "cubestore.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }} 79 | */}} 80 | {{- define "cubestore.tplvalues.render" -}} 81 | {{- if typeIs "string" .value }} 82 | {{- tpl .value .context }} 83 | {{- else }} 84 | {{- tpl (.value | toYaml) .context }} 85 | {{- end }} 86 | {{- end -}} 87 | -------------------------------------------------------------------------------- /charts/cubestore/templates/common-env.tpl: -------------------------------------------------------------------------------- 1 | {{- define "cubestore.common-env" -}} 2 | {{- if .Values.config.logLevel }} 3 | - name: CUBESTORE_LOG_LEVEL 4 | value: {{ .Values.config.logLevel | quote }} 5 | {{- end }} 6 | {{- if .Values.config.noUpload }} 7 | - name: CUBESTORE_NO_UPLOAD 8 | value: {{ .Values.config.noUpload | quote }} 9 | {{- end }} 10 | - name: CUBESTORE_TELEMETRY 11 | value: {{ .Values.config.telemetry | quote }} 12 | {{- if .Values.config.jobRunners }} 13 | - name: CUBESTORE_JOB_RUNNERS 14 | value: {{ .Values.config.jobRunners | quote }} 15 | {{- end }} 16 | {{- if .Values.config.queryTimeout }} 17 | - name: CUBESTORE_QUERY_TIMEOUT 18 | value: {{ .Values.config.queryTimeout | quote }} 19 | {{- end }} 20 | {{- if .Values.config.walSplitThreshold }} 21 | - name: CUBESTORE_WAL_SPLIT_THRESHOLD 22 | value: {{ .Values.config.walSplitThreshold | quote }} 23 | {{- end }} 24 | {{- if .Values.cloudStorage.gcp.bucket }} 25 | - name: CUBESTORE_GCS_BUCKET 26 | value: {{ .Values.cloudStorage.gcp.bucket | quote }} 27 | {{- end }} 28 | {{- if .Values.cloudStorage.gcp.subPath }} 29 | - name: CUBESTORE_GCS_SUB_PATH 30 | value: {{ .Values.cloudStorage.gcp.subPath | quote }} 31 | {{- end }} 32 | {{- if .Values.cloudStorage.gcp.credentials }} 33 | - name: CUBESTORE_GCP_CREDENTIALS 34 | value: {{ .Values.cloudStorage.gcp.credentials | quote }} 35 | {{- else if .Values.cloudStorage.gcp.credentialsFromSecret }} 36 | - name: CUBESTORE_GCP_CREDENTIALS 37 | valueFrom: 38 | secretKeyRef: 39 | name: {{ .Values.cloudStorage.gcp.credentialsFromSecret.name | required "cloudStorage.gcp.credentialsFromSecret.name is required" }} 40 | key: {{ .Values.cloudStorage.gcp.credentialsFromSecret.key | required "cloudStorage.gcp.credentialsFromSecret.key is required" }} 41 | {{- end }} 42 | {{- if .Values.cloudStorage.aws.accessKeyID }} 43 | - name: CUBESTORE_AWS_ACCESS_KEY_ID 44 | value: {{ .Values.cloudStorage.aws.accessKeyID | quote }} 45 | {{- else if .Values.cloudStorage.aws.accessKeyIDFromSecret }} 46 | - name: CUBESTORE_AWS_ACCESS_KEY_ID 47 | valueFrom: 48 | secretKeyRef: 49 | name: {{ .Values.cloudStorage.aws.accessKeyIDFromSecret.name | required "cloudStorage.aws.accessKeyIDFromSecret.name is required" }} 50 | key: {{ .Values.cloudStorage.aws.accessKeyIDFromSecret.key | required "cloudStorage.aws.accessKeyIDFromSecret.key is required" }} 51 | {{- end }} 52 | {{- if .Values.cloudStorage.aws.secretKey }} 53 | - name: CUBESTORE_AWS_SECRET_ACCESS_KEY 54 | value: {{ .Values.cloudStorage.aws.secretKey | quote }} 55 | {{- else if .Values.cloudStorage.aws.secretKeyFromSecret }} 56 | - name: CUBESTORE_AWS_SECRET_ACCESS_KEY 57 | valueFrom: 58 | secretKeyRef: 59 | name: {{ .Values.cloudStorage.aws.secretKeyFromSecret.name | required "cloudStorage.aws.secretKeyFromSecret.name is required" }} 60 | key: {{ .Values.cloudStorage.aws.secretKeyFromSecret.key | required "cloudStorage.aws.secretKeyFromSecret.key is required" }} 61 | {{- end }} 62 | {{- if .Values.cloudStorage.aws.bucket }} 63 | - name: CUBESTORE_S3_BUCKET 64 | value: {{ .Values.cloudStorage.aws.bucket | quote }} 65 | {{- end }} 66 | {{- if .Values.cloudStorage.aws.region }} 67 | - name: CUBESTORE_S3_REGION 68 | value: {{ .Values.cloudStorage.aws.region | quote }} 69 | {{- end }} 70 | {{- if .Values.cloudStorage.aws.subPath }} 71 | - name: CUBESTORE_S3_SUB_PATH 72 | value: {{ .Values.cloudStorage.aws.subPath | quote }} 73 | {{- end }} 74 | {{- if .Values.cloudStorage.aws.refreshCredsEveryMinutes }} 75 | - name: CUBESTORE_AWS_CREDS_REFRESH_EVERY_MINS 76 | value: {{ .Values.cloudStorage.aws.refreshCredsEveryMinutes | quote }} 77 | {{- end }} 78 | {{- if .Values.cloudStorage.minio.accessKeyID }} 79 | - name: CUBESTORE_MINIO_ACCESS_KEY_ID 80 | value: {{ .Values.cloudStorage.minio.accessKeyID | quote }} 81 | {{- end }} 82 | {{- if .Values.cloudStorage.minio.secretKey }} 83 | - name: CUBESTORE_MINIO_SECRET_ACCESS_KEY 84 | value: {{ .Values.cloudStorage.minio.secretKey | quote }} 85 | {{- else if .Values.cloudStorage.minio.secretKeyFromSecret }} 86 | - name: CUBESTORE_MINIO_SECRET_ACCESS_KEY 87 | valueFrom: 88 | secretKeyRef: 89 | name: {{ .Values.cloudStorage.minio.secretKeyFromSecret.name | required "cloudStorage.minio.secretKeyFromSecret.name is required" }} 90 | key: {{ .Values.cloudStorage.minio.secretKeyFromSecret.key | required "cloudStorage.minio.secretKeyFromSecret.key is required" }} 91 | {{- end }} 92 | {{- if .Values.cloudStorage.minio.bucket }} 93 | - name: CUBESTORE_MINIO_BUCKET 94 | value: {{ .Values.cloudStorage.minio.bucket | quote }} 95 | {{- end }} 96 | {{- if .Values.cloudStorage.minio.region }} 97 | - name: CUBESTORE_MINIO_REGION 98 | value: {{ .Values.cloudStorage.minio.region | quote }} 99 | {{- end }} 100 | {{- if .Values.cloudStorage.minio.subPath }} 101 | - name: CUBESTORE_MINIO_SUB_PATH 102 | value: {{ .Values.cloudStorage.minio.subPath | quote }} 103 | {{- end }} 104 | {{- if .Values.cloudStorage.minio.endpoint }} 105 | - name: CUBESTORE_MINIO_SERVER_ENDPOINT 106 | value: {{ .Values.cloudStorage.minio.endpoint | quote }} 107 | {{- end }} 108 | {{- if .Values.cloudStorage.minio.credentialsRefreshEveryMinutes }} 109 | - name: CUBESTORE_MINIO_CREDS_REFRESH_EVERY_MINS 110 | value: {{ .Values.cloudStorage.minio.credentialsRefreshEveryMinutes | quote }} 111 | {{- end }} 112 | {{- if .Values.metrics.format }} 113 | - name: CUBESTORE_METRICS_FORMAT 114 | value: {{ .Values.metrics.format | quote }} 115 | {{- end }} 116 | {{- if .Values.metrics.address }} 117 | - name: CUBESTORE_METRICS_ADDRESS 118 | value: {{ .Values.metrics.address | quote }} 119 | {{- end }} 120 | {{- if .Values.metrics.port }} 121 | - name: CUBESTORE_METRICS_PORT 122 | value: {{ .Values.metrics.port | quote }} 123 | {{- end }} 124 | {{- end }} 125 | -------------------------------------------------------------------------------- /charts/cubestore/templates/pvc.yaml: -------------------------------------------------------------------------------- 1 | {{- if and (not .Values.cloudStorage.gcp.bucket) (not .Values.cloudStorage.aws.bucket) (not .Values.cloudStorage.minio.bucket) }} 2 | kind: PersistentVolumeClaim 3 | apiVersion: v1 4 | metadata: 5 | name: {{ printf "%s-remote-storage" (include "cubestore.fullname" .) }} 6 | labels: 7 | app.kubernetes.io/component: remote-storage 8 | {{- include "cubestore.selectorLabels" . | nindent 4 }} 9 | {{- if .Values.commonLabels }} 10 | {{- toYaml .Values.commonLabels | nindent 4 }} 11 | {{- end }} 12 | {{- if or .Values.remoteDir.persistence.annotations (eq .Values.remoteDir.persistence.resourcePolicy "keep") .Values.commonAnnotations }} 13 | annotations: 14 | {{- if .Values.securityContext.enabled }} 15 | pv.beta.kubernetes.io/gid: {{ .Values.securityContext.fsGroup | quote }} 16 | {{- end }} 17 | {{- if .Values.remoteDir.persistence.annotations }} 18 | {{- toYaml .Values.remoteDir.persistence.annotations | nindent 4 }} 19 | {{- end }} 20 | {{- if eq .Values.remoteDir.persistence.resourcePolicy "keep" }} 21 | helm.sh/resource-policy: keep 22 | {{- end }} 23 | {{- if .Values.commonAnnotations }} 24 | {{- toYaml .Values.commonAnnotations | nindent 4 }} 25 | {{- end }} 26 | {{- end }} 27 | spec: 28 | accessModes: 29 | {{- range .Values.remoteDir.persistence.accessModes }} 30 | - {{ . | quote }} 31 | {{- end }} 32 | resources: 33 | requests: 34 | storage: {{ .Values.remoteDir.persistence.size }} 35 | {{- if .Values.remoteDir.persistence.storageClass }} 36 | storageClassName: {{ .Values.remoteDir.persistence.storageClass }} 37 | {{- end}} 38 | {{- end }} 39 | -------------------------------------------------------------------------------- /charts/cubestore/templates/router/configmap-statsd-mapping.yml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.exporter.enabled .Values.exporter.statsd.useDefaultMapping }} 2 | kind: ConfigMap 3 | apiVersion: v1 4 | metadata: 5 | name: {{ .Values.exporter.statsd.mappingConfigMapName }} 6 | labels: 7 | {{- include "cubestore.labels" . | nindent 4 }} 8 | {{- if .Values.commonLabels }} 9 | {{- toYaml .Values.commonLabels | nindent 4 }} 10 | {{- end }} 11 | data: 12 | {{ .Values.exporter.statsd.mappingConfigMapKey }}: | 13 | mappings: 14 | - match: ".+" 15 | match_type: regex 16 | name: "$0" 17 | labels: 18 | statsd_metric_name: "$0" 19 | {{- end }} 20 | -------------------------------------------------------------------------------- /charts/cubestore/templates/router/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ printf "%s-router" (include "cubestore.fullname" .) }} 5 | labels: 6 | app.kubernetes.io/component: router 7 | {{- include "cubestore.labels" . | nindent 4 }} 8 | {{- if .Values.commonLabels }} 9 | {{- toYaml .Values.commonLabels | nindent 4 }} 10 | {{- end }} 11 | {{- if (or .Values.commonAnnotations .Values.router.service.annotations) }} 12 | annotations: 13 | {{- if .Values.commonAnnotations }} 14 | {{- toYaml .Values.commonAnnotations | nindent 4 }} 15 | {{- end }} 16 | {{- if .Values.router.service.annotations }} 17 | {{- toYaml .Values.router.service.annotations | nindent 4 }} 18 | {{- end }} 19 | {{- end }} 20 | spec: 21 | ports: 22 | - name: http 23 | port: {{ .Values.router.httpPort }} 24 | targetPort: http 25 | - name: meta 26 | port: {{ .Values.router.metaPort }} 27 | targetPort: meta 28 | {{- if .Values.router.mysqlPort }} 29 | - name: mysql 30 | port: {{ .Values.router.mysqlPort }} 31 | targetPort: mysql 32 | {{- end }} 33 | {{- if .Values.exporter.enabled }} 34 | - name: http-metrics 35 | port: {{ .Values.exporter.service.port }} 36 | targetPort: http-metrics 37 | {{- end }} 38 | selector: 39 | app.kubernetes.io/component: router 40 | {{- include "cubestore.selectorLabels" . | nindent 4 }} 41 | -------------------------------------------------------------------------------- /charts/cubestore/templates/router/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.router.serviceAccount.create }} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ template "cubestore.router.serviceAccountName" . }} 6 | labels: 7 | {{- include "cubestore.labels" . | nindent 4 }} 8 | {{- if .Values.commonLabels }} 9 | {{- toYaml .Values.commonLabels | nindent 4 }} 10 | {{- end }} 11 | {{- if .Values.router.serviceAccount.annotations }} 12 | annotations: 13 | {{- toYaml .Values.router.serviceAccount.annotations | nindent 4 }} 14 | {{- end }} 15 | automountServiceAccountToken: {{ .Values.router.serviceAccount.automountServiceAccountToken }} 16 | {{- end }} 17 | -------------------------------------------------------------------------------- /charts/cubestore/templates/router/statefulset.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: StatefulSet 3 | metadata: 4 | name: {{ printf "%s-router" (include "cubestore.fullname" .) }} 5 | labels: 6 | {{- include "cubestore.labels" . | nindent 4 }} 7 | {{- if .Values.commonLabels }} 8 | {{- toYaml .Values.commonLabels | nindent 4 }} 9 | {{- end }} 10 | {{- if .Values.commonAnnotations }} 11 | annotations: 12 | {{- toYaml .Values.commonAnnotations | nindent 4 }} 13 | {{- end }} 14 | spec: 15 | serviceName: {{ printf "%s-router" (include "cubestore.fullname" .) }} 16 | replicas: 1 17 | selector: 18 | matchLabels: 19 | app.kubernetes.io/component: router 20 | {{- include "cubestore.selectorLabels" . | nindent 6 }} 21 | template: 22 | metadata: 23 | labels: 24 | app.kubernetes.io/component: router 25 | {{- include "cubestore.selectorLabels" . | nindent 8 }} 26 | {{- if .Values.commonLabels }} 27 | {{- toYaml .Values.commonLabels | nindent 8 }} 28 | {{- end }} 29 | {{- if .Values.commonAnnotations }} 30 | annotations: 31 | {{- toYaml .Values.commonAnnotations | nindent 8 }} 32 | {{- end }} 33 | spec: 34 | serviceAccountName: {{ template "cubestore.router.serviceAccountName" . }} 35 | {{- with .Values.image.pullSecrets }} 36 | imagePullSecrets: 37 | {{- toYaml . | nindent 8 }} 38 | {{- end }} 39 | {{- if .Values.securityContext.enabled }} 40 | securityContext: 41 | runAsUser: {{ .Values.securityContext.runAsUser }} 42 | fsGroup: {{ .Values.securityContext.fsGroup }} 43 | {{- end }} 44 | containers: 45 | - name: cubestore 46 | {{- if .Values.image.tag }} 47 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 48 | {{- else }} 49 | image: "{{ .Values.image.repository }}:v{{ .Chart.AppVersion }}" 50 | {{- end }} 51 | imagePullPolicy: {{ .Values.image.pullPolicy | quote }} 52 | ports: 53 | - name: http 54 | containerPort: {{ .Values.router.httpPort }} 55 | protocol: TCP 56 | - name: meta 57 | containerPort: {{ .Values.router.metaPort }} 58 | protocol: TCP 59 | {{- if .Values.router.mysqlPort }} 60 | - name: mysql 61 | containerPort: {{ .Values.router.mysqlPort }} 62 | protocol: TCP 63 | {{- end }} 64 | - name: status 65 | containerPort: {{ .Values.router.statusPort }} 66 | protocol: TCP 67 | env: 68 | {{- include "cubestore.common-env" . | nindent 12 }} 69 | {{- $fullName := include "cubestore.fullname" . }} 70 | {{- $headlessServiceName := printf "%s-%s" $fullName "headless" }} 71 | {{- $workerPort := .Values.workers.port | int }} 72 | - name: CUBESTORE_SERVER_NAME 73 | value: {{ printf "%s-router:%d" (include "cubestore.fullname" .) (.Values.router.metaPort | int) }} 74 | {{- if .Values.router.mysqlPort }} 75 | - name: CUBESTORE_PORT 76 | value: {{ .Values.router.mysqlPort | quote }} 77 | {{- end }} 78 | - name: CUBESTORE_HTTP_PORT 79 | value: {{ .Values.router.httpPort | quote }} 80 | - name: CUBESTORE_META_PORT 81 | value: {{ .Values.router.metaPort | quote }} 82 | - name: CUBESTORE_STATUS_PORT 83 | value: {{ .Values.router.statusPort | quote }} 84 | {{ if gt (.Values.workers.workersCount | int) 0 }} 85 | {{- $workers := list }} 86 | {{- range $e, $i := until ($.Values.workers.workersCount | int) }} 87 | {{- $workers = append $workers (printf "%s-workers-%d.%s:%d" $fullName $i $headlessServiceName $workerPort) }} 88 | {{- end }} 89 | - name: CUBESTORE_WORKERS 90 | value: {{ join "," $workers | quote }} 91 | {{- end }} 92 | - name: CUBESTORE_DATA_DIR 93 | value: /cube/.cubestore/data 94 | {{- if and (not .Values.cloudStorage.gcp.bucket) (not .Values.cloudStorage.aws.bucket) (not .Values.cloudStorage.minio.bucket) }} 95 | - name: CUBESTORE_REMOTE_DIR 96 | value: /cube/data 97 | {{- end }} 98 | {{- if .Values.router.extraEnvVars }} 99 | {{- include "cubestore.tplvalues.render" (dict "value" .Values.router.extraEnvVars "context" $) | nindent 12 }} 100 | {{- end }} 101 | {{- if .Values.router.livenessProbe.enabled }} 102 | livenessProbe: 103 | initialDelaySeconds: {{ .Values.router.livenessProbe.initialDelaySeconds }} 104 | periodSeconds: {{ .Values.router.livenessProbe.periodSeconds }} 105 | timeoutSeconds: {{ .Values.router.livenessProbe.timeoutSeconds }} 106 | successThreshold: {{ .Values.router.livenessProbe.successThreshold }} 107 | failureThreshold: {{ .Values.router.livenessProbe.failureThreshold }} 108 | httpGet: 109 | path: /livez 110 | port: status 111 | {{- else if .Values.router.customLivenessProbe }} 112 | livenessProbe: 113 | {{- toYaml .Values.router.customLivenessProbe | nindent 12 }} 114 | {{- end }} 115 | {{- if .Values.router.readinessProbe.enabled }} 116 | readinessProbe: 117 | initialDelaySeconds: {{ .Values.router.readinessProbe.initialDelaySeconds }} 118 | periodSeconds: {{ .Values.router.readinessProbe.periodSeconds }} 119 | timeoutSeconds: {{ .Values.router.readinessProbe.timeoutSeconds }} 120 | successThreshold: {{ .Values.router.readinessProbe.successThreshold }} 121 | failureThreshold: {{ .Values.router.readinessProbe.failureThreshold }} 122 | httpGet: 123 | path: /readyz 124 | port: status 125 | {{- else if .Values.router.customReadinessProbe }} 126 | readinessProbe: 127 | {{- toYaml .Values.router.customReadinessProbe | nindent 12 }} 128 | {{- end }} 129 | {{- if .Values.router.resources }} 130 | resources: 131 | {{- toYaml .Values.router.resources | nindent 12 }} 132 | {{- end }} 133 | volumeMounts: 134 | - name: datadir 135 | mountPath: /cube/.cubestore/data 136 | {{- if and (not .Values.cloudStorage.gcp.bucket) (not .Values.cloudStorage.aws.bucket) (not .Values.cloudStorage.minio.bucket) }} 137 | - name: remotedir 138 | mountPath: /cube/data 139 | {{- end }} 140 | {{- if .Values.exporter.enabled }} 141 | - name: statsd-exporter 142 | image: "{{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }}" 143 | imagePullPolicy: {{ .Values.image.pullPolicy }} 144 | args: 145 | - '--web.listen-address=0.0.0.0:{{ .Values.exporter.service.port }}' 146 | - --web.telemetry-path={{ .Values.exporter.service.path }} 147 | - '--statsd.listen-udp=0.0.0.0:{{ .Values.metrics.port }}' 148 | - --statsd.cache-size={{ .Values.exporter.statsd.cacheSize }} 149 | - --statsd.event-queue-size={{ .Values.exporter.statsd.eventQueueSize }} 150 | - --statsd.event-flush-threshold={{ .Values.exporter.statsd.eventFlushThreshold }} 151 | - --statsd.event-flush-interval={{ .Values.exporter.statsd.eventFlushInterval }} 152 | - --statsd.mapping-config=/etc/prometheus-statsd-exporter/statsd-mapping.conf 153 | {{- if .Values.exporter.extraArgs }} 154 | {{- toYaml .Values.exporter.extraArgs | nindent 12 }} 155 | {{- end }} 156 | ports: 157 | - name: http-metrics 158 | containerPort: {{ .Values.exporter.service.port }} 159 | protocol: TCP 160 | {{- if .Values.metrics.port }} 161 | - name: metrics 162 | containerPort: {{ .Values.metrics.port }} 163 | protocol: UDP 164 | {{- end }} 165 | resources: 166 | {{- toYaml .Values.exporter.resources | nindent 12 }} 167 | volumeMounts: 168 | - name: statsd-mapping-config 169 | mountPath: /etc/prometheus-statsd-exporter 170 | {{- end }} 171 | volumes: 172 | {{- if not .Values.router.persistence.enabled }} 173 | - name: datadir 174 | emptyDir: {} 175 | {{- end }} 176 | {{- if and (not .Values.cloudStorage.gcp.bucket) (not .Values.cloudStorage.aws.bucket) (not .Values.cloudStorage.minio.bucket) }} 177 | - name: remotedir 178 | persistentVolumeClaim: 179 | claimName: {{ printf "%s-remote-storage" (include "cubestore.fullname" .) }} 180 | {{- end }} 181 | {{- if .Values.exporter.enabled }} 182 | - name: statsd-mapping-config 183 | configMap: 184 | name: {{ .Values.exporter.statsd.mappingConfigMapName }} 185 | items: 186 | - key: {{ .Values.exporter.statsd.mappingConfigMapKey }} 187 | path: statsd-mapping.conf 188 | {{- end }} 189 | {{- if .Values.router.affinity }} 190 | affinity: 191 | {{- toYaml .Values.router.affinity | nindent 8 }} 192 | {{- end }} 193 | {{- if .Values.router.tolerations }} 194 | tolerations: 195 | {{- toYaml .Values.router.tolerations | nindent 8 }} 196 | {{- end }} 197 | {{- if .Values.router.nodeSelector }} 198 | nodeSelector: 199 | {{- toYaml .Values.router.nodeSelector | nindent 8 }} 200 | {{- end }} 201 | {{- if .Values.router.spreadConstraints }} 202 | topologySpreadConstraints: 203 | {{- toYaml .Values.router.spreadConstraints | nindent 8 }} 204 | {{- end }} 205 | 206 | {{- if .Values.router.persistence.enabled }} 207 | volumeClaimTemplates: 208 | - metadata: 209 | name: datadir 210 | labels: 211 | app.kubernetes.io/component: router 212 | {{- include "cubestore.selectorLabels" . | nindent 10 }} 213 | {{- if .Values.router.persistence.annotations }} 214 | annotations: {{- toYaml .Values.router.persistence.annotations | nindent 10 }} 215 | {{- end }} 216 | spec: 217 | accessModes: 218 | {{- range .Values.router.persistence.accessModes }} 219 | - {{ . | quote }} 220 | {{- end }} 221 | {{- if .Values.router.persistence.storageClass }} 222 | storageClassName: {{ .Values.router.persistence.storageClass }} 223 | {{- end }} 224 | resources: 225 | requests: 226 | storage: {{ .Values.router.persistence.size | quote }} 227 | {{- end }} 228 | -------------------------------------------------------------------------------- /charts/cubestore/templates/workers/service-headless.yaml: -------------------------------------------------------------------------------- 1 | {{- if gt (.Values.workers.workersCount | int) 0 }} 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: {{ printf "%s-headless" (include "cubestore.fullname" .) }} 6 | labels: 7 | app.kubernetes.io/component: workers 8 | {{- include "cubestore.labels" . | nindent 4 }} 9 | {{- if .Values.commonLabels }} 10 | {{- toYaml .Values.commonLabels | nindent 4 }} 11 | {{- end }} 12 | {{- if (or .Values.commonAnnotations .Values.workers.service.annotations) }} 13 | annotations: 14 | {{- if .Values.commonAnnotations }} 15 | {{- toYaml .Values.commonAnnotations | nindent 4 }} 16 | {{- end }} 17 | {{- if .Values.workers.service.annotations }} 18 | {{- toYaml .Values.workers.service.annotations | nindent 4 }} 19 | {{- end }} 20 | {{- end }} 21 | spec: 22 | type: ClusterIP 23 | clusterIP: None 24 | ports: 25 | - name: worker 26 | port: {{ .Values.workers.port }} 27 | targetPort: worker 28 | {{- if .Values.exporter.enabled }} 29 | - name: http-metrics 30 | port: {{ .Values.exporter.service.port }} 31 | targetPort: http-metrics 32 | {{- end }} 33 | selector: 34 | app.kubernetes.io/component: workers 35 | {{- include "cubestore.selectorLabels" . | nindent 4 }} 36 | {{- end }} 37 | -------------------------------------------------------------------------------- /charts/cubestore/templates/workers/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.workers.serviceAccount.create }} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ template "cubestore.workers.serviceAccountName" . }} 6 | labels: 7 | {{- include "cubestore.labels" . | nindent 4 }} 8 | {{- if .Values.commonLabels }} 9 | {{- toYaml .Values.commonLabels | nindent 4 }} 10 | {{- end }} 11 | {{- if .Values.workers.serviceAccount.annotations }} 12 | annotations: 13 | {{- toYaml .Values.workers.serviceAccount.annotations | nindent 4 }} 14 | {{- end }} 15 | automountServiceAccountToken: {{ .Values.workers.serviceAccount.automountServiceAccountToken }} 16 | {{- end }} 17 | -------------------------------------------------------------------------------- /charts/cubestore/templates/workers/statefulset.yaml: -------------------------------------------------------------------------------- 1 | {{- if gt (.Values.workers.workersCount | int) 0 }} 2 | apiVersion: apps/v1 3 | kind: StatefulSet 4 | metadata: 5 | name: {{ printf "%s-workers" (include "cubestore.fullname" .) }} 6 | labels: 7 | {{- include "cubestore.labels" . | nindent 4 }} 8 | {{- if .Values.commonLabels }} 9 | {{- toYaml .Values.commonLabels | nindent 4 }} 10 | {{- end }} 11 | {{- if .Values.commonAnnotations }} 12 | annotations: 13 | {{- toYaml .Values.commonAnnotations | nindent 4 }} 14 | {{- end }} 15 | spec: 16 | replicas: {{ .Values.workers.workersCount }} 17 | serviceName: {{ printf "%s-headless" (include "cubestore.fullname" .) }} 18 | selector: 19 | matchLabels: 20 | app.kubernetes.io/component: workers 21 | {{- include "cubestore.selectorLabels" . | nindent 6 }} 22 | template: 23 | metadata: 24 | labels: 25 | app.kubernetes.io/component: workers 26 | {{- include "cubestore.selectorLabels" . | nindent 8 }} 27 | {{- if .Values.commonLabels }} 28 | {{- toYaml .Values.commonLabels | nindent 8 }} 29 | {{- end }} 30 | {{- if .Values.commonAnnotations }} 31 | annotations: 32 | {{- toYaml .Values.commonAnnotations | nindent 8 }} 33 | {{- end }} 34 | spec: 35 | serviceAccountName: {{ template "cubestore.workers.serviceAccountName" . }} 36 | {{- with .Values.image.pullSecrets }} 37 | imagePullSecrets: 38 | {{- toYaml . | nindent 8 }} 39 | {{- end }} 40 | {{- if .Values.securityContext.enabled }} 41 | securityContext: 42 | runAsUser: {{ .Values.securityContext.runAsUser }} 43 | fsGroup: {{ .Values.securityContext.fsGroup }} 44 | {{- end }} 45 | containers: 46 | - name: cubestore 47 | {{- if .Values.image.tag }} 48 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 49 | {{- else }} 50 | image: "{{ .Values.image.repository }}:v{{ .Chart.AppVersion }}" 51 | {{- end }} 52 | imagePullPolicy: {{ .Values.image.pullPolicy | quote }} 53 | ports: 54 | - name: worker 55 | containerPort: {{ .Values.workers.port }} 56 | protocol: TCP 57 | env: 58 | {{- include "cubestore.common-env" . | nindent 12 }} 59 | {{- $fullName := include "cubestore.fullname" . }} 60 | {{- $headlessServiceName := printf "%s-%s" $fullName "headless" }} 61 | {{- $workerPort := .Values.workers.port | int }} 62 | - name: MY_POD_NAME 63 | valueFrom: 64 | fieldRef: 65 | fieldPath: metadata.name 66 | - name: CUBESTORE_SERVER_NAME 67 | value: {{ printf "$(MY_POD_NAME).%s:%d" $headlessServiceName $workerPort | quote }} 68 | - name: CUBESTORE_WORKER_PORT 69 | value: {{ .Values.workers.port | quote }} 70 | {{- $workers := list }} 71 | {{- range $e, $i := until ($.Values.workers.workersCount | int) }} 72 | {{- $workers = append $workers (printf "%s-workers-%d.%s:%d" $fullName $i $headlessServiceName $workerPort) }} 73 | {{- end }} 74 | - name: CUBESTORE_WORKERS 75 | value: {{ join "," $workers | quote }} 76 | - name: CUBESTORE_META_ADDR 77 | value: {{ printf "%s-router:%d" (include "cubestore.fullname" .) (.Values.router.metaPort | int) }} 78 | - name: CUBESTORE_DATA_DIR 79 | value: /cube/.cubestore/data 80 | {{- if and (not .Values.cloudStorage.gcp.bucket) (not .Values.cloudStorage.aws.bucket) (not .Values.cloudStorage.minio.bucket) }} 81 | - name: CUBESTORE_REMOTE_DIR 82 | value: /cube/data 83 | {{- end }} 84 | {{- if .Values.workers.extraEnvVars }} 85 | {{- include "cubestore.tplvalues.render" (dict "value" .Values.workers.extraEnvVars "context" $) | nindent 12 }} 86 | {{- end }} 87 | {{- if .Values.workers.resources }} 88 | resources: 89 | {{- toYaml .Values.workers.resources | nindent 12 }} 90 | {{- end }} 91 | volumeMounts: 92 | - name: datadir 93 | mountPath: /cube/.cubestore/data 94 | {{- if and (not .Values.cloudStorage.gcp.bucket) (not .Values.cloudStorage.aws.bucket) (not .Values.cloudStorage.minio.bucket) }} 95 | - name: remotedir 96 | mountPath: /cube/data 97 | {{- end }} 98 | {{- if .Values.exporter.enabled }} 99 | - name: statsd-exporter 100 | image: "{{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }}" 101 | imagePullPolicy: {{ .Values.image.pullPolicy }} 102 | args: 103 | - '--web.listen-address=0.0.0.0:{{ .Values.exporter.service.port }}' 104 | - --web.telemetry-path={{ .Values.exporter.service.path }} 105 | - '--statsd.listen-udp=0.0.0.0:{{ .Values.metrics.port }}' 106 | - --statsd.cache-size={{ .Values.exporter.statsd.cacheSize }} 107 | - --statsd.event-queue-size={{ .Values.exporter.statsd.eventQueueSize }} 108 | - --statsd.event-flush-threshold={{ .Values.exporter.statsd.eventFlushThreshold }} 109 | - --statsd.event-flush-interval={{ .Values.exporter.statsd.eventFlushInterval }} 110 | - --statsd.mapping-config=/etc/prometheus-statsd-exporter/statsd-mapping.conf 111 | {{- if .Values.exporter.extraArgs }} 112 | {{- toYaml .Values.exporter.extraArgs | nindent 12 }} 113 | {{- end }} 114 | ports: 115 | - name: http-metrics 116 | containerPort: {{ .Values.exporter.service.port }} 117 | protocol: TCP 118 | {{- if .Values.metrics.port }} 119 | - name: metrics 120 | containerPort: {{ .Values.metrics.port }} 121 | protocol: UDP 122 | {{- end }} 123 | resources: 124 | {{- toYaml .Values.exporter.resources | nindent 12 }} 125 | volumeMounts: 126 | - name: statsd-mapping-config 127 | mountPath: /etc/prometheus-statsd-exporter 128 | {{- end }} 129 | initContainers: 130 | - name: init-router 131 | image: "{{ .Values.workers.initRouter.image.repository }}:{{ .Values.workers.initRouter.image.tag }}" 132 | command: ['sh', '-c', 'until nc -vz {{ printf "%s-router" (include "cubestore.fullname" .)}} {{ .Values.router.metaPort }}; do echo "Waiting for router"; sleep 2; done;'] 133 | {{- if .Values.workers.initRouter.resources }} 134 | resources: 135 | {{- toYaml .Values.workers.initRouter.resources | nindent 12 }} 136 | {{- end }} 137 | volumes: 138 | {{- if not .Values.workers.persistence.enabled }} 139 | - name: datadir 140 | emptyDir: {} 141 | {{- end }} 142 | {{- if and (not .Values.cloudStorage.gcp.bucket) (not .Values.cloudStorage.aws.bucket) (not .Values.cloudStorage.minio.bucket) }} 143 | - name: remotedir 144 | persistentVolumeClaim: 145 | claimName: {{ printf "%s-remote-storage" (include "cubestore.fullname" .) }} 146 | {{- end }} 147 | {{- if .Values.exporter.enabled }} 148 | - name: statsd-mapping-config 149 | configMap: 150 | name: {{ .Values.exporter.statsd.mappingConfigMapName }} 151 | items: 152 | - key: {{ .Values.exporter.statsd.mappingConfigMapKey }} 153 | path: statsd-mapping.conf 154 | {{- end }} 155 | {{- if .Values.workers.affinity }} 156 | affinity: 157 | {{- toYaml .Values.workers.affinity | nindent 8 }} 158 | {{- end }} 159 | {{- if .Values.workers.tolerations }} 160 | tolerations: 161 | {{- toYaml .Values.workers.tolerations | nindent 8 }} 162 | {{- end }} 163 | {{- if .Values.workers.nodeSelector }} 164 | nodeSelector: 165 | {{- toYaml .Values.workers.nodeSelector | nindent 8 }} 166 | {{- end }} 167 | {{- if .Values.workers.spreadConstraints }} 168 | topologySpreadConstraints: 169 | {{- toYaml .Values.workers.spreadConstraints | nindent 8 }} 170 | {{- end }} 171 | 172 | {{- if .Values.workers.persistence.enabled }} 173 | volumeClaimTemplates: 174 | - metadata: 175 | name: datadir 176 | labels: 177 | app.kubernetes.io/component: cubestore-router 178 | {{- include "cubestore.selectorLabels" . | nindent 10 }} 179 | {{- if .Values.workers.persistence.annotations }} 180 | annotations: {{- toYaml .Values.workers.persistence.annotations | nindent 10 }} 181 | {{- end }} 182 | spec: 183 | accessModes: 184 | {{- range .Values.workers.persistence.accessModes }} 185 | - {{ . | quote }} 186 | {{- end }} 187 | {{- if .Values.workers.persistence.storageClass }} 188 | storageClassName: {{ .Values.workers.persistence.storageClass }} 189 | {{- end }} 190 | resources: 191 | requests: 192 | storage: {{ .Values.workers.persistence.size | quote }} 193 | {{- end }} 194 | {{- end }} 195 | -------------------------------------------------------------------------------- /charts/cubestore/values.yaml: -------------------------------------------------------------------------------- 1 | ## Override the name 2 | ## 3 | nameOverride: "" 4 | 5 | ## Provide a name to substitute for the full names of resources 6 | ## 7 | fullnameOverride: "" 8 | 9 | ## Labels to add to all deployed objects 10 | ## 11 | commonLabels: {} 12 | 13 | ## Annotations to add to all deployed objects 14 | ## 15 | commonAnnotations: {} 16 | 17 | image: 18 | ## Docker image repository 19 | ## 20 | repository: cubejs/cubestore 21 | 22 | ## Docker image tag. 23 | ## Defaults to Chart AppVersion 24 | ## 25 | tag: 26 | 27 | ## Specify a imagePullPolicy 28 | ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images 29 | ## 30 | pullPolicy: IfNotPresent 31 | 32 | ## Specify a imagePullSecrets 33 | ## ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod 34 | ## 35 | pullSecrets: [] 36 | 37 | ## Pod Security Context 38 | ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ 39 | ## Some admission policies only allow use of non root containers 40 | securityContext: 41 | enabled: false 42 | #fsGroup: 43 | #runAsUser: 44 | 45 | config: 46 | ## The logging level for Cube Store. 47 | ## 48 | logLevel: "error" 49 | 50 | ## If true, prevents uploading serialized pre-aggregations to cloud storage 51 | ## 52 | noUpload: 53 | 54 | ## The number of parallel tasks that process non-interactive jobs like data insertion, compaction etc. Defaults to 4 55 | ## 56 | jobRunners: 57 | 58 | ## If true, then send telemetry to Cube 59 | ## 60 | telemetry: false 61 | 62 | ## The timeout for SQL queries in seconds. Defaults to 120 63 | ## 64 | queryTimeout: 65 | 66 | ## The number of Cube Store sub-processes that handle SELECT queries. Defaults to 4 67 | ## 68 | selectWorkers: 69 | 70 | ## The maximum number of rows to keep in a single chunk of data right after insertion. Defaults to 262144 71 | ## 72 | walSplitThreshold: 73 | 74 | ## Used to define the shared volume to store metadata and datasets 75 | ## Prefer use cloudStorage if you are running on "gcp" or "aws" 76 | ## If a cloudStorage configuration is used, no remoteDir will be created 77 | ## 78 | remoteDir: 79 | persistence: 80 | ## Resource Policy 81 | ## Setting it to "keep" to avoid removing PVCs during a helm delete operation 82 | ## 83 | resourcePolicy: keep 84 | 85 | ## Persistent Volume size 86 | ## 87 | size: 10Gi 88 | 89 | ## Additional custom annotations for the PVC 90 | ## 91 | annotations: {} 92 | 93 | ## Persistent Volume access modes 94 | ## 95 | accessModes: 96 | - ReadWriteMany 97 | 98 | ## @param remoteDir.persistence.storageClass The storage class to use for the remoteDir pvc 99 | ## If defined, storageClassName: 100 | ## If undefined (the default) or set to null, no storageClassName spec is 101 | ## set, choosing the default provisioner. (gp2 on AWS, standard on 102 | ## GKE, AWS & OpenStack) 103 | ## 104 | storageClass: 105 | 106 | cloudStorage: 107 | gcp: 108 | ## A Base64 encoded JSON key file for connecting to Google Cloud. Required when using Google Cloud Storage 109 | ## 110 | credentials: 111 | # credentialsFromSecret: 112 | # name: 113 | # key: 114 | 115 | ## The name of a bucket in GCS. Required when using GCS 116 | ## 117 | bucket: 118 | 119 | ## The path in a GCS bucket to store pre-aggregations. Optional 120 | ## 121 | subPath: 122 | 123 | aws: 124 | ## The Access Key ID for AWS. Required when using AWS S3 125 | ## 126 | accessKeyID: 127 | # accessKeyIDFromSecret: 128 | # name: 129 | # key: 130 | 131 | ## The Secret Access Key for AWS. Required when using AWS S3 132 | ## 133 | secretKey: 134 | # secretKeyFromSecret: 135 | # name: 136 | # key: 137 | 138 | ## The name of a bucket in AWS S3. Required when using AWS S3 139 | ## 140 | bucket: 141 | 142 | ## The region of a bucket in AWS S3. Required when using AWS S3 143 | ## 144 | region: 145 | 146 | ## The path in an AWS S3 bucket to store pre-aggregations. Optional 147 | ## 148 | subPath: 149 | 150 | ##The number of minutes after which Cube Store should refresh AWS credentials. 151 | ## 152 | refreshCredsEveryMinutes: 153 | 154 | minio: 155 | ## The Access Key ID for minIO. Required when using minIO 156 | ## 157 | accessKeyID: 158 | 159 | ## The Secret Access Key for minIO. Required when using minIO 160 | ## 161 | secretKey: 162 | # secretKeyFromSecret: 163 | # name: 164 | # key: 165 | 166 | ## The name of the bucket that you want to use minIO. Required when using minIO 167 | ## 168 | bucket: 169 | 170 | ## The region of a bucket in S3 that you want to use minIO. Optional when using minIO 171 | ## 172 | region: 173 | 174 | ## The path in a minIO bucket to store pre-aggregations. Optional 175 | ## 176 | subPath: 177 | 178 | ## The minIO server endpoint. Required when using minIO 179 | ## 180 | endpoint: 181 | 182 | ## The number of minutes after which Cube Store should refresh minIO credentials. 183 | ## 184 | credentialsRefreshEveryMinutes: 185 | 186 | metrics: 187 | # Define which metrics collector format 188 | format: 189 | 190 | ## Required IP address to send metrics 191 | ## 192 | address: 193 | 194 | ## Required port to send where collector server accepts UDP connections 195 | ## 196 | port: 197 | 198 | ## Configurations for statsd-prometheus-exporter 199 | ## 200 | exporter: 201 | enabled: true 202 | image: 203 | repository: prom/statsd-exporter 204 | tag: "v0.24.0" 205 | extraArgs: [] 206 | statsd: 207 | # Maximum size of your metric mapping cache. 208 | # Relies on the least recently used replacement policy if max size is reached. 209 | cacheSize: 1000 210 | 211 | # Size of internal queue for processing events. 212 | eventQueueSize: 10000 213 | 214 | # Number of events to hold in queue before flushing. 215 | eventFlushThreshold: 1000 216 | 217 | # Time interval before flushing events in queue. 218 | eventFlushInterval: 200ms 219 | 220 | # Whether you use default mapping. 221 | # If set to false, you should provide your own configMap with statsd metrics mapping. 222 | useDefaultMapping: true 223 | 224 | # Metrics mapping ConfigMap 225 | mappingConfigMapName: cubestore-metrics-mapping 226 | 227 | # Name of the key inside Metric mapping ConfigMap. 228 | mappingConfigMapKey: statsd.mappingConf 229 | 230 | livenessProbe: 231 | httpGet: 232 | path: /health 233 | port: http 234 | 235 | readinessProbe: 236 | httpGet: 237 | path: /health 238 | port: http 239 | 240 | resources: 241 | requests: 242 | cpu: 100m 243 | memory: 128Mi 244 | limits: 245 | cpu: 100m 246 | memory: 128Mi 247 | 248 | service: 249 | # The address on which to expose the web interface and generated Prometheus metrics. 250 | port: 9102 251 | # Path under which to expose metrics. 252 | path: /metrics 253 | 254 | router: 255 | ## Service account for cubestore router to use 256 | ## 257 | serviceAccount: 258 | create: false 259 | name: "" 260 | automountServiceAccountToken: true 261 | annotations: {} 262 | 263 | ## The port for Cube Store to listen to HTTP connections on 264 | ## 265 | httpPort: 3030 266 | 267 | ## The port for the router node to listen for connections on 268 | ## 269 | metaPort: 9999 270 | 271 | ## The port for Cube Store to listen to connections on, for example, 3306 272 | ## 273 | mysqlPort: 274 | 275 | ## The port for Cube Store to expose status probes 276 | ## 277 | statusPort: 3031 278 | 279 | persistence: 280 | ## Enable persistence for local data using Persistent Volume Claims 281 | ## 282 | enabled: false 283 | 284 | ## Persistent Volume size 285 | ## 286 | size: 10Gi 287 | 288 | ## Persistent Volume access modes 289 | ## 290 | accessModes: 291 | - ReadWriteOnce 292 | 293 | ## @param router.persistence.storageClass The storage class to use for the workers pvc 294 | ## If defined, storageClassName: 295 | ## If undefined (the default) or set to null, no storageClassName spec is 296 | ## set, choosing the default provisioner. (gp2 on AWS, standard on 297 | ## GKE, AWS & OpenStack) 298 | ## 299 | storageClass: 300 | 301 | ## Additional custom annotations for the PVC 302 | ## 303 | annotations: {} 304 | 305 | ## Affinity for pod assignment 306 | ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity 307 | ## 308 | affinity: {} 309 | 310 | ## Topology spread constraint for pod assignment 311 | ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ 312 | ## 313 | spreadConstraints: [] 314 | 315 | ## Define resources requests and limits for single Pods. 316 | ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ 317 | ## 318 | resources: {} 319 | ## to match guidance: https://cube.dev/docs/product/deployment/production-checklist#appropriate-cluster-sizing 320 | # resources: 321 | # requests: 322 | # cpu: "4" 323 | # memory: "6Gi" 324 | # limits: 325 | # cpu: "4" 326 | # memory: "6Gi" 327 | 328 | ## Configure options for liveness probes 329 | ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes 330 | ## 331 | livenessProbe: 332 | enabled: true 333 | initialDelaySeconds: 10 334 | periodSeconds: 30 335 | timeoutSeconds: 3 336 | successThreshold: 1 337 | failureThreshold: 3 338 | 339 | ## Configure options for liveness probes 340 | ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes 341 | ## 342 | readinessProbe: 343 | enabled: true 344 | initialDelaySeconds: 10 345 | periodSeconds: 30 346 | timeoutSeconds: 3 347 | successThreshold: 1 348 | failureThreshold: 3 349 | 350 | ## Custom livenessProbe that overrides the default one 351 | ## 352 | customLivenessProbe: {} 353 | 354 | ## Custom readinessProbe that overrides the default one 355 | ## 356 | customReadinessProbe: {} 357 | 358 | ## Tolerations for pod assignment 359 | ## 360 | tolerations: {} 361 | 362 | ## Node selector for pod assignment 363 | ## 364 | nodeSelector: {} 365 | 366 | service: 367 | ## Additional custom annotations for router service 368 | ## 369 | annotations: {} 370 | 371 | ## Extra environment variables to pass on to the pod. The value is evaluated as a template 372 | ## e.g: 373 | ## extraEnvVars: 374 | ## - name: FOO 375 | ## value: "bar" 376 | ## 377 | extraEnvVars: [] 378 | 379 | workers: 380 | ## Service account for cubestore workers to use 381 | ## 382 | serviceAccount: 383 | create: false 384 | name: "" 385 | automountServiceAccountToken: true 386 | annotations: {} 387 | 388 | ## Number of workers to deploy 389 | ## 390 | workersCount: 1 391 | 392 | ## The port for Cube Store workers to listen to connections on 393 | ## 394 | port: 9001 395 | 396 | persistence: 397 | ## Enable persistence for local data using Persistent Volume Claims 398 | ## 399 | enabled: false 400 | 401 | ## Persistent Volume size 402 | ## 403 | size: 10Gi 404 | 405 | ## Persistent Volume access modes 406 | ## 407 | accessModes: 408 | - ReadWriteOnce 409 | 410 | ## @param workers.persistence.storageClass The storage class to use for the workers pvc 411 | ## If defined, storageClassName: 412 | ## If undefined (the default) or set to null, no storageClassName spec is 413 | ## set, choosing the default provisioner. (gp2 on AWS, standard on 414 | ## GKE, AWS & OpenStack) 415 | ## 416 | storageClass: 417 | 418 | ## Additional custom annotations for the PVC 419 | ## 420 | annotations: {} 421 | 422 | ## Affinity for pod assignment 423 | ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity 424 | ## 425 | affinity: {} 426 | 427 | ## topology spread constraint for pod assignment 428 | ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ 429 | ## 430 | spreadConstraints: [] 431 | 432 | ## Define resources requests and limits for single Pods. 433 | ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ 434 | ## 435 | resources: {} 436 | ## to match guidance: https://cube.dev/docs/product/deployment/production-checklist#appropriate-cluster-sizing 437 | # resources: 438 | # requests: 439 | # cpu: "4" 440 | # memory: "8Gi" 441 | # limits: 442 | # cpu: "4" 443 | # memory: "8Gi" 444 | 445 | ## Tolerations for pod assignment 446 | ## 447 | tolerations: {} 448 | 449 | ## Node selector for pod assignment 450 | ## 451 | nodeSelector: {} 452 | 453 | service: 454 | ## Additional custom annotations for worker service 455 | ## 456 | annotations: {} 457 | 458 | ## Extra environment variables to pass on to the pod. The value is evaluated as a template 459 | ## e.g.: 460 | ## extraEnvVars: 461 | ## - name: FOO 462 | ## value: "bar" 463 | ## 464 | extraEnvVars: [] 465 | 466 | ## Configurations for init-router initContainer 467 | initRouter: 468 | image: 469 | ## Docker initRouter image repository 470 | ## 471 | repository: busybox 472 | 473 | ## Docker initRouter image tag 474 | ## 475 | tag: latest 476 | 477 | ## Define resources requests and limits for single Pods. 478 | ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ 479 | ## 480 | resources: {} 481 | --------------------------------------------------------------------------------