-
Notifications
You must be signed in to change notification settings - Fork 11
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
5319721
add docker-compose configs
DmitryRomanov 8e255df
add helm chart
DmitryRomanov 83dc722
add seq-proxy helm chart
DmitryRomanov 567d0d0
fix seq-ui helm charts
DmitryRomanov 89f22d6
add healthcheck probes in helm chart
DmitryRomanov d18a8aa
helm-chart: clusterip none
DmitryRomanov a8fad54
helm-chart: add mapping config
DmitryRomanov bcf9b04
helm-chart: seq-ui config
DmitryRomanov 82bdac4
helm-chart: auto-mapping by default
DmitryRomanov 9557ade
helm-chart: fix ingresses
DmitryRomanov f42a052
add seq-ui hpa
DmitryRomanov 34d8482
configure storage params
DmitryRomanov 8aad1b9
use latest images in docker-compose
DmitryRomanov 590864f
remove unused seq-ui params from helm-chart
DmitryRomanov f108d16
add seq-ui front
DmitryRomanov 6c58450
add seq-ui to docker -compose
DmitryRomanov cc5b91f
set config for seq-ui-fe
DmitryRomanov cea135b
add seq-ui-front
DmitryRomanov ede4c5d
get seq-ui-url from ingress
DmitryRomanov 445e11f
set config for seq-db and seq-proxy
DmitryRomanov 4c627a1
helm-chart: when config is empty
DmitryRomanov b0c2925
helm-chart: remove storage config from seq-proxy
DmitryRomanov 5886cf4
helm-chart: remove notes
DmitryRomanov 5840aa1
seq-ui-fe config and remove docker-compose configs from deployment
DmitryRomanov f810499
helm-chart: extended config for seq-db and seq-proxy
DmitryRomanov f34e600
helm-chart: add link in quickstart
DmitryRomanov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
| # 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |
13 changes: 13 additions & 0 deletions
13
deployment/k8s/helm-chart/templates/configmap-mappings.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.extendedConfig }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- else }} | ||
| {{- end }} |
62 changes: 62 additions & 0 deletions
62
deployment/k8s/helm-chart/templates/seq-proxy/_helpers.tpl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 }} |
34 changes: 34 additions & 0 deletions
34
deployment/k8s/helm-chart/templates/seq-proxy/configmap.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| 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: | | ||
| 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 }} | ||
DmitryRomanov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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.seqproxy.extendedConfig }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- else }} | ||
| {{- end }} | ||
102 changes: 102 additions & 0 deletions
102
deployment/k8s/helm-chart/templates/seq-proxy/deployment.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 }} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.