Skip to content

Commit

Permalink
Merge pull request #3 from metrico/prerelease
Browse files Browse the repository at this point in the history
Prerelease
  • Loading branch information
akvlad authored May 17, 2024
2 parents f14eaa4 + 9d2a83e commit f4e8902
Show file tree
Hide file tree
Showing 7 changed files with 163 additions and 67 deletions.
10 changes: 8 additions & 2 deletions Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ 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
version: 0.2.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: "0.1.0"
appVersion: "0.2.0"
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
tags:
- bitnami-common
version: 2.x.x
51 changes: 31 additions & 20 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ cat <<EOF | curl -X POST http://localhost:8080/initialize --data-binary @-
"secure": <TRUE IF CLICKHOUSE USES SSL>,
"cloud": <TRUE IF YOU WANT THE Distributed..... tables, FALSE for Clickhouse cloud>,
"cluster_name": "<NAME OF THE CLUSTER IF YOU USE ONE, EMPTY for Clickhouse cloud>",
"distributed": <true if you use multiple shards, empty for Clickhouse cloud>,
"distributed": <true if you use multiple shards, false for Clickhouse cloud>,
"ttl_days": <default TTL for the data, days>,
}
]
Expand Down Expand Up @@ -160,25 +160,25 @@ The required options are marked **bold**
| Configuration | Description | Default Value |
|------------------------------------------------------|--------------------------------------------------------------------|----------------------------|
| kubernetesClusterDomain | The domain to use for Kubernetes cluster. | cluster.local |
| namespace.name | The namespace to deploy the qryn application. | qryn |
| nameOverride | A string to partially replace the name of the qryn deployment. | qryn |
| qryn.QRYN_LOG_SETTINGS_LEVEL | The log level for qryn. | debug |
| qryn.QRYN_LOG_SETTINGS_STDOUT | Whether to log to stdout. | true |
| qryn.QRYN_LOG_SETTINGS_SYSLOG | Whether to log to syslog. | true |
| qryn.QRYN_MULTITENANCE_SETTINGS_ENABLED | Whether to enable multi-tenancy. | true |
| qryn.QRYN_SYSTEM_SETTINGS_DB_TIMER | The timeout between two subsequent inserts into the database (sec) | 1 |
| qryn.QRYN_SYSTEM_SETTINGS_DYNAMIC_DATABASES | Whether to enable X-CH-DSN header controlled databases. | false |
| qryn.QRYN_SYSTEM_SETTINGS_NO_FORCE_ROTATION | Whether to disable forced rotation (not used). | true |
| qryn.QRYN_SYSTEM_SETTINGS_QUERY_STATS | Whether to enable query statistics. | true |
| qryn.QRYNCLOUD_LICENSE | The license key for qrynCloud. | XXXX |
| **qryn.QRYN_DATABASE_DATA_0_NODE** | The node for the qryn database. | clickhouse1 |
| **qryn.QRYN_DATABASE_DATA_0_USER** | The user for the qryn database. | default |
| **qryn.QRYN_DATABASE_DATA_0_PASS** | The password for the qryn database. | |
| **qryn.QRYN_DATABASE_DATA_0_HOST** | The host for the qryn database. | localhost |
| **qryn.QRYN_DATABASE_DATA_0_NAME** | The name for the qryn database. | qryn |
| **qryn.QRYN_DATABASE_DATA_0_PORT** | The port for the qryn database. | 9000 |
| **qryn.QRYN_DATABASE_DATA_0_SECURE** | Whether to use secure connection for the qryn database. | false |
| qryn.QRYN_SYSTEM_SETTINGS_LICENSE_AUTO_SHUTDOWN | Whether to deactivate license on sigkill | true |
| qryn.annotations | Additional annotations for the configmap. | [] |
| qryn.data.QRYN_LOG_SETTINGS_LEVEL | The log level for qryn. | debug |
| qryn.data.QRYN_LOG_SETTINGS_STDOUT | Whether to log to stdout. | true |
| qryn.data.QRYN_LOG_SETTINGS_SYSLOG | Whether to log to syslog. | true |
| qryn.data.QRYN_MULTITENANCE_SETTINGS_ENABLED | Whether to enable multi-tenancy. | true |
| qryn.data.QRYN_SYSTEM_SETTINGS_DB_TIMER | The timeout between two subsequent inserts into the database (sec) | 1 |
| qryn.data.QRYN_SYSTEM_SETTINGS_DYNAMIC_DATABASES | Whether to enable X-CH-DSN header controlled databases. | false |
| qryn.data.QRYN_SYSTEM_SETTINGS_NO_FORCE_ROTATION | Whether to disable forced rotation (not used). | true |
| qryn.data.QRYN_SYSTEM_SETTINGS_QUERY_STATS | Whether to enable query statistics. | true |
| qryn.data.QRYNCLOUD_LICENSE | The license key for qrynCloud. | XXXX |
| **qryn.data.QRYN_DATABASE_DATA_0_NODE** | The node for the qryn database. | clickhouse1 |
| **qryn.data.QRYN_DATABASE_DATA_0_USER** | The user for the qryn database. | default |
| **qryn.data.QRYN_DATABASE_DATA_0_PASS** | The password for the qryn database. | |
| **qryn.data.QRYN_DATABASE_DATA_0_HOST** | The host for the qryn database. | localhost |
| **qryn.data.QRYN_DATABASE_DATA_0_NAME** | The name for the qryn database. | qryn |
| **qryn.data.QRYN_DATABASE_DATA_0_PORT** | The port for the qryn database. | 9000 |
| **qryn.data.QRYN_DATABASE_DATA_0_SECURE** | Whether to use secure connection for the qryn database. | false |
| qryn.data.QRYN_SYSTEM_SETTINGS_LICENSE_AUTO_SHUTDOWN | Whether to deactivate license on sigkill | true |
| reader.autoscaling.enabled | Whether to enable hpa autoscaling for the reader. | True |
| reader.autoscaling.minReplicas | The minimum number of replicas for the reader. | 1 |
| reader.autoscaling.maxReplicas | The maximum number of replicas for the reader. | 10 |
Expand All @@ -187,6 +187,10 @@ The required options are marked **bold**
| reader.ingress.enabled | Whether to enable ingress for the reader. | false |
| reader.ingress.hosts | The list of hostnames for the reader's ingress. | ['qryn-reader.local.qryn'] |
| reader.labels | Additional labels for the reader deployment. | [] |
| reader.podAnnotations | Additional pod annotations for the reader deployment. | [] |
| reader.nodeSelector | Configure nodeSelector for reader deployment. | {} |
| reader.tolerations | Configure tolerations for reader deployment. | [] |
| reader.affinity | Configure affinity for reader deployment. | {} |
| reader.enabled | Whether to enable the reader deployment. | True |
| reader.env.qrynHttpSettingsPort | The port for the qryn reader HTTP endpoint. | 3200 |
| reader.image.repository | The repository for the reader image. | qxip/qryn-go-cloud |
Expand All @@ -200,6 +204,10 @@ The required options are marked **bold**
| reader.revisionHistoryLimit | The number of history revisions for the reader. | 10 |
| reader.type | The type of deployment for the reader. | ClusterIP |
| writer.labels | Additional labels for the writer deployment. | [] |
| writer.podAnnotations | Additional pod annotations for the writer deployment. | [] |
| writer.nodeSelector | Configure nodeSelector for writer deployment. | {} |
| writer.tolerations | Configure tolerations for writer deployment. | [] |
| writer.affinity | Configure affinity for writer deployment. | {} |
| writer.enabled | Whether to enable the writer deployment. | True |
| writer.ingress.enabled | Whether to enable ingress for the writer. | True |
| writer.ingress.hosts | The list of hostnames for the writer's ingress. | ['qryn-writer.local.qryn'] |
Expand All @@ -220,10 +228,13 @@ The required options are marked **bold**
| writer.revisionHistoryLimit | The number of history revisions for the writer. | 10 |
| writer.type | The type of deployment for the writer. | ClusterIP |
| ctrl.labels | Additional labels for the qryn-ctrl deployment. | [] |
| ctrl.podAnnotations | Additional pod annotations for the ctrl deployment. | [] |
| ctrl.nodeSelector | Configure nodeSelector for ctrl deployment. | {} |
| ctrl.tolerations | Configure tolerations for ctrl deployment. | [] |
| ctrl.affinity | Configure affinity for ctrl deployment. | {} |
| ctrl.enabled | Whether to enable the qryn-ctrl deployment. | True |
| ctrl.image.repository | The repository for the qryn-ctrl image. | qxip/qryn-ctrl |
| ctrl.imagePullPolicy | Whether to pull the image for the qryn-ctrl. | IfNotPresent |
| ctrl.replicas | The number of replica sets for the qryn-ctrl. | 1 |
| ctrl.revisionHistoryLimit | The number of history revisions for the qryn-ctrl. | 10 |
| ctrl.type | The type of deployment for the qryn-ctrl. | ClusterIP |

30 changes: 21 additions & 9 deletions templates/ctrl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ kind: Service
metadata:
name: {{ include "qryn-all-in-one.fullname" . }}-ctrl
labels:
app: qryn-ctrl
io.metrico.service: qryn-ctrl
{{- include "qryn-all-in-one.labels" . | nindent 4 }}
spec:
type: {{ .Values.ctrl.type }}
selector:
app: qryn-ctrl
io.metrico.service: qryn-ctrl
{{- include "qryn-all-in-one.selectorLabels" . | nindent 4 }}
ports:
- port: 8080
Expand All @@ -22,23 +22,24 @@ kind: Deployment
metadata:
name: {{ include "qryn-all-in-one.fullname" . }}-ctrl
labels:
app: qryn-ctrl
k8slens-edit-resource-version: v1
io.metrico.service: qryn-ctrl
{{- include "qryn-all-in-one.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.ctrl.replicas }}
revisionHistoryLimit: {{ .Values.ctrl.revisionHistoryLimit }}
selector:
matchLabels:
app: qryn-ctrl
io.metrico.service: qryn-ctrl
{{- include "qryn-all-in-one.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
app: qryn-ctrl
io.metrico.service: qryn-ctrl
{{- include "qryn-all-in-one.selectorLabels" . | nindent 8 }}
{{- with .Values.ctrl.podAnnotations }}
annotations:
linkerd.io/inject: disabled
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
containers:
- command:
Expand All @@ -50,8 +51,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "qryn-all-in-one.fullname" . }}-qryn
image: {{ .Values.ctrl.image.repository }}:{{ .Values.ctrl.image.tag
| default .Chart.AppVersion }}
image: {{ .Values.ctrl.image.repository }}:{{ .Values.ctrl.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.ctrl.imagePullPolicy }}
name: qryn-ctrl
ports:
Expand All @@ -67,4 +67,16 @@ spec:
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
{{- with .Values.ctrl.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.ctrl.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.ctrl.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ end }}
7 changes: 5 additions & 2 deletions templates/qryn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ kind: ConfigMap
metadata:
name: {{ include "qryn-all-in-one.fullname" . }}-qryn
labels:
k8slens-edit-resource-version: v1
{{- include "qryn-all-in-one.labels" . | nindent 4 }}
{{- with .Values.qryn.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
data:
{{- .Values.qryn | toYaml | nindent 2}}
{{- .Values.qryn.data | toYaml | nindent 2}}
27 changes: 23 additions & 4 deletions templates/reader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ metadata:
name: {{ include "qryn-all-in-one.fullname" . }}-reader
labels:
io.metrico.service: qryn-reader
k8slens-edit-resource-version: v1
{{- include "qryn-all-in-one.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.reader.replicas }}
Expand All @@ -37,7 +36,17 @@ spec:
labels:
io.metrico.service: qryn-reader
{{- include "qryn-all-in-one.selectorLabels" . | nindent 8 }}
{{- with .Values.reader.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if .Values.reader.initContainers.enabled }}
initContainers:
{{- if .Values.reader.initContainers.containers }}
{{- include "common.tplvalues.render" (dict "value" .Values.reader.initContainers.containers "context" $) | trim | nindent 8 }}
{{- end }}
{{- end }}
containers:
- env:
- name: QRYN_HTTP_SETTINGS_PORT
Expand All @@ -47,8 +56,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "qryn-all-in-one.fullname" . }}-qryn
image: {{ .Values.reader.image.repository }}:{{ .Values.reader.image.tag
| default .Chart.AppVersion }}
image: {{ .Values.reader.image.repository }}:{{ .Values.reader.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.reader.imagePullPolicy }}
name: qryn-reader
ports:
Expand All @@ -73,6 +81,18 @@ spec:
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
{{- with .Values.reader.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.reader.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.reader.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.reader.autoscaling.enabled }}
---
apiVersion: autoscaling/v2
Expand All @@ -81,7 +101,6 @@ metadata:
name: {{ include "qryn-all-in-one.fullname" . }}-reader
labels:
io.metrico.service: qryn-reader
k8slens-edit-resource-version: v1
{{- include "qryn-all-in-one.labels" . | nindent 4 }}
spec:
scaleTargetRef:
Expand Down
Loading

0 comments on commit f4e8902

Please sign in to comment.