diff --git a/deployment/docker/compose-cluster.yml b/deployment/docker/compose-cluster.yml new file mode 100644 index 0000000..d532384 --- /dev/null +++ b/deployment/docker/compose-cluster.yml @@ -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: + seqdbdata: {} \ No newline at end of file diff --git a/deployment/docker/compose-single.yml b/deployment/docker/compose-single.yml new file mode 100644 index 0000000..6cbd508 --- /dev/null +++ b/deployment/docker/compose-single.yml @@ -0,0 +1,20 @@ +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: {} \ No newline at end of file diff --git a/deployment/docker/config-cluster.yaml b/deployment/docker/config-cluster.yaml new file mode 100644 index 0000000..c6dd78c --- /dev/null +++ b/deployment/docker/config-cluster.yaml @@ -0,0 +1,28 @@ +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 \ No newline at end of file diff --git a/deployment/docker/config-single.yaml b/deployment/docker/config-single.yaml new file mode 100644 index 0000000..cee0627 --- /dev/null +++ b/deployment/docker/config-single.yaml @@ -0,0 +1,5 @@ +storage: + data_dir: /data + +mapping: + path: auto \ No newline at end of file diff --git a/deployment/docker/config.seq-ui.yaml b/deployment/docker/config.seq-ui.yaml new file mode 100644 index 0000000..66ce317 --- /dev/null +++ b/deployment/docker/config.seq-ui.yaml @@ -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 \ No newline at end of file diff --git a/deployment/docker/mappings.yaml b/deployment/docker/mappings.yaml new file mode 100644 index 0000000..d46b2c1 --- /dev/null +++ b/deployment/docker/mappings.yaml @@ -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 diff --git a/deployment/k8s/helm-chart/.helmignore b/deployment/k8s/helm-chart/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/deployment/k8s/helm-chart/.helmignore @@ -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/ diff --git a/deployment/k8s/helm-chart/Chart.yaml b/deployment/k8s/helm-chart/Chart.yaml new file mode 100644 index 0000000..e46cde9 --- /dev/null +++ b/deployment/k8s/helm-chart/Chart.yaml @@ -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" diff --git a/deployment/k8s/helm-chart/README.md b/deployment/k8s/helm-chart/README.md new file mode 100644 index 0000000..ce00b39 --- /dev/null +++ b/deployment/k8s/helm-chart/README.md @@ -0,0 +1,13 @@ +# 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 +``` diff --git a/deployment/k8s/helm-chart/templates/NOTES.txt b/deployment/k8s/helm-chart/templates/NOTES.txt new file mode 100644 index 0000000..e69de29 diff --git a/deployment/k8s/helm-chart/templates/_helpers.tpl b/deployment/k8s/helm-chart/templates/_helpers.tpl new file mode 100644 index 0000000..cc9149e --- /dev/null +++ b/deployment/k8s/helm-chart/templates/_helpers.tpl @@ -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 }} diff --git a/deployment/k8s/helm-chart/templates/configmap-mappings.yaml b/deployment/k8s/helm-chart/templates/configmap-mappings.yaml new file mode 100644 index 0000000..46a39e2 --- /dev/null +++ b/deployment/k8s/helm-chart/templates/configmap-mappings.yaml @@ -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 }} \ No newline at end of file diff --git a/deployment/k8s/helm-chart/templates/configmap.yaml b/deployment/k8s/helm-chart/templates/configmap.yaml new file mode 100644 index 0000000..f17504c --- /dev/null +++ b/deployment/k8s/helm-chart/templates/configmap.yaml @@ -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 }} + slow_logs: + bulk_threshold: 0ms + fetch_threshold: 3s + search_threshold: 3s diff --git a/deployment/k8s/helm-chart/templates/seq-proxy/_helpers.tpl b/deployment/k8s/helm-chart/templates/seq-proxy/_helpers.tpl new file mode 100644 index 0000000..21baf78 --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-proxy/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "seq-proxy.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}-proxy +{{- 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-proxy.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}-proxy +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }}-proxy +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}-proxy +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "seq-proxy.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "seq-proxy.labels" -}} +helm.sh/chart: {{ include "seq-proxy.chart" . }} +{{ include "seq-proxy.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "seq-proxy.selectorLabels" -}} +app.kubernetes.io/name: {{ include "seq-proxy.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "seq-proxy.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "seq-proxy.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/deployment/k8s/helm-chart/templates/seq-proxy/configmap.yaml b/deployment/k8s/helm-chart/templates/seq-proxy/configmap.yaml new file mode 100644 index 0000000..1deb446 --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-proxy/configmap.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "seq-proxy.fullname" . }}-config + labels: + app: "{{ template "seq-proxy.fullname" . }}" + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + heritage: {{ .Release.Service | quote }} + release: {{ .Release.Name | quote }} +data: + config.yaml: | + storage: + data_dir: /data + cluster: + replicas: {{ .Values.seqproxy.cluster.replicas }} + shuffle_replicas: {{ .Values.seqproxy.cluster.shuffle_replicas }} + hot_stores: + {{- if .Values.seqproxy.cluster.hotStores }} + {{- toYaml .Values.seqproxy.cluster.hotStores | nindent 8 }} + {{- else }} + {{- range $i := until (.Values.replicaCount | int) }} + - {{ $.Release.Name }}-{{ $i }}.{{ $.Release.Name }}.{{ $.Release.Namespace }}.svc.cluster.local.:9004 + {{- end }} + {{- 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 }} + slow_logs: + bulk_threshold: 0ms + fetch_threshold: 3s + search_threshold: 3s diff --git a/deployment/k8s/helm-chart/templates/seq-proxy/deployment.yaml b/deployment/k8s/helm-chart/templates/seq-proxy/deployment.yaml new file mode 100644 index 0000000..7206046 --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-proxy/deployment.yaml @@ -0,0 +1,102 @@ +{{- if .Values.seqproxy.enabled -}} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "seq-proxy.fullname" . }} + labels: + {{- include "seq-proxy.labels" . | nindent 4 }} +spec: + {{- if not .Values.seqproxy.autoscaling.enabled }} + replicas: {{ .Values.seqproxy.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "seq-proxy.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + {{- with .Values.seqproxy.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + checksum/config: {{ include (print .Template.BasePath "/seq-proxy/configmap.yaml") . | sha256sum }} + labels: + {{- include "seq-proxy.labels" . | nindent 8 }} + {{- with .Values.seqproxy.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.seqproxy.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "seq-proxy.serviceAccountName" . }} + {{- with .Values.seqproxy.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{- with .Values.seqproxy.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + image: "{{ .Values.seqproxy.image.repository }}:{{ .Values.seqproxy.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.seqproxy.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.seqproxy.service.httpPort }} + protocol: TCP + - name: grpc + containerPort: {{ .Values.seqproxy.service.grpcPort }} + protocol: TCP + - name: debug + containerPort: {{ .Values.seqproxy.service.debugPort }} + protocol: TCP + args: + - --mode=proxy + - --config=/configs/config.yaml + {{- with .Values.seqproxy.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.seqproxy.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.seqproxy.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + - name: "{{ template "seq-proxy.fullname" . }}-config" + mountPath: "/configs" + readOnly: true + - name: "{{ template "seq-proxy.fullname" . }}-mappings" + mountPath: "/mappings" + readOnly: true + {{- with .Values.seqproxy.volumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumes: + - name: {{ template "seq-proxy.fullname" . }}-config + configMap: + name: {{ template "seq-proxy.fullname" . }}-config + - name: {{ template "seq-proxy.fullname" . }}-mappings + configMap: + name: {{ template "seq-db.fullname" . }}-mappings + {{- with .Values.seqproxy.volumes }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.seqproxy.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.seqproxy.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.seqproxy.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} diff --git a/deployment/k8s/helm-chart/templates/seq-proxy/hpa.yaml b/deployment/k8s/helm-chart/templates/seq-proxy/hpa.yaml new file mode 100644 index 0000000..da2dc72 --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-proxy/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.seqproxy.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "seq-proxy.fullname" . }} + labels: + {{- include "seq-proxy.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "seq-proxy.fullname" . }} + minReplicas: {{ .Values.seqproxy.autoscaling.minReplicas }} + maxReplicas: {{ .Values.seqproxy.autoscaling.maxReplicas }} + metrics: + {{- if .Values.seqproxy.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.seqproxy.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.seqproxy.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.seqproxy.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/deployment/k8s/helm-chart/templates/seq-proxy/ingress.yaml b/deployment/k8s/helm-chart/templates/seq-proxy/ingress.yaml new file mode 100644 index 0000000..4c7a44b --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-proxy/ingress.yaml @@ -0,0 +1,43 @@ +{{- if .Values.seqproxy.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "seq-proxy.fullname" . }} + labels: + {{- include "seq-proxy.labels" . | nindent 4 }} + {{- with .Values.seqproxy.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.seqproxy.ingress.className }} + ingressClassName: {{ . }} + {{- end }} + {{- if .Values.seqproxy.ingress.tls }} + tls: + {{- range .Values.seqproxy.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.seqproxy.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- with .pathType }} + pathType: {{ . }} + {{- end }} + backend: + service: + name: {{ include "seq-proxy.fullname" $ }} + port: + number: {{ $.Values.seqproxy.service.httpPort }} + {{- end }} + {{- end }} +{{- end }} diff --git a/deployment/k8s/helm-chart/templates/seq-proxy/service.yaml b/deployment/k8s/helm-chart/templates/seq-proxy/service.yaml new file mode 100644 index 0000000..1b4e7fc --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-proxy/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "seq-proxy.fullname" . }} + labels: + {{- include "seq-proxy.labels" . | nindent 4 }} +spec: + type: {{ .Values.seqproxy.service.type }} + ports: + - port: {{ .Values.seqproxy.service.httpPort }} + targetPort: http + protocol: TCP + name: http + - port: {{ .Values.seqproxy.service.grpcPort }} + targetPort: grpc + protocol: TCP + name: grpc + selector: + {{- include "seq-proxy.selectorLabels" . | nindent 4 }} diff --git a/deployment/k8s/helm-chart/templates/seq-proxy/serviceaccount.yaml b/deployment/k8s/helm-chart/templates/seq-proxy/serviceaccount.yaml new file mode 100644 index 0000000..e5f20c9 --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-proxy/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.seqproxy.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "seq-proxy.serviceAccountName" . }} + labels: + {{- include "seq-proxy.labels" . | nindent 4 }} + {{- with .Values.seqproxy.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.seqproxy.serviceAccount.automount }} +{{- end }} diff --git a/deployment/k8s/helm-chart/templates/seq-ui/_helpers.tpl b/deployment/k8s/helm-chart/templates/seq-ui/_helpers.tpl new file mode 100644 index 0000000..cd16731 --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-ui/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "seq-ui.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}-sequi +{{- 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-ui.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}-sequi +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }}-sequi +{{- 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-ui.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "seq-ui.labels" -}} +helm.sh/chart: {{ include "seq-ui.chart" . }} +{{ include "seq-ui.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "seq-ui.selectorLabels" -}} +app.kubernetes.io/name: {{ include "seq-ui.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "seq-ui.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "seq-ui.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/deployment/k8s/helm-chart/templates/seq-ui/configmap.yaml b/deployment/k8s/helm-chart/templates/seq-ui/configmap.yaml new file mode 100644 index 0000000..8a7ba6d --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-ui/configmap.yaml @@ -0,0 +1,40 @@ +{{- if .Values.sequi.enabled -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "seq-ui.fullname" . }}-config + labels: + app: "{{ template "seq-ui.fullname" . }}" + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + heritage: {{ .Release.Service | quote }} + release: {{ .Release.Name | quote }} +data: + config.yaml: | + 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: + - {{ $.Release.Name }}-proxy.{{ $.Release.Namespace }}.svc.cluster.local.:9004 + seq_db_timeout: {{ .Values.sequi.config.clients.seq_db_timeout | default "15s" }} + request_retries: {{ .Values.sequi.config.clients.request_retries | default 3 }} + handlers: + seq_api: + max_search_limit: {{ .Values.sequi.config.handlers.seq_api.max_search_limit | default 1000 }} + max_parallel_export_requests: {{ .Values.sequi.config.handlers.seq_api.max_parallel_export_requests | default 1 }} + max_aggregations_per_request: {{ .Values.sequi.config.handlers.seq_api.max_aggregations_per_request | default 3 }} +{{- end }} diff --git a/deployment/k8s/helm-chart/templates/seq-ui/deployment.yaml b/deployment/k8s/helm-chart/templates/seq-ui/deployment.yaml new file mode 100644 index 0000000..4e0bbd0 --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-ui/deployment.yaml @@ -0,0 +1,113 @@ +{{- if .Values.sequi.enabled -}} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "seq-ui.fullname" . }} + labels: + {{- include "seq-ui.labels" . | nindent 4 }} +spec: + {{- if not .Values.sequi.autoscaling.enabled }} + replicas: {{ .Values.sequi.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "seq-ui.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + {{- with .Values.sequi.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + checksum/config: {{ include (print .Template.BasePath "/seq-ui/configmap.yaml") . | sha256sum }} + labels: + {{- include "seq-ui.labels" . | nindent 8 }} + {{- with .Values.sequi.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.sequi.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "seq-ui.serviceAccountName" . }} + {{- with .Values.sequi.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: api + {{- with .Values.sequi.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + image: "{{ .Values.sequi.image.repository }}:{{ .Values.sequi.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.sequi.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.sequi.service.httpPort }} + protocol: TCP + - name: grpc + containerPort: {{ .Values.sequi.service.grpcPort }} + protocol: TCP + - name: debug + containerPort: {{ .Values.sequi.service.debugPort }} + protocol: TCP + args: + - -config=/configs/config.yaml + {{- with .Values.sequi.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.sequi.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.sequi.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + - name: "{{ template "seq-ui.fullname" . }}-config" + mountPath: "/configs" + readOnly: true + {{- with .Values.sequi.volumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} + - name: front + {{- with .Values.sequi.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + image: "{{ .Values.sequi.front.image.repository }}:{{ .Values.sequi.front.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.sequi.image.pullPolicy }} + env: + - name: SEQ_UI_URL + value: http://localhost:5555/ + ports: + - name: fronthttp + containerPort: {{ .Values.sequi.front.service.httpPort }} + protocol: TCP + {{- with .Values.sequi.front.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + volumes: + - name: {{ template "seq-ui.fullname" . }}-config + configMap: + name: {{ template "seq-ui.fullname" . }}-config + {{- with .Values.sequi.volumes }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.sequi.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.sequi.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.sequi.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} diff --git a/deployment/k8s/helm-chart/templates/seq-ui/hpa.yaml b/deployment/k8s/helm-chart/templates/seq-ui/hpa.yaml new file mode 100644 index 0000000..7861c0b --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-ui/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.sequi.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "seq-ui.fullname" . }} + labels: + {{- include "seq-ui.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "seq-ui.fullname" . }} + minReplicas: {{ .Values.sequi.autoscaling.minReplicas }} + maxReplicas: {{ .Values.sequi.autoscaling.maxReplicas }} + metrics: + {{- if .Values.sequi.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.sequi.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.sequi.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.sequi.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/deployment/k8s/helm-chart/templates/seq-ui/ingress-front.yaml b/deployment/k8s/helm-chart/templates/seq-ui/ingress-front.yaml new file mode 100644 index 0000000..32a219c --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-ui/ingress-front.yaml @@ -0,0 +1,43 @@ +{{- if .Values.sequi.front.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "seq-ui.fullname" . }}-front + labels: + {{- include "seq-ui.labels" . | nindent 4 }} + {{- with .Values.sequi.front.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.sequi.front.ingress.className }} + ingressClassName: {{ . }} + {{- end }} + {{- if .Values.sequi.front.ingress.tls }} + tls: + {{- range .Values.sequi.front.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.sequi.front.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- with .pathType }} + pathType: {{ . }} + {{- end }} + backend: + service: + name: {{ include "seq-ui.fullname" $ }} + port: + number: {{ $.Values.sequi.service.front.httpPort }} + {{- end }} + {{- end }} +{{- end }} diff --git a/deployment/k8s/helm-chart/templates/seq-ui/ingress.yaml b/deployment/k8s/helm-chart/templates/seq-ui/ingress.yaml new file mode 100644 index 0000000..c422f5f --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-ui/ingress.yaml @@ -0,0 +1,43 @@ +{{- if .Values.sequi.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "seq-ui.fullname" . }} + labels: + {{- include "seq-ui.labels" . | nindent 4 }} + {{- with .Values.sequi.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.sequi.ingress.className }} + ingressClassName: {{ . }} + {{- end }} + {{- if .Values.sequi.ingress.tls }} + tls: + {{- range .Values.sequi.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.sequi.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- with .pathType }} + pathType: {{ . }} + {{- end }} + backend: + service: + name: {{ include "seq-ui.fullname" $ }} + port: + number: {{ $.Values.sequi.service.httpPort }} + {{- end }} + {{- end }} +{{- end }} diff --git a/deployment/k8s/helm-chart/templates/seq-ui/service.yaml b/deployment/k8s/helm-chart/templates/seq-ui/service.yaml new file mode 100644 index 0000000..cd1549d --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-ui/service.yaml @@ -0,0 +1,25 @@ +{{- if .Values.sequi.enabled -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "seq-ui.fullname" . }} + labels: + {{- include "seq-ui.labels" . | nindent 4 }} +spec: + type: {{ .Values.sequi.service.type }} + ports: + - port: {{ .Values.sequi.service.httpPort }} + targetPort: http + protocol: TCP + name: http + - port: {{ .Values.sequi.front.service.httpPort }} + targetPort: fronthttp + protocol: TCP + name: fronthttp + - port: {{ .Values.sequi.service.grpcPort }} + targetPort: grpc + protocol: TCP + name: grpc + selector: + {{- include "seq-ui.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/deployment/k8s/helm-chart/templates/seq-ui/serviceaccount.yaml b/deployment/k8s/helm-chart/templates/seq-ui/serviceaccount.yaml new file mode 100644 index 0000000..5906995 --- /dev/null +++ b/deployment/k8s/helm-chart/templates/seq-ui/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.sequi.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "seq-ui.serviceAccountName" . }} + labels: + {{- include "seq-ui.labels" . | nindent 4 }} + {{- with .Values.sequi.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.sequi.serviceAccount.automount }} +{{- end }} diff --git a/deployment/k8s/helm-chart/templates/service.yaml b/deployment/k8s/helm-chart/templates/service.yaml new file mode 100644 index 0000000..cc7a0ad --- /dev/null +++ b/deployment/k8s/helm-chart/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "seq-db.fullname" . }} + labels: + {{- include "seq-db.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + clusterIP: None + ports: + - port: {{ .Values.service.httpPort }} + targetPort: http + protocol: TCP + name: http + - port: {{ .Values.service.grpcPort }} + targetPort: grpc + protocol: TCP + name: grpc + selector: + {{- include "seq-db.selectorLabels" . | nindent 4 }} diff --git a/deployment/k8s/helm-chart/templates/serviceaccount.yaml b/deployment/k8s/helm-chart/templates/serviceaccount.yaml new file mode 100644 index 0000000..f78a2da --- /dev/null +++ b/deployment/k8s/helm-chart/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "seq-db.serviceAccountName" . }} + labels: + {{- include "seq-db.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} diff --git a/deployment/k8s/helm-chart/templates/statefulset.yaml b/deployment/k8s/helm-chart/templates/statefulset.yaml new file mode 100644 index 0000000..27152c3 --- /dev/null +++ b/deployment/k8s/helm-chart/templates/statefulset.yaml @@ -0,0 +1,112 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ include "seq-db.fullname" . }} + labels: + {{- include "seq-db.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + updateStrategy: + type: {{ .Values.updateStrategy }} + selector: + matchLabels: + {{- include "seq-db.selectorLabels" . | nindent 6 }} + serviceName: {{ include "seq-db.fullname" . }} + volumeClaimTemplates: + - metadata: + name: data + spec: + accessModes: ["ReadWriteOnce"] + storageClassName: {{ .Values.persistence.storageClass | default "" }} + resources: + requests: + storage: {{ .Values.persistence.size | default "10Gi" }} + template: + metadata: + annotations: + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + checksum/config: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum }} + labels: + {{- include "seq-db.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "seq-db.serviceAccountName" . }} + {{- with .Values.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{- with .Values.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.httpPort }} + protocol: TCP + - name: grpc + containerPort: {{ .Values.service.grpcPort }} + protocol: TCP + - name: debug + containerPort: {{ .Values.service.debugPort }} + protocol: TCP + args: + - --mode=store + - --config=/configs/config.yaml + {{- with .Values.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + - name: "{{ template "seq-db.fullname" . }}-config" + mountPath: "/configs" + readOnly: true + - name: "{{ template "seq-db.fullname" . }}-mappings" + mountPath: "/mappings" + readOnly: true + - mountPath: /data + name: data + {{- with .Values.volumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumes: + - name: {{ template "seq-db.fullname" . }}-config + configMap: + name: {{ template "seq-db.fullname" . }}-config + - name: {{ template "seq-db.fullname" . }}-mappings + configMap: + name: {{ template "seq-db.fullname" . }}-mappings + {{- with .Values.volumes }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/deployment/k8s/helm-chart/values.minikube.yaml b/deployment/k8s/helm-chart/values.minikube.yaml new file mode 100644 index 0000000..d0c198f --- /dev/null +++ b/deployment/k8s/helm-chart/values.minikube.yaml @@ -0,0 +1,26 @@ +replicaCount: 2 + +mapping: + auto: false + enable_updates: true + 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 + +storage: + frac_size: "256MiB" + total_size: "10GiB" diff --git a/deployment/k8s/helm-chart/values.yaml b/deployment/k8s/helm-chart/values.yaml new file mode 100644 index 0000000..ef265cb --- /dev/null +++ b/deployment/k8s/helm-chart/values.yaml @@ -0,0 +1,440 @@ +# Default values for seq-db. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ +replicaCount: 1 + +# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ +image: + repository: ghcr.io/ozontech/seq-db + # This sets the pull policy for images. + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +# This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ +imagePullSecrets: [] +# This is to override the chart name. +nameOverride: "" +fullnameOverride: "" + +# This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ +serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +# This is for setting Kubernetes Annotations to a Pod. +# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +podAnnotations: {} +# This is for setting Kubernetes Labels to a Pod. +# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +podLabels: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +podManagementPolicy: "Parallel" +updateStrategy: "RollingUpdate" + +# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ +service: + # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + type: ClusterIP + # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports + httpPort: 9002 + grpcPort: 9004 + debugPort: 9200 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +# This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ +livenessProbe: + httpGet: + path: /live + port: debug +readinessProbe: + httpGet: + path: /ready + port: debug + +# Additional volumes on the output Deployment definition. +volumes: [] +# - name: foo +# secret: +# secretName: mysecret +# optional: false + +# Additional volumeMounts on the output Deployment definition. +volumeMounts: [] +# - name: foo +# mountPath: "/etc/foo" +# readOnly: true + +persistence: + enabled: true + size: 10Gi + storageClass: "" + +nodeSelector: {} + +tolerations: [] + +affinity: {} + + +mapping: + auto: true + enable_updates: false + update_period: 5s + mapping_list: [] + +storage: {} + +seqproxy: + enabled: true + # Default values for seq-proxy. + # This is a YAML-formatted file. + # Declare variables to be passed into your templates. + + # This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ + replicaCount: 1 + + # This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ + image: + repository: ghcr.io/ozontech/seq-db + # This sets the pull policy for images. + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + + # This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + imagePullSecrets: [] + # This is to override the chart name. + nameOverride: "" + fullnameOverride: "" + + cluster: + replicas: 1 + shuffle_replicas: true + hotStores: [] + + # This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ + serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + + # This is for setting Kubernetes Annotations to a Pod. + # For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + podAnnotations: {} + # This is for setting Kubernetes Labels to a Pod. + # For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + podLabels: {} + + podSecurityContext: {} + # fsGroup: 2000 + + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + # This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ + service: + # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + type: ClusterIP + # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports + httpPort: 9002 + grpcPort: 9004 + debugPort: 9200 + + # This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/ + ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: seq-proxy.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - seq-proxy.local + + resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + + # This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ + livenessProbe: + httpGet: + path: /live + port: debug + readinessProbe: + httpGet: + path: /ready + port: debug + + # This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + + # Additional volumes on the output Deployment definition. + volumes: [] + # - name: foo + # secret: + # secretName: mysecret + # optional: false + + # Additional volumeMounts on the output Deployment definition. + volumeMounts: [] + # - name: foo + # mountPath: "/etc/foo" + # readOnly: true + + nodeSelector: {} + + tolerations: [] + + affinity: {} + + + + +sequi: + enabled: true + # Default values for seq-ui. + # This is a YAML-formatted file. + # Declare variables to be passed into your templates. + + # This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ + replicaCount: 1 + + # This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ + image: + repository: ghcr.io/ozontech/seq-ui + # This sets the pull policy for images. + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + + # This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + imagePullSecrets: [] + # This is to override the chart name. + nameOverride: "" + fullnameOverride: "" + + # This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ + serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + + # This is for setting Kubernetes Annotations to a Pod. + # For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + podAnnotations: {} + # This is for setting Kubernetes Labels to a Pod. + # For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + podLabels: {} + + podSecurityContext: {} + # fsGroup: 2000 + + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + # This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ + service: + # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + type: ClusterIP + # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports + httpPort: 5555 + grpcPort: 5556 + debugPort: 5557 + + # This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/ + ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: sequi.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - sequi.local + + resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + + # This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ + livenessProbe: + httpGet: + path: /live + port: debug + readinessProbe: + httpGet: + path: /ready + port: debug + + # This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + + + config: + clients: + seq_db_timeout: "15s" + request_retries: 3 + handlers: + seq_api: + max_search_limit: 1000 + max_parallel_export_requests: 1 + max_aggregations_per_request: 3 + + # Additional volumes on the output Deployment definition. + volumes: [] + # - name: foo + # secret: + # secretName: mysecret + # optional: false + + # Additional volumeMounts on the output Deployment definition. + volumeMounts: [] + # - name: foo + # mountPath: "/etc/foo" + # readOnly: true + + nodeSelector: {} + + tolerations: [] + + affinity: {} + front: + image: + repository: ghcr.io/ozontech/seq-ui-fe + # This sets the pull policy for images. + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + + # This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + imagePullSecrets: [] + + # This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ + service: + # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + type: ClusterIP + # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports + httpPort: 80 + + # This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/ + ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: sequi-front.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - sequi.local + + resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + + \ No newline at end of file