Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions deploy/helm/cockpit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,25 @@ The following table lists the configurable parameters of the Cockpit chart and t
| --- | --- | --- |
| `config.nodeEnv` | Node.js environment | `production` |

### Feature Parameters

All feature parameters are optional. Omit them to use the application defaults.

| Parameter | Description | Default |
| --- | --- | --- |
| `features.trino.completion.enabled` | Enable SQL code completion. | `true` (application default) |
| `features.storage.enabled` | Show the S3/HDFS file browser and enable routes under `/storage`. | `false` (application default) |
| `features.storage.autoConnect` | Reconnect to the most recently used storage connection when visiting the storage page. | `false` (application default) |
| `features.storage.pageSizes` | Comma-separated page size options. | `25,50,100` (application default) |
| `features.storage.defaultPageSize` | Default page size; must be included in `pageSizes`. | First configured page size (application default) |
| `features.storage.maxRecentFiles` | Number of recently visited storage locations retained locally. | `15` (application default) |
| `features.storage.uploadConcurrency` | Maximum parallel requests for file uploads. | `3` (application default) |
| `features.storage.textPreviewBytes` | Maximum bytes fetched for text, CSV, and JSON previews. | `262144` (application default) |
| `features.storage.imagePreviewBytes` | Maximum bytes fetched for image previews. | `5242880` (application default) |
| `features.storage.pdfPreviewBytes` | Maximum bytes fetched for PDF previews. | `26214400` (application default) |
| `features.storage.filePreviewRows` | Maximum rows in tabular file previews. | `250` (application default) |
| `features.storage.filePreviewColumns` | Maximum columns in tabular file previews. | `50` (application default) |

### Authentication Parameters

OIDC is the only supported auth mechanism. Disable for local testing.
Expand Down Expand Up @@ -114,6 +133,7 @@ Optional pre-configured Trino endpoint. When `trino.url` is set, the in-app conn
| `trino.tls.insecure` | Skip TLS certificate verification. | `false` |
| `trino.tls.caCert` | Path to a custom CA certificate file. | `""` |
| `trino.tls.secretClass` | Stackable SecretClass that provides the Trino CA certificate. | `""` |
| `trino.queryTtl` | Query result TTL in seconds. | `1800` (application default) |

### Security Parameters

Expand Down
57 changes: 56 additions & 1 deletion deploy/helm/cockpit/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,68 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- $features := index .Values "features" | default dict }}
{{- $trinoFeatures := index $features "trino" | default dict }}
{{- $completion := index $trinoFeatures "completion" | default dict }}
env:
- name: NODE_ENV
value: {{ .Values.config.nodeEnv | quote }}
- name: PORT
value: {{ .Values.service.targetPort | quote }}
{{- if hasKey $completion "enabled" }}
- name: STACKABLE_COCKPIT_COMPLETION_ENABLED
value: {{ .Values.features.trino.completion.enabled | quote }}
value: {{ index $completion "enabled" | quote }}
{{- end }}
{{- with (index $features "storage") }}
{{- if hasKey . "enabled" }}
- name: STACKABLE_COCKPIT_STORAGE_BROWSER_ENABLED
value: {{ .enabled | quote }}
{{- end }}
{{- if hasKey . "autoConnect" }}
- name: PUBLIC_STACKABLE_COCKPIT_STORAGE_AUTO_CONNECT
value: {{ .autoConnect | quote }}
{{- end }}
{{- with .pageSizes }}
- name: PUBLIC_STACKABLE_COCKPIT_PAGE_SIZES
value: {{ . | quote }}
{{- end }}
{{- with .defaultPageSize }}
- name: PUBLIC_STACKABLE_COCKPIT_DEFAULT_PAGE_SIZE
value: {{ . | int64 | quote }}
{{- end }}
{{- with .maxRecentFiles }}
- name: PUBLIC_STACKABLE_COCKPIT_MAX_RECENT_FILES
value: {{ . | int64 | quote }}
{{- end }}
{{- with .uploadConcurrency }}
- name: PUBLIC_STACKABLE_COCKPIT_UPLOAD_CONCURRENCY
value: {{ . | int64 | quote }}
{{- end }}
{{- with .textPreviewBytes }}
- name: STACKABLE_COCKPIT_TEXT_PREVIEW_BYTES
value: {{ . | int64 | quote }}
{{- end }}
{{- with .imagePreviewBytes }}
- name: STACKABLE_COCKPIT_IMAGE_PREVIEW_BYTES
value: {{ . | int64 | quote }}
{{- end }}
{{- with .pdfPreviewBytes }}
- name: STACKABLE_COCKPIT_PDF_PREVIEW_BYTES
value: {{ . | int64 | quote }}
{{- end }}
{{- with .filePreviewRows }}
- name: STACKABLE_COCKPIT_FILE_PREVIEW_ROWS
value: {{ . | int64 | quote }}
{{- end }}
{{- with .filePreviewColumns }}
- name: STACKABLE_COCKPIT_FILE_PREVIEW_COLUMNS
value: {{ . | int64 | quote }}
{{- end }}
{{- end }}
{{- if .Values.trino.queryTtl }}
- name: STACKABLE_COCKPIT_QUERY_TTL
value: {{ .Values.trino.queryTtl | int64 |quote }}
{{- end }}
{{- if .Values.logging.level }}
- name: LOG_LEVEL
value: {{ .Values.logging.level | quote }}
Expand Down
35 changes: 31 additions & 4 deletions deploy/helm/cockpit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,35 @@ startupProbe:

terminationGracePeriodSeconds: 30

features:
trino:
completion:
enabled: true
# Optional application feature overrides. All defaults below are applied by the application when omitted.
# features:
# trino:
# completion:
# # Enable SQL code completion. Default: true (application default).
# enabled: true
# storage:
# # Show the S3/HDFS file browser and enable routes under /storage. Default: false (application default).
# enabled: false
# # Reconnect to the most recently used storage connection on the storage page. Default: false (application default).
# autoConnect: false
# # Comma-separated page size options for paginated list views. Default: "25,50,100" (application default).
# pageSizes: "25,50,100"
# # Page size selected when no user preference is stored. Must be included in pageSizes. Default: first page size (application default).
# defaultPageSize: 25
# # Number of recently visited storage locations retained in local storage. Default: 15 (application default).
# maxRecentFiles: 15
# # Maximum parallel requests for file uploads. Default: 3 (application default).
# uploadConcurrency: 3
# # Maximum bytes fetched for text, CSV, and JSON previews. Default: 262144 (application default).
# textPreviewBytes: 262144
# # Maximum bytes fetched for image previews. Default: 5242880 (application default).
# imagePreviewBytes: 5242880
# # Maximum bytes fetched for PDF previews. Default: 26214400 (application default).
# pdfPreviewBytes: 26214400
# # Maximum rows in tabular file previews. Default: 250 (application default).
# filePreviewRows: 250
# # Maximum columns in tabular file previews. Default: 50 (application default).
# filePreviewColumns: 50

logging:
level: ""
Expand Down Expand Up @@ -184,3 +209,5 @@ trino:
# Stackable SecretClass name for provisioning the Trino CA certificate.
# The Secret Operator mounts ca.crt into /stackable/trino-tls.
secretClass: ""
# Query result TTL in seconds. Default: 1800 (application default).
# queryTtl: 1800