From 99583d05674104f0842736276b4530111b5ffcdb Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Thu, 19 Oct 2023 15:57:19 +0100 Subject: [PATCH 1/5] Default to latest tag as we no longer push releases We haven't cut an image release in 5 months, switch default image to latest --- charts/posthog/ALL_VALUES.md | 2 +- charts/posthog/values.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/posthog/ALL_VALUES.md b/charts/posthog/ALL_VALUES.md index 474791db..335a49ad 100644 --- a/charts/posthog/ALL_VALUES.md +++ b/charts/posthog/ALL_VALUES.md @@ -16,7 +16,7 @@ The following table lists the configurable parameters of the PostHog chart and t | image.repository | string | `"posthog/posthog"` | PostHog image repository to use. | | image.sha | string | `nil` | PostHog image SHA to use (example: `sha256:20af35fca6756d689d6705911a49dd6f2f6631e001ad43377b605cfc7c133eb4`). | | image.tag | string | `nil` | PostHog image tag to use (example: `release-1.43.0`). | -| image.default | string | `":release-1.43.0"` | PostHog default image. Do not overwrite, use `image.sha` or `image.tag` instead. | +| image.default | string | `":latest"` | PostHog default image. Do not overwrite, use `image.sha` or `image.tag` instead. | | image.pullPolicy | string | `"IfNotPresent"` | PostHog image pull policy. | | image.pullSecrets | list | `[]` | | | sentryDSN | string | `nil` | Sentry endpoint to send errors to. | diff --git a/charts/posthog/values.yaml b/charts/posthog/values.yaml index b33d3c88..e7c7c10a 100644 --- a/charts/posthog/values.yaml +++ b/charts/posthog/values.yaml @@ -16,9 +16,9 @@ image: # -- PostHog image tag to use (example: `release-1.43.0`). tag: # -- PostHog default image. Do not overwrite, use `image.sha` or `image.tag` instead. - default: ":release-1.43.0" + default: ":latest" # -- PostHog image pull policy. - pullPolicy: IfNotPresent + pullPolicy: Always ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ From 371bdc6f691650c5ab6ee3043c4488ce333b2278 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Fri, 20 Oct 2023 09:54:11 +0100 Subject: [PATCH 2/5] logs --- ci/kubetest/helpers/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ci/kubetest/helpers/utils.py b/ci/kubetest/helpers/utils.py index cfe72dcb..0ce6d63b 100644 --- a/ci/kubetest/helpers/utils.py +++ b/ci/kubetest/helpers/utils.py @@ -117,6 +117,12 @@ def wait_for_pods_to_be_ready(kube, labels=None, expected_count=None, namespace= job_pods = [pod for pod in pods.values() if "job-name" in pod.obj.metadata.labels] for job_pod in job_pods: + print("job logs") + try: + print([c.get_logs() for c in job_pod.get_containers()]) + except Exception: + pass + print("job logs2") assert job_pod.status().phase != "Failed", f"Detected failed job {job_pod.obj.metadata.name}" if len(pods) > 0 and all(is_pod_ready(pod) for pod in non_job_pods): From 66f9a0b209673cccb8c3ceecf75dbbc3a8e21ed2 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Fri, 20 Oct 2023 10:04:39 +0100 Subject: [PATCH 3/5] update clickhouse --- charts/posthog/ALL_VALUES.md | 4 ++-- .../tests/__snapshot__/clickhouse-backup-cronjob.yaml.snap | 2 +- .../tests/__snapshot__/clickhouse-instance.yaml.snap | 2 +- charts/posthog/tests/clickhouse-instance.yaml | 2 +- charts/posthog/values.yaml | 4 ++-- ci/kubetest/test_clickhouse_different_image.py | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/charts/posthog/ALL_VALUES.md b/charts/posthog/ALL_VALUES.md index 335a49ad..3571bf28 100644 --- a/charts/posthog/ALL_VALUES.md +++ b/charts/posthog/ALL_VALUES.md @@ -642,7 +642,7 @@ The following table lists the configurable parameters of the PostHog chart and t | clickhouse.secure | bool | `false` | Whether to use TLS connection connecting to ClickHouse | | clickhouse.verify | bool | `false` | Whether to verify TLS certificate on connection to ClickHouse | | clickhouse.image.repository | string | `"clickhouse/clickhouse-server"` | ClickHouse image repository. | -| clickhouse.image.tag | string | `"22.8.11.15"` | ClickHouse image tag. Note: PostHog does not support all versions of ClickHouse. Please override the default only if you know what you are doing. | +| clickhouse.image.tag | string | `"23.8.4.69"` | ClickHouse image tag. Note: PostHog does not support all versions of ClickHouse. Please override the default only if you know what you are doing. | | clickhouse.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | clickhouse.image.pullSecrets | list | `[]` | | | clickhouse.tolerations | list | `[]` | Toleration labels for clickhouse pod assignment | @@ -670,7 +670,7 @@ The following table lists the configurable parameters of the PostHog chart and t | clickhouse.podAnnotations | string | `nil` | | | clickhouse.podDistribution | string | `nil` | | | clickhouse.client.image.repository | string | `"clickhouse/clickhouse-server"` | ClickHouse image repository. | -| clickhouse.client.image.tag | string | `"22.8.11.15"` | ClickHouse image tag. Note: PostHog does not support all versions of ClickHouse. Please override the default only if you know what you are doing. | +| clickhouse.client.image.tag | string | `"23.8.4.69"` | ClickHouse image tag. Note: PostHog does not support all versions of ClickHouse. Please override the default only if you know what you are doing. | | clickhouse.client.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | clickhouse.client.image.pullSecrets | list | `[]` | | | clickhouse.backup.enabled | bool | `false` | | diff --git a/charts/posthog/tests/__snapshot__/clickhouse-backup-cronjob.yaml.snap b/charts/posthog/tests/__snapshot__/clickhouse-backup-cronjob.yaml.snap index 127be206..14417926 100644 --- a/charts/posthog/tests/__snapshot__/clickhouse-backup-cronjob.yaml.snap +++ b/charts/posthog/tests/__snapshot__/clickhouse-backup-cronjob.yaml.snap @@ -30,7 +30,7 @@ should match the snapshot when backup is true: value: backup - name: BACKUP_PASSWORD value: backup_password - image: clickhouse/clickhouse-server:22.8.11.15 + image: clickhouse/clickhouse-server:23.8.4.69 imagePullPolicy: IfNotPresent name: run-backup-cron volumeMounts: diff --git a/charts/posthog/tests/__snapshot__/clickhouse-instance.yaml.snap b/charts/posthog/tests/__snapshot__/clickhouse-instance.yaml.snap index 748a6fe2..d2be9752 100644 --- a/charts/posthog/tests/__snapshot__/clickhouse-instance.yaml.snap +++ b/charts/posthog/tests/__snapshot__/clickhouse-instance.yaml.snap @@ -75,7 +75,7 @@ the manifest should match the snapshot when using default values: - /bin/bash - -c - /usr/bin/clickhouse-server --config-file=/etc/clickhouse-server/config.xml - image: clickhouse/clickhouse-server:22.8.11.15 + image: clickhouse/clickhouse-server:23.8.4.69 name: clickhouse ports: - containerPort: 8123 diff --git a/charts/posthog/tests/clickhouse-instance.yaml b/charts/posthog/tests/clickhouse-instance.yaml index 8d3d8f04..296b83be 100644 --- a/charts/posthog/tests/clickhouse-instance.yaml +++ b/charts/posthog/tests/clickhouse-instance.yaml @@ -343,7 +343,7 @@ tests: count: 1 - equal: path: spec.templates.podTemplates[0].spec.containers[0].image - value: "clickhouse/clickhouse-server:22.8.11.15" + value: "clickhouse/clickhouse-server:23.8.4.69" - it: allows modifying clickhouse-server version set: diff --git a/charts/posthog/values.yaml b/charts/posthog/values.yaml index e7c7c10a..ea10d634 100644 --- a/charts/posthog/values.yaml +++ b/charts/posthog/values.yaml @@ -1796,7 +1796,7 @@ clickhouse: # -- ClickHouse image repository. repository: clickhouse/clickhouse-server # -- ClickHouse image tag. Note: PostHog does not support all versions of ClickHouse. Please override the default only if you know what you are doing. - tag: "22.8.11.15" + tag: "23.8.4.69" # -- Image pull policy pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. @@ -1921,7 +1921,7 @@ clickhouse: # -- ClickHouse image repository. repository: clickhouse/clickhouse-server # -- ClickHouse image tag. Note: PostHog does not support all versions of ClickHouse. Please override the default only if you know what you are doing. - tag: "22.8.11.15" + tag: "23.8.4.69" # -- Image pull policy pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. diff --git a/ci/kubetest/test_clickhouse_different_image.py b/ci/kubetest/test_clickhouse_different_image.py index 13e1332d..4c32e821 100644 --- a/ci/kubetest/test_clickhouse_different_image.py +++ b/ci/kubetest/test_clickhouse_different_image.py @@ -3,7 +3,7 @@ from helpers.clickhouse import get_clickhouse_pod_spec from helpers.utils import install_chart, is_posthog_healthy, wait_for_pods_to_be_ready -# Setting a value for the tag here to 22.8.11.15-alpine +# Setting a value for the tag here to 23.8.4.69-alpine # This version because it will be compatible going forward after we # require 22.3 for JSON Object datatype support # This tests to make sure that when specified clickhouse-operator @@ -14,7 +14,7 @@ clickhouse: image: - tag: 22.8.11.15-alpine + tag: 23.8.4.69-alpine """ @@ -24,4 +24,4 @@ def test_clickhouse_pod_image(kube): is_posthog_healthy(kube) pod_spec = get_clickhouse_pod_spec(kube) - assert pod_spec.containers[0].image == "clickhouse/clickhouse-server:22.8.11.15-alpine" + assert pod_spec.containers[0].image == "clickhouse/clickhouse-server:23.8.4.69-alpine" From 9e4dfd34232b170ff16f5541019f8f23dce1ccf0 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Fri, 20 Oct 2023 10:37:46 +0100 Subject: [PATCH 4/5] Update to clickhouse 23.9 --- charts/posthog/ALL_VALUES.md | 4 ++-- .../tests/__snapshot__/clickhouse-backup-cronjob.yaml.snap | 2 +- .../tests/__snapshot__/clickhouse-instance.yaml.snap | 2 +- charts/posthog/tests/clickhouse-instance.yaml | 2 +- charts/posthog/values.yaml | 4 ++-- ci/kubetest/test_clickhouse_different_image.py | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/charts/posthog/ALL_VALUES.md b/charts/posthog/ALL_VALUES.md index 3571bf28..8593a5b4 100644 --- a/charts/posthog/ALL_VALUES.md +++ b/charts/posthog/ALL_VALUES.md @@ -642,7 +642,7 @@ The following table lists the configurable parameters of the PostHog chart and t | clickhouse.secure | bool | `false` | Whether to use TLS connection connecting to ClickHouse | | clickhouse.verify | bool | `false` | Whether to verify TLS certificate on connection to ClickHouse | | clickhouse.image.repository | string | `"clickhouse/clickhouse-server"` | ClickHouse image repository. | -| clickhouse.image.tag | string | `"23.8.4.69"` | ClickHouse image tag. Note: PostHog does not support all versions of ClickHouse. Please override the default only if you know what you are doing. | +| clickhouse.image.tag | string | `"23.9.2.56"` | ClickHouse image tag. Note: PostHog does not support all versions of ClickHouse. Please override the default only if you know what you are doing. | | clickhouse.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | clickhouse.image.pullSecrets | list | `[]` | | | clickhouse.tolerations | list | `[]` | Toleration labels for clickhouse pod assignment | @@ -670,7 +670,7 @@ The following table lists the configurable parameters of the PostHog chart and t | clickhouse.podAnnotations | string | `nil` | | | clickhouse.podDistribution | string | `nil` | | | clickhouse.client.image.repository | string | `"clickhouse/clickhouse-server"` | ClickHouse image repository. | -| clickhouse.client.image.tag | string | `"23.8.4.69"` | ClickHouse image tag. Note: PostHog does not support all versions of ClickHouse. Please override the default only if you know what you are doing. | +| clickhouse.client.image.tag | string | `"23.9.2.56"` | ClickHouse image tag. Note: PostHog does not support all versions of ClickHouse. Please override the default only if you know what you are doing. | | clickhouse.client.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | clickhouse.client.image.pullSecrets | list | `[]` | | | clickhouse.backup.enabled | bool | `false` | | diff --git a/charts/posthog/tests/__snapshot__/clickhouse-backup-cronjob.yaml.snap b/charts/posthog/tests/__snapshot__/clickhouse-backup-cronjob.yaml.snap index 14417926..f05a4702 100644 --- a/charts/posthog/tests/__snapshot__/clickhouse-backup-cronjob.yaml.snap +++ b/charts/posthog/tests/__snapshot__/clickhouse-backup-cronjob.yaml.snap @@ -30,7 +30,7 @@ should match the snapshot when backup is true: value: backup - name: BACKUP_PASSWORD value: backup_password - image: clickhouse/clickhouse-server:23.8.4.69 + image: clickhouse/clickhouse-server:23.9.2.56 imagePullPolicy: IfNotPresent name: run-backup-cron volumeMounts: diff --git a/charts/posthog/tests/__snapshot__/clickhouse-instance.yaml.snap b/charts/posthog/tests/__snapshot__/clickhouse-instance.yaml.snap index d2be9752..4a592ebb 100644 --- a/charts/posthog/tests/__snapshot__/clickhouse-instance.yaml.snap +++ b/charts/posthog/tests/__snapshot__/clickhouse-instance.yaml.snap @@ -75,7 +75,7 @@ the manifest should match the snapshot when using default values: - /bin/bash - -c - /usr/bin/clickhouse-server --config-file=/etc/clickhouse-server/config.xml - image: clickhouse/clickhouse-server:23.8.4.69 + image: clickhouse/clickhouse-server:23.9.2.56 name: clickhouse ports: - containerPort: 8123 diff --git a/charts/posthog/tests/clickhouse-instance.yaml b/charts/posthog/tests/clickhouse-instance.yaml index 296b83be..f0e9dcd0 100644 --- a/charts/posthog/tests/clickhouse-instance.yaml +++ b/charts/posthog/tests/clickhouse-instance.yaml @@ -343,7 +343,7 @@ tests: count: 1 - equal: path: spec.templates.podTemplates[0].spec.containers[0].image - value: "clickhouse/clickhouse-server:23.8.4.69" + value: "clickhouse/clickhouse-server:23.9.2.56" - it: allows modifying clickhouse-server version set: diff --git a/charts/posthog/values.yaml b/charts/posthog/values.yaml index ea10d634..83640446 100644 --- a/charts/posthog/values.yaml +++ b/charts/posthog/values.yaml @@ -1796,7 +1796,7 @@ clickhouse: # -- ClickHouse image repository. repository: clickhouse/clickhouse-server # -- ClickHouse image tag. Note: PostHog does not support all versions of ClickHouse. Please override the default only if you know what you are doing. - tag: "23.8.4.69" + tag: "23.9.2.56" # -- Image pull policy pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. @@ -1921,7 +1921,7 @@ clickhouse: # -- ClickHouse image repository. repository: clickhouse/clickhouse-server # -- ClickHouse image tag. Note: PostHog does not support all versions of ClickHouse. Please override the default only if you know what you are doing. - tag: "23.8.4.69" + tag: "23.9.2.56" # -- Image pull policy pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. diff --git a/ci/kubetest/test_clickhouse_different_image.py b/ci/kubetest/test_clickhouse_different_image.py index 4c32e821..251971fb 100644 --- a/ci/kubetest/test_clickhouse_different_image.py +++ b/ci/kubetest/test_clickhouse_different_image.py @@ -3,7 +3,7 @@ from helpers.clickhouse import get_clickhouse_pod_spec from helpers.utils import install_chart, is_posthog_healthy, wait_for_pods_to_be_ready -# Setting a value for the tag here to 23.8.4.69-alpine +# Setting a value for the tag here to 23.9.2.56-alpine # This version because it will be compatible going forward after we # require 22.3 for JSON Object datatype support # This tests to make sure that when specified clickhouse-operator @@ -14,7 +14,7 @@ clickhouse: image: - tag: 23.8.4.69-alpine + tag: 23.9.2.56-alpine """ @@ -24,4 +24,4 @@ def test_clickhouse_pod_image(kube): is_posthog_healthy(kube) pod_spec = get_clickhouse_pod_spec(kube) - assert pod_spec.containers[0].image == "clickhouse/clickhouse-server:23.8.4.69-alpine" + assert pod_spec.containers[0].image == "clickhouse/clickhouse-server:23.9.2.56-alpine" From b7f84f9bb7d2faec9c3b46aca74eed3ba91d8013 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Fri, 20 Oct 2023 10:48:51 +0100 Subject: [PATCH 5/5] Names with dash don't work in all our migrations :( --- ci/kubetest/test_clickhouse_external_password.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/kubetest/test_clickhouse_external_password.py b/ci/kubetest/test_clickhouse_external_password.py index 766e98bb..090c5532 100644 --- a/ci/kubetest/test_clickhouse_external_password.py +++ b/ci/kubetest/test_clickhouse_external_password.py @@ -11,7 +11,7 @@ """ clickhouse: enabled: true - cluster: name-with-dash + cluster: namewithoutdash database: kubetest_db user: kubeuser password: kubetestpw @@ -44,7 +44,7 @@ externalClickhouse: host: "clickhouse-posthog.clickhouse.svc.cluster.local" - cluster: name-with-dash + cluster: namewithoutdash database: kubetest_db user: kubeuser password: kubetestpw