-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add helm charts #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
f77d7e6
b1a72dc
ab8d1e6
44997b6
e25976c
66af496
23ef933
15d8be5
9b139a0
0f4ff4f
d4e9012
ac35c46
98930fc
e25e3ca
149a2a6
f377b4c
e95d5d8
5cfe277
56f5c0c
b62c612
e118cc7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
version: "3.8" | ||
|
||
services: | ||
seq-db-proxy: | ||
image: ghcr.io/ozontech/seq-db:latest | ||
ports: | ||
- "9002:9002" # Default HTTP port | ||
- "9004:9004" # Default gRPC port | ||
- "9200:9200" # Default debug port | ||
command: --mode=proxy | ||
--config=/configs/config.yaml | ||
depends_on: | ||
- seq-db-store | ||
volumes: | ||
- ./config-cluster.yaml:/configs/config.yaml | ||
- ./mappings.yaml:/configs/mappings.yaml | ||
seq-db-store: | ||
image: ghcr.io/ozontech/seq-db:latest | ||
command: --mode=store | ||
--config=/configs/config.yaml | ||
volumes: | ||
- ./config-cluster.yaml:/configs/config.yaml | ||
- ./mappings.yaml:/configs/mappings.yaml | ||
- seqdbdata:/data | ||
stdin_open: true | ||
tty: true | ||
restart: unless-stopped | ||
seq-ui: | ||
image: ghcr.io/ozontech/seq-ui:latest | ||
volumes: | ||
- ./config.seq-ui.yaml:/seq-ui/config.yaml | ||
ports: | ||
- "5555:5555" # Default HTTP port | ||
- "5556:5556" # Default gRPC port | ||
- "5557:5557" # Default debug port | ||
command: --config config.yaml | ||
seq-ui-fe: | ||
image: ghcr.io/ozontech/seq-ui-fe:latest | ||
ports: | ||
- "5173:80" | ||
volumes: | ||
- ./seq-ui-fe-config.json:/usr/share/nginx/html/config.json | ||
volumes: | ||
seqdbdata: {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: "3.8" | ||
|
||
services: | ||
seq-db: | ||
image: ghcr.io/ozontech/seq-db:latest | ||
ports: | ||
- "9002:9002" # Default HTTP port | ||
- "9004:9004" # Default gRPC port | ||
- "9200:9200" # Default debug port | ||
command: --config=/configs/config.yaml | ||
--mode=single | ||
volumes: | ||
- ./config-single.yaml:/configs/config.yaml:ro | ||
- seqdbdata:/data | ||
stdin_open: true | ||
tty: true | ||
restart: unless-stopped | ||
volumes: | ||
seqdbdata: {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
storage: | ||
data_dir: /data | ||
frac_size: 256MiB | ||
total_size: 100GiB | ||
|
||
cluster: | ||
hot_replicas: 1 | ||
# shuffle_replicas: true | ||
hot_stores: | ||
- seq-db-store:9004 | ||
# colds | ||
# read_stores: | ||
# - seq-db-store:9004 | ||
# write_stores: | ||
# - seq-db-store:9004 | ||
|
||
mapping: | ||
enable_updates: true | ||
path: /configs/mappings.yaml | ||
update_period: 5s | ||
|
||
slow_logs: | ||
bulk_threshold: 100ms | ||
search_threshold: 20ms | ||
fetch_threshold: 20ms |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
storage: | ||
data_dir: /data | ||
|
||
mapping: | ||
path: auto |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
server: | ||
http_addr: "0.0.0.0:5555" | ||
grpc_addr: "0.0.0.0:5556" | ||
debug_addr: "0.0.0.0:5557" | ||
cors: | ||
allowed_headers: | ||
- Content-Type | ||
- Authorization | ||
allowed_methods: | ||
- HEAD | ||
- GET | ||
- POST | ||
- PATCH | ||
- DELETE | ||
allowed_origins: | ||
- "*" | ||
max_age: 300 | ||
clients: | ||
seq_db_addrs: | ||
- "seq-db-proxy:9004" | ||
seq_db_timeout: 15s | ||
seq_db_avg_doc_size: 100 | ||
request_retries: 3 | ||
proxy_client_mode: "grpc" | ||
grpc_keepalive_params: | ||
time: 10s | ||
timeout: 10s | ||
permit_without_stream: true | ||
handlers: | ||
seq_api: | ||
seq_cli_max_search_limit: 10000 | ||
max_search_limit: 1000 | ||
max_search_total_limit: 100000 | ||
max_search_offset_limit: 100000 | ||
max_export_limit: 10000 | ||
max_parallel_export_requests: 1 | ||
max_aggregations_per_request: 3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
mapping-list: | ||
- type: "keyword" | ||
name: "k8s_pod" | ||
- type: "keyword" | ||
name: "k8s_namespace" | ||
- type: "keyword" | ||
name: "k8s_container" | ||
- type: "text" | ||
name: "request" | ||
- type: "path" | ||
name: "request_uri" | ||
- name: "message" | ||
types: | ||
- type: "text" | ||
- title: "keyword" | ||
type: "keyword" | ||
size: 18 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"SEQ_UI_URL": "http://localhost:5555/" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: v2 | ||
name: seq-db | ||
description: A Helm chart for Kubernetes | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "latest" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Helm Chart | ||
|
||
Install [Helm](https://helm.sh/docs/intro/install/) | ||
|
||
## Examples for Minikube Minikube | ||
|
||
Install [Minikube](https://minikube.sigs.k8s.io/docs/start/) | ||
|
||
### Install | ||
|
||
```shell | ||
helm upgrade --install seq-db . -f values.minikube.yaml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While reading this some questions came up:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
You can set number of replicas by values (values.minikube.yaml): replicaCount: 2
seqproxy:
enabled: true
replicaCount: 1 or using args: helm upgrade --install seq-db . -f values.minikube.yaml --set replicaCount=1,seqproxy.replicaCount=1
Configmaps generates using values |
||
|
||
# add ingress hosts | ||
echo "$( minikube ip ) seq-proxy.local" >> /etc/hosts | ||
echo "$( minikube ip ) sequi-server.local" >> /etc/hosts | ||
echo "$( minikube ip ) sequi.local" >> /etc/hosts | ||
|
||
# send test data | ||
curl --request POST \ | ||
--url http://seq-proxy.local/_bulk \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{"index" : {"unused-key":""}} | ||
{"k8s_pod": "app-backend-123", "k8s_namespace": "production", "k8s_container": "app-backend", "request": "POST", "request_uri": "/api/v1/orders", "message": "New order created successfully"} | ||
{"index" : {"unused-key":""}} | ||
{"k8s_pod": "app-frontend-456", "k8s_namespace": "production", "k8s_container": "app-frontend", "request": "GET", "request_uri": "/api/v1/products", "message": "Product list retrieved"} | ||
{"index" : {"unused-key":""}} | ||
{"k8s_pod": "payment-service-789", "k8s_namespace": "production", "k8s_container": "payment-service", "request": "POST", "request_uri": "/api/v1/payments", "message": "failed"} | ||
' | ||
``` | ||
|
||
Open http://sequi.local/?from=3600 |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe delete this file? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "seq-db.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "seq-db.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "seq-db.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "seq-db.labels" -}} | ||
helm.sh/chart: {{ include "seq-db.chart" . }} | ||
{{ include "seq-db.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "seq-db.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "seq-db.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "seq-db.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "seq-db.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "seq-db.fullname" . }}-mappings | ||
labels: | ||
app: "{{ template "seq-db.fullname" . }}" | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
data: | ||
mappings.yaml: | | ||
mapping-list: | ||
{{ .Values.mapping.mapping_list | toYaml | indent 4 }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "seq-db.fullname" . }}-config | ||
labels: | ||
app: "{{ template "seq-db.fullname" . }}" | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
data: | ||
config.yaml: | | ||
storage: | ||
data_dir: /data | ||
{{- if .Values.storage.frac_size }} | ||
frac_size: {{ .Values.storage.frac_size }} | ||
{{- end }} | ||
{{- if .Values.storage.total_size }} | ||
total_size: {{ .Values.storage.total_size }} | ||
{{- end }} | ||
mapping: | ||
enable_updates: {{ .Values.mapping.enable_updates }} | ||
{{- if .Values.mapping.auto }} | ||
path: auto | ||
{{- else }} | ||
path: /mappings/mappings.yaml | ||
{{- end }} | ||
update_period: {{ .Values.mapping.update_period }} | ||
{{- with .Values.config }} | ||
{{ toYaml . | nindent 4 }} | ||
{{- else }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need additional docker-compose files for helm charts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's just sample of docker-compose files for local deployment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe @dkharms meant, that we already have
docker-compose
files inquickstart/
directoryThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that's what I meant. We already have all necessary docker-compose files for quickstart in
quickstart/
directory.