diff --git a/Chart.yaml b/Chart.yaml index d04e0b5..52b07bf 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -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 \ No newline at end of file diff --git a/Readme.md b/Readme.md index f1f817b..0dc40e9 100644 --- a/Readme.md +++ b/Readme.md @@ -80,7 +80,7 @@ cat <, "cloud": , "cluster_name": "", - "distributed": , + "distributed": , "ttl_days": , } ] @@ -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 | @@ -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 | @@ -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'] | @@ -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 | - diff --git a/templates/ctrl.yaml b/templates/ctrl.yaml index 704f47d..799a1c3 100644 --- a/templates/ctrl.yaml +++ b/templates/ctrl.yaml @@ -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 @@ -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: @@ -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: @@ -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 }} \ No newline at end of file diff --git a/templates/qryn.yaml b/templates/qryn.yaml index 538e2a8..16a828e 100644 --- a/templates/qryn.yaml +++ b/templates/qryn.yaml @@ -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}} diff --git a/templates/reader.yaml b/templates/reader.yaml index 1adce8d..3fe395b 100644 --- a/templates/reader.yaml +++ b/templates/reader.yaml @@ -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 }} @@ -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 @@ -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: @@ -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 @@ -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: diff --git a/templates/writer.yaml b/templates/writer.yaml index c508a14..0aeaa63 100644 --- a/templates/writer.yaml +++ b/templates/writer.yaml @@ -4,12 +4,12 @@ kind: Service metadata: name: {{ include "qryn-all-in-one.fullname" . }}-writer labels: - app: qryn-writer + io.metrico.service: qryn-writer {{- include "qryn-all-in-one.labels" . | nindent 4 }} spec: type: {{ .Values.writer.type }} selector: - app: qryn-writer + io.metrico.service: qryn-writer {{- include "qryn-all-in-one.selectorLabels" . | nindent 4 }} ports: - port: {{.Values.writer.env.qrynHttpSettingsPort }} @@ -22,22 +22,31 @@ kind: Deployment metadata: name: {{ include "qryn-all-in-one.fullname" . }}-writer labels: - app: qryn-writer - k8slens-edit-resource-version: v1 + io.metrico.service: qryn-writer {{- include "qryn-all-in-one.labels" . | nindent 4 }} spec: replicas: {{ .Values.writer.replicas }} revisionHistoryLimit: {{ .Values.writer.revisionHistoryLimit }} selector: matchLabels: - app: qryn-writer + io.metrico.service: qryn-writer {{- include "qryn-all-in-one.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: qryn-writer + io.metrico.service: qryn-writer {{- include "qryn-all-in-one.selectorLabels" . | nindent 8 }} + {{- with .Values.writer.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} spec: + {{- if .Values.writer.initContainers.enabled }} + initContainers: + {{- if .Values.writer.initContainers.containers }} + {{- include "common.tplvalues.render" (dict "value" .Values.writer.initContainers.containers "context" $) | trim | nindent 8 }} + {{- end }} + {{- end }} containers: - command: - sh @@ -51,8 +60,7 @@ spec: envFrom: - configMapRef: name: {{ include "qryn-all-in-one.fullname" . }}-qryn - image: {{ .Values.writer.image.repository }}:{{ .Values.writer.image.tag - | default .Chart.AppVersion }} + image: {{ .Values.writer.image.repository }}:{{ .Values.writer.image.tag | default .Chart.AppVersion }} imagePullPolicy: {{ .Values.writer.imagePullPolicy }} name: qryn-writer ports: @@ -74,6 +82,18 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 + {{- with .Values.writer.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.writer.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.writer.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.writer.autoscaling.enabled }} --- apiVersion: autoscaling/v2 @@ -82,7 +102,6 @@ metadata: name: {{ include "qryn-all-in-one.fullname" . }}-writer labels: io.metrico.service: qryn-reader - k8slens-edit-resource-version: v1 {{- include "qryn-all-in-one.labels" . | nindent 4 }} spec: scaleTargetRef: diff --git a/values.yaml b/values.yaml index 322c38d..862f6ee 100644 --- a/values.yaml +++ b/values.yaml @@ -1,28 +1,27 @@ kubernetesClusterDomain: cluster.local -namespace: - name: qryn - nameOverride: qryn qryn: - QRYN_LOG_SETTINGS_LEVEL: debug - QRYN_LOG_SETTINGS_STDOUT: "true" - QRYN_LOG_SETTINGS_SYSLOG: "true" - QRYN_MULTITENANCE_SETTINGS_ENABLED: "true" - QRYN_SYSTEM_SETTINGS_DB_TIMER: "1" - QRYN_SYSTEM_SETTINGS_DYNAMIC_DATABASES: "false" - QRYN_SYSTEM_SETTINGS_NO_FORCE_ROTATION: "true" - QRYN_SYSTEM_SETTINGS_QUERY_STATS: "true" - QRYNCLOUD_LICENSE: XXXX - QRYN_DATABASE_DATA_0_NODE: "clickhouse1" - QRYN_DATABASE_DATA_0_USER: "default" - QRYN_DATABASE_DATA_0_PASS: "" - QRYN_DATABASE_DATA_0_HOST: "localhost" - QRYN_DATABASE_DATA_0_NAME: "qryn" - QRYN_DATABASE_DATA_0_PORT: "9000" - QRYN_DATABASE_DATA_0_SECURE: "false" - QRYN_SYSTEM_SETTINGS_LICENSE_AUTO_SHUTDOWN: "true" + annotations: [] + data: + QRYN_LOG_SETTINGS_LEVEL: debug + QRYN_LOG_SETTINGS_STDOUT: "true" + QRYN_LOG_SETTINGS_SYSLOG: "true" + QRYN_MULTITENANCE_SETTINGS_ENABLED: "true" + QRYN_SYSTEM_SETTINGS_DB_TIMER: "1" + QRYN_SYSTEM_SETTINGS_DYNAMIC_DATABASES: "false" + QRYN_SYSTEM_SETTINGS_NO_FORCE_ROTATION: "true" + QRYN_SYSTEM_SETTINGS_QUERY_STATS: "true" + QRYNCLOUD_LICENSE: XXXX + QRYN_DATABASE_DATA_0_NODE: "clickhouse1" + QRYN_DATABASE_DATA_0_USER: "default" + QRYN_DATABASE_DATA_0_PASS: "" + QRYN_DATABASE_DATA_0_HOST: "localhost" + QRYN_DATABASE_DATA_0_NAME: "qryn" + QRYN_DATABASE_DATA_0_PORT: "9000" + QRYN_DATABASE_DATA_0_SECURE: "false" + QRYN_SYSTEM_SETTINGS_LICENSE_AUTO_SHUTDOWN: "true" reader: autoscaling: @@ -53,6 +52,18 @@ reader: replicas: 1 revisionHistoryLimit: 10 type: ClusterIP + podAnnotations: [] + nodeSelector: {} + tolerations: [] + affinity: {} + initContainers: + enabled: false + containers: [] + # containers: + # - name: logshipper + # image: alpine:latest + # restartPolicy: Always + # command: ['sh', '-c', 'tail -F /opt/logs.txt'] writer: labels: [] @@ -83,10 +94,22 @@ writer: replicas: 1 revisionHistoryLimit: 10 type: ClusterIP - + podAnnotations: [] + nodeSelector: {} + tolerations: [] + affinity: {} + initContainers: + enabled: false + containers: [] + # containers: + # - name: logshipper + # image: alpine:latest + # restartPolicy: Always + # command: ['sh', '-c', 'tail -F /opt/logs.txt'] ctrl: labels: [] + podAnnotations: [] enabled: true image: repository: qxip/qryn-ctrl @@ -95,3 +118,6 @@ ctrl: replicas: 1 revisionHistoryLimit: 10 type: ClusterIP + nodeSelector: {} + tolerations: [] + affinity: {}