diff --git a/stable/presto/Chart.yaml b/stable/presto/Chart.yaml index cd7eacce8d..df12f47e3b 100644 --- a/stable/presto/Chart.yaml +++ b/stable/presto/Chart.yaml @@ -1,12 +1,12 @@ apiVersion: v1 -appVersion: 0.196 +appVersion: 329 description: Distributed SQL query engine for running interactive analytic queries name: presto -version: 0.1.1 -home: https://prestodb.io -icon: https://prestodb.io/static/presto.png +version: 0.2.1 +home: https://prestosql.io +icon: https://prestosql.io/docs/current/_static/presto.png sources: - - https://github.com/facebook/presto + - https://github.com/prestosql/presto maintainers: - name: bivas email: eliran.bivas@gmail.com diff --git a/stable/presto/README.md b/stable/presto/README.md index 7a046283ef..7cc65fa6b5 100644 --- a/stable/presto/README.md +++ b/stable/presto/README.md @@ -1,6 +1,6 @@ # Presto Chart -[Presto](http://prestodb.io/) is an open source distributed SQL query engine for running interactive analytic queries against data sources of all sizes ranging from gigabytes to petabytes. +[Prestosql](https://prestosql.io/) is an open source distributed SQL query engine for running interactive analytic queries against data sources of all sizes ranging from gigabytes to petabytes. ## Chart Details @@ -20,14 +20,33 @@ $ helm install --name my-release stable/presto ## Configuration -Configurable values are documented in the `values.yaml`. +Configurable values are documented in the `values.yaml`: + +| Parameter | Description | Default | +|-----------------------------------------|-----------------------------------------------------------------------------|--------------------------| +| `server.workers` | Numbers of prestosql worker nodes. | `2` | +| `server.node.environment` | The name of the environment. | `production` | +| `server.node.dataDir` | The location (filesystem path) of the data directory. | `/data/presto` | +| `server.note.pluginDir` | The location of the plugin directory. | `/usr/lib/presto/plugin` | +| `server.log.presto.level` | The minimum log level of named logger `io.prestosql`. | `INFO` | +| `server.config.path` | The location of customize configuration. | `/usr/lib/presto/etc` | +| `server.config.http.port` | The port number of coordinator service | `8080` | +| `server.config.query.maxMemory` | The maximum amount of distributed memory, that a query may use. | `4GB` | +| `server.config.query.maxMemoryPerNode` | The maximum amount of user memory, that a query may use on any one machine. | `1GB` | +| `server.jvm.maxHeapSize` | The value for JVM option `-Xmx` | `8G` | +| `server.jvm.gcMethod.type` | Portion of the value for JVM option `-XX:` | `UseG1GC` | +| `server.jvm.gcMethod.g1.heapRegionSize` | The value for JVM option `-XX:G1HeapRegionSize=` | `32M` | +| `image.repository` | `prestosql` image repository. | `prestosql/presto` | +| `image.tag` | `prestosql` image tag. | `329` | +| `image.securityContext.runAsUser` | The `uid` of `prestosql` image repository. | `1000` | +| `image.securityContext.runAsGroup` | The `gid` of `prestosql` image repository. | `1000` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, ```bash -$ helm install --name my-release -f values.yaml stable/presto +$ helm install my-release stable/presto -f values.yaml ``` > **Tip**: You can use the default [values.yaml](values.yaml) \ No newline at end of file diff --git a/stable/presto/templates/configmap-coordinator.yaml b/stable/presto/templates/configmap-coordinator.yaml index 136eae75e4..f3e415d964 100644 --- a/stable/presto/templates/configmap-coordinator.yaml +++ b/stable/presto/templates/configmap-coordinator.yaml @@ -12,6 +12,7 @@ data: node.properties: | node.environment={{ .Values.server.node.environment }} node.data-dir={{ .Values.server.node.dataDir }} + plugin.dir={{ .Values.server.node.pluginDir }} jvm.config: | -server @@ -22,6 +23,7 @@ data: -XX:+ExplicitGCInvokesConcurrent -XX:+HeapDumpOnOutOfMemoryError -XX:+ExitOnOutOfMemoryError + -Djdk.attach.allowAttachSelf=true config.properties: | coordinator=true @@ -34,15 +36,9 @@ data: query.max-memory={{ .Values.server.config.query.maxMemory }} query.max-memory-per-node={{ .Values.server.config.query.maxMemoryPerNode }} discovery-server.enabled=true - discovery.uri=http://{{ template "presto.fullname" . }}:{{ .Values.server.config.http.port }} + discovery.uri=http://localhost:{{ .Values.server.config.http.port }} log.properties: | - com.facebook.presto={{ .Values.server.log.presto.level }} - - docker-presto.sh: | - #!/bin/bash - cp {{ .Values.server.config.path }}/*.properties $PRESTO_CONF_DIR - cp {{ .Values.server.config.path }}/*.config $PRESTO_CONF_DIR - launcher run + io.prestosql={{ .Values.server.log.presto.level }} --- diff --git a/stable/presto/templates/configmap-worker.yaml b/stable/presto/templates/configmap-worker.yaml index 619135c671..3d70d28ddb 100644 --- a/stable/presto/templates/configmap-worker.yaml +++ b/stable/presto/templates/configmap-worker.yaml @@ -13,6 +13,7 @@ data: node.properties: | node.environment={{ .Values.server.node.environment }} node.data-dir={{ .Values.server.node.dataDir }} + plugin.dir={{ .Values.server.node.pluginDir }} jvm.config: | -server @@ -23,6 +24,7 @@ data: -XX:+ExplicitGCInvokesConcurrent -XX:+HeapDumpOnOutOfMemoryError -XX:+ExitOnOutOfMemoryError + -Djdk.attach.allowAttachSelf=true config.properties: | coordinator=false @@ -32,13 +34,7 @@ data: discovery.uri=http://{{ template "presto.fullname" . }}:{{ .Values.server.config.http.port }} log.properties: | - com.facebook.presto={{ .Values.server.log.presto.level }} - - docker-presto.sh: | - #!/bin/bash - cp {{ .Values.server.config.path }}/*.properties $PRESTO_CONF_DIR - cp {{ .Values.server.config.path }}/*.config $PRESTO_CONF_DIR - launcher run + io.prestosql={{ .Values.server.log.presto.level }} health_check.sh: | #!/bin/bash diff --git a/stable/presto/templates/deployment-coordinator.yaml b/stable/presto/templates/deployment-coordinator.yaml index 218952a420..4d1a6e4cad 100644 --- a/stable/presto/templates/deployment-coordinator.yaml +++ b/stable/presto/templates/deployment-coordinator.yaml @@ -21,6 +21,11 @@ spec: release: {{ .Release.Name }} component: coordinator spec: + {{- with .Values.image.securityContext }} + securityContext: + runAsUser: {{ .runAsUser }} + runAsGroup: {{ .runAsGroup }} + {{- end }} volumes: - name: config-volume configMap: @@ -29,9 +34,6 @@ spec: - name: {{ .Chart.Name }}-coordinator image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - command: ["/bin/bash"] - args: - - {{ .Values.server.config.path }}/docker-presto.sh volumeMounts: - mountPath: {{ .Values.server.config.path }} name: config-volume diff --git a/stable/presto/templates/deployment-worker.yaml b/stable/presto/templates/deployment-worker.yaml index 6f77c8d974..141528647a 100644 --- a/stable/presto/templates/deployment-worker.yaml +++ b/stable/presto/templates/deployment-worker.yaml @@ -31,9 +31,6 @@ spec: - name: {{ .Chart.Name }}-worker image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - command: ["/bin/bash"] - args: - - {{ .Values.server.config.path }}/docker-presto.sh volumeMounts: - mountPath: {{ .Values.server.config.path }} name: config-volume diff --git a/stable/presto/values.yaml b/stable/presto/values.yaml index 50e272b2d0..fa5b96a24b 100644 --- a/stable/presto/values.yaml +++ b/stable/presto/values.yaml @@ -2,12 +2,13 @@ server: workers: 2 node: environment: production - dataDir: /presto/etc/data + dataDir: /data/presto + pluginDir: /usr/lib/presto/plugin log: presto: level: INFO config: - path: /etc/presto + path: /usr/lib/presto/etc http: port: 8080 query: @@ -21,9 +22,12 @@ server: heapRegionSize: "32M" image: - repository: bivas/presto - tag: 0.196 + repository: prestosql/presto + tag: 329 pullPolicy: IfNotPresent + securityContext: + runAsUser: 1000 + runAsGroup: 1000 service: type: ClusterIP