From d40e1378ec3087363e6cddeeff02e4f72f97056a Mon Sep 17 00:00:00 2001 From: Siva Munukutla Date: Mon, 13 May 2024 23:00:54 -0500 Subject: [PATCH 01/11] add pod annotations and cleanup --- Chart.yaml | 4 ++-- Readme.md | 37 ++++++++++++++++++++----------------- templates/ctrl.yaml | 18 +++++++++--------- templates/qryn.yaml | 7 +++++-- templates/reader.yaml | 9 +++++---- templates/writer.yaml | 19 ++++++++++--------- values.yaml | 40 +++++++++++++++++++++------------------- 7 files changed, 72 insertions(+), 62 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index d04e0b5..7411838 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -13,9 +13,9 @@ 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" diff --git a/Readme.md b/Readme.md index 85389e1..0e0803e 100644 --- a/Readme.md +++ b/Readme.md @@ -160,24 +160,24 @@ 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.podAnnotations | Additional pod 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 | | 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 | @@ -186,6 +186,7 @@ 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.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 | @@ -199,6 +200,7 @@ 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.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'] | @@ -219,6 +221,7 @@ 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.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 | diff --git a/templates/ctrl.yaml b/templates/ctrl.yaml index 704f47d..1e375b3 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: diff --git a/templates/qryn.yaml b/templates/qryn.yaml index 538e2a8..8998a89 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.podAnnotations }} + 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..e6fd2ed 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,6 +36,10 @@ 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: containers: - env: @@ -47,8 +50,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: @@ -81,7 +83,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..dd53ae1 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,21 +22,24 @@ 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: containers: - command: @@ -51,8 +54,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: @@ -82,7 +84,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 8ef1e9a..2ad0722 100644 --- a/values.yaml +++ b/values.yaml @@ -1,27 +1,26 @@ 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" + podAnnotations: [] + 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" reader: autoscaling: @@ -52,6 +51,7 @@ reader: replicas: 1 revisionHistoryLimit: 10 type: ClusterIP + podAnnotations: [] writer: labels: [] @@ -82,10 +82,12 @@ writer: replicas: 1 revisionHistoryLimit: 10 type: ClusterIP + podAnnotations: [] ctrl: labels: [] + podAnnotations: [] enabled: true image: repository: qxip/qryn-ctrl From c0188a041eac783f8f1c8f8d17fce6dbda27ee2d Mon Sep 17 00:00:00 2001 From: Siva Munukutla Date: Tue, 14 May 2024 12:31:12 -0500 Subject: [PATCH 02/11] add affinity, tolerations, nodeselectors --- templates/ctrl.yaml | 12 ++++++++++++ templates/reader.yaml | 12 ++++++++++++ templates/writer.yaml | 12 ++++++++++++ values.yaml | 9 +++++++++ 4 files changed, 45 insertions(+) diff --git a/templates/ctrl.yaml b/templates/ctrl.yaml index 1e375b3..799a1c3 100644 --- a/templates/ctrl.yaml +++ b/templates/ctrl.yaml @@ -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/reader.yaml b/templates/reader.yaml index e6fd2ed..6d62ea2 100644 --- a/templates/reader.yaml +++ b/templates/reader.yaml @@ -75,6 +75,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 diff --git a/templates/writer.yaml b/templates/writer.yaml index dd53ae1..b2a6bf7 100644 --- a/templates/writer.yaml +++ b/templates/writer.yaml @@ -76,6 +76,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 diff --git a/values.yaml b/values.yaml index 2ad0722..d15f8b4 100644 --- a/values.yaml +++ b/values.yaml @@ -52,6 +52,9 @@ reader: revisionHistoryLimit: 10 type: ClusterIP podAnnotations: [] + nodeSelector: {} + tolerations: [] + affinity: {} writer: labels: [] @@ -83,6 +86,9 @@ writer: revisionHistoryLimit: 10 type: ClusterIP podAnnotations: [] + nodeSelector: {} + tolerations: [] + affinity: {} ctrl: @@ -96,3 +102,6 @@ ctrl: replicas: 1 revisionHistoryLimit: 10 type: ClusterIP + nodeSelector: {} + tolerations: [] + affinity: {} From 1596248fcbe3c1f0b0018dbabab9ae8a49b1566f Mon Sep 17 00:00:00 2001 From: Siva Munukutla Date: Tue, 14 May 2024 12:36:36 -0500 Subject: [PATCH 03/11] update readme --- Readme.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Readme.md b/Readme.md index 0e0803e..5470779 100644 --- a/Readme.md +++ b/Readme.md @@ -187,6 +187,9 @@ The required options are marked **bold** | 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 | @@ -201,6 +204,9 @@ The required options are marked **bold** | 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'] | @@ -222,6 +228,9 @@ The required options are marked **bold** | 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 | From db722447c827cc97079849ec5732a9ffe32aa4f5 Mon Sep 17 00:00:00 2001 From: Siva Munukutla Date: Tue, 14 May 2024 12:38:28 -0500 Subject: [PATCH 04/11] fix readme typo --- Readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 5470779..f57c70b 100644 --- a/Readme.md +++ b/Readme.md @@ -187,7 +187,7 @@ The required options are marked **bold** | 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.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 | @@ -204,7 +204,7 @@ The required options are marked **bold** | 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.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 | @@ -228,7 +228,7 @@ The required options are marked **bold** | 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.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 | From 71085c32ebb4bfdb19bd331a12ac0a14ae566286 Mon Sep 17 00:00:00 2001 From: Siva Munukutla Date: Wed, 15 May 2024 16:25:11 -0500 Subject: [PATCH 05/11] update readme --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index f57c70b..9a0b8b2 100644 --- a/Readme.md +++ b/Readme.md @@ -80,7 +80,7 @@ cat <, "cloud": , "cluster_name": "", - "distributed": , + "distributed": , "ttl_days": , } ] From 0f24f380a74dd66acf83828aa0d6c0192f20aaed Mon Sep 17 00:00:00 2001 From: Siva Munukutla Date: Wed, 15 May 2024 16:43:46 -0500 Subject: [PATCH 06/11] update annotation ref for configmap --- Readme.md | 2 +- templates/qryn.yaml | 2 +- values.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 9a0b8b2..05a3ba4 100644 --- a/Readme.md +++ b/Readme.md @@ -161,7 +161,7 @@ The required options are marked **bold** |------------------------------------------------------|--------------------------------------------------------------------|----------------------------| | kubernetesClusterDomain | The domain to use for Kubernetes cluster. | cluster.local | | nameOverride | A string to partially replace the name of the qryn deployment. | qryn | -| qryn.podAnnotations | Additional pod annotations for the configmap. | [] | +| 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 | diff --git a/templates/qryn.yaml b/templates/qryn.yaml index 8998a89..16a828e 100644 --- a/templates/qryn.yaml +++ b/templates/qryn.yaml @@ -4,7 +4,7 @@ metadata: name: {{ include "qryn-all-in-one.fullname" . }}-qryn labels: {{- include "qryn-all-in-one.labels" . | nindent 4 }} - {{- with .Values.qryn.podAnnotations }} + {{- with .Values.qryn.annotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/values.yaml b/values.yaml index d15f8b4..37a3ded 100644 --- a/values.yaml +++ b/values.yaml @@ -3,7 +3,7 @@ kubernetesClusterDomain: cluster.local nameOverride: qryn qryn: - podAnnotations: [] + annotations: [] data: QRYN_LOG_SETTINGS_LEVEL: debug QRYN_LOG_SETTINGS_STDOUT: "true" From fc99ae4dd2028a76d63a6118e72e151278826146 Mon Sep 17 00:00:00 2001 From: Byran Carlock Date: Thu, 16 May 2024 13:33:43 -0500 Subject: [PATCH 07/11] merge Signed-off-by: Byran Carlock --- values.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/values.yaml b/values.yaml index 37a3ded..574fccf 100644 --- a/values.yaml +++ b/values.yaml @@ -55,7 +55,13 @@ reader: nodeSelector: {} tolerations: [] affinity: {} - + initContainers: + enabled: false + containers: + # - name: logshipper + # image: alpine:latest + # restartPolicy: Always + # command: ['sh', '-c', 'tail -F /opt/logs.txt'] writer: labels: [] enabled: true @@ -89,6 +95,14 @@ writer: nodeSelector: {} tolerations: [] affinity: {} + initContainers: + enabled: false + containers: + # - name: logshipper + # image: alpine:latest + # restartPolicy: Always + # command: ['sh', '-c', 'tail -F /opt/logs.txt'] + ctrl: From 7ebe84fec4a225bd32f761f3d95c2beea90ef2d3 Mon Sep 17 00:00:00 2001 From: Byran Carlock Date: Thu, 16 May 2024 13:36:54 -0500 Subject: [PATCH 08/11] merge Signed-off-by: Byran Carlock --- templates/reader.yaml | 6 ++++++ templates/writer.yaml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/templates/reader.yaml b/templates/reader.yaml index 6d62ea2..b6a69bf 100644 --- a/templates/reader.yaml +++ b/templates/reader.yaml @@ -41,6 +41,12 @@ spec: {{- 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: - env: - name: QRYN_HTTP_SETTINGS_PORT diff --git a/templates/writer.yaml b/templates/writer.yaml index b2a6bf7..0aeaa63 100644 --- a/templates/writer.yaml +++ b/templates/writer.yaml @@ -41,6 +41,12 @@ spec: {{- 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 From 94d3d8ec2c1dbe20c183462eee60cfef31da9bb7 Mon Sep 17 00:00:00 2001 From: Byran Carlock Date: Thu, 16 May 2024 13:37:08 -0500 Subject: [PATCH 09/11] improve default values Signed-off-by: Byran Carlock --- values.yaml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/values.yaml b/values.yaml index 574fccf..ccc132c 100644 --- a/values.yaml +++ b/values.yaml @@ -57,11 +57,12 @@ reader: affinity: {} initContainers: enabled: false - containers: - # - name: logshipper - # image: alpine:latest - # restartPolicy: Always - # command: ['sh', '-c', 'tail -F /opt/logs.txt'] + containers: [] + # containers: + # - name: logshipper + # image: alpine:latest + # restartPolicy: Always + # command: ['sh', '-c', 'tail -F /opt/logs.txt'] writer: labels: [] enabled: true @@ -97,11 +98,12 @@ writer: affinity: {} initContainers: enabled: false - containers: - # - name: logshipper - # image: alpine:latest - # restartPolicy: Always - # command: ['sh', '-c', 'tail -F /opt/logs.txt'] + containers: [] + # containers: + # - name: logshipper + # image: alpine:latest + # restartPolicy: Always + # command: ['sh', '-c', 'tail -F /opt/logs.txt'] From 548995fbb829c4c89dad204f3335e043d72c4ff8 Mon Sep 17 00:00:00 2001 From: Byran Carlock Date: Thu, 16 May 2024 13:38:40 -0500 Subject: [PATCH 10/11] add bitnami common as a chart dependency Signed-off-by: Byran Carlock --- Chart.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Chart.yaml b/Chart.yaml index 7411838..52b07bf 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -19,3 +19,9 @@ version: 0.2.0 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. 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 From b32532fdbc2826e3530d5b4896db337ec7df66d1 Mon Sep 17 00:00:00 2001 From: Siva Munukutla Date: Thu, 16 May 2024 13:44:13 -0500 Subject: [PATCH 11/11] fix ref --- templates/reader.yaml | 6 +++--- values.yaml | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/templates/reader.yaml b/templates/reader.yaml index b6a69bf..3fe395b 100644 --- a/templates/reader.yaml +++ b/templates/reader.yaml @@ -41,10 +41,10 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: - {{- if .Values.writer.initContainers.enabled }} + {{- if .Values.reader.initContainers.enabled }} initContainers: - {{- if .Values.writer.initContainers.containers }} - {{- include "common.tplvalues.render" (dict "value" .Values.writer.initContainers.containers "context" $) | trim | nindent 8 }} + {{- if .Values.reader.initContainers.containers }} + {{- include "common.tplvalues.render" (dict "value" .Values.reader.initContainers.containers "context" $) | trim | nindent 8 }} {{- end }} {{- end }} containers: diff --git a/values.yaml b/values.yaml index ccc132c..959035b 100644 --- a/values.yaml +++ b/values.yaml @@ -63,6 +63,7 @@ reader: # image: alpine:latest # restartPolicy: Always # command: ['sh', '-c', 'tail -F /opt/logs.txt'] + writer: labels: [] enabled: true @@ -105,8 +106,6 @@ writer: # restartPolicy: Always # command: ['sh', '-c', 'tail -F /opt/logs.txt'] - - ctrl: labels: [] podAnnotations: []