You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a ClickHouse Keeper installation in our Kubernetes cluster that requires named collection configuration. Currently, we manage this through a separate job that runs to populate the named collections in the ClickHouse Keeper. We want to integrate this functionality more tightly with the ClickHouse Keeper pods to ensure better lifecycle management and reliability.
Current Setup
We currently have:
A ClickHouseKeeperInstallation custom resource that manages our ClickHouse Keeper cluster
A ConfigMap containing the initialization script for named collections
A ServiceAccount with necessary permissions to access GCP secrets
A separate job that runs to configure the named collections
The initialization script works by:
Fetching necessary credentials from GCP Secret Manager
Waiting for the ClickHouse Keeper to be available
Creating the named collection with the fetched credentials
Objective
We want to integrate the secret management functionality directly into the ClickHouse Keeper deployment rather than running it as a separate job. This would ensure that the named collections are always properly configured and maintained alongside the ClickHouse Keeper instances.
Attempted Solutions
Attempt 1: Adding Sidecar Container
First, we tried adding a sidecar container to the existing ClickHouse Keeper pods using a kustomize patch:
Issue: This resulted in incorrect container specification nesting, where the configurations were being mixed between the main ClickHouse Keeper container and our secret management container. This never brought up the chk-3-nodes-0 pod up and kept chk-3-nodes clickhousekeeperinstallation in in-progress state.
Attempt 2: Replacing Container Array
We then tried replacing the entire containers array to ensure proper structure:
Issue: This approach still resulted in configuration problems and risked disrupting the main ClickHouse Keeper container's operation.
Attempt 3: Using Init Container
Before trying the new pod template approach, we attempted to use an init container configuration instead of a sidecar. The reasoning was that init containers are specifically designed to run setup operations before the main container starts, which aligns well with our need to configure named collections:
However, this attempt faced two significant problems:
Similar to the sidecar container attempt, we encountered issues with the ClickHouseKeeperInstallation operator's handling of pod template modifications. The operator either:
Didn't properly apply the init container configuration
Or merged the configurations in unexpected ways
Attempt 4: Adding New Pod Template
Our last attempt was to add a completely new pod template for the secret management functionality:
Issue: When applied, this only created pods for the ClickHouse Keeper itself and did not create the additional secret management pod. This suggests that the ClickHouseKeeperInstallation operator might not support multiple pod templates in the way we expected.
Current Blocker
The ClickHouseKeeperInstallation operator appears to have specific expectations about pod templates that we don't fully understand. Despite adding a new pod template to the specification, the operator only creates pods using the default template. This suggests that either:
The operator doesn't support multiple pod templates
We need to reference the additional pod template in a different way
The operator has specific requirements for pod template configuration that we haven't met
Does the ClickHouseKeeperInstallation operator support running multiple pod types within a single installation? If not, what's the recommended way to deploy tightly coupled auxiliary services alongside ClickHouse Keeper?
The current separate job approach works but isn't ideal because:
It requires manual intervention if the configuration needs to be updated
There's no automatic recovery if the ClickHouse Keeper cluster is recreated
It's harder to maintain version consistency between the configurations and the cluster
Looking for guidance on the best way to implement this integration while maintaining reliability and manageability of the system.
The text was updated successfully, but these errors were encountered:
Background
We have a ClickHouse Keeper installation in our Kubernetes cluster that requires named collection configuration. Currently, we manage this through a separate job that runs to populate the named collections in the ClickHouse Keeper. We want to integrate this functionality more tightly with the ClickHouse Keeper pods to ensure better lifecycle management and reliability.
Current Setup
We currently have:
The initialization script works by:
Objective
We want to integrate the secret management functionality directly into the ClickHouse Keeper deployment rather than running it as a separate job. This would ensure that the named collections are always properly configured and maintained alongside the ClickHouse Keeper instances.
Attempted Solutions
Attempt 1: Adding Sidecar Container
First, we tried adding a sidecar container to the existing ClickHouse Keeper pods using a kustomize patch:
Issue: This resulted in incorrect container specification nesting, where the configurations were being mixed between the main ClickHouse Keeper container and our secret management container. This never brought up the chk-3-nodes-0 pod up and kept chk-3-nodes clickhousekeeperinstallation in in-progress state.
Attempt 2: Replacing Container Array
We then tried replacing the entire containers array to ensure proper structure:
Issue: This approach still resulted in configuration problems and risked disrupting the main ClickHouse Keeper container's operation.
Attempt 3: Using Init Container
Before trying the new pod template approach, we attempted to use an init container configuration instead of a sidecar. The reasoning was that init containers are specifically designed to run setup operations before the main container starts, which aligns well with our need to configure named collections:
However, this attempt faced two significant problems:
Similar to the sidecar container attempt, we encountered issues with the ClickHouseKeeperInstallation operator's handling of pod template modifications. The operator either:
Didn't properly apply the init container configuration
Or merged the configurations in unexpected ways
Attempt 4: Adding New Pod Template
Our last attempt was to add a completely new pod template for the secret management functionality:
Issue: When applied, this only created pods for the ClickHouse Keeper itself and did not create the additional secret management pod. This suggests that the ClickHouseKeeperInstallation operator might not support multiple pod templates in the way we expected.
Current Blocker
The ClickHouseKeeperInstallation operator appears to have specific expectations about pod templates that we don't fully understand. Despite adding a new pod template to the specification, the operator only creates pods using the default template. This suggests that either:
Does the ClickHouseKeeperInstallation operator support running multiple pod types within a single installation? If not, what's the recommended way to deploy tightly coupled auxiliary services alongside ClickHouse Keeper?
The current separate job approach works but isn't ideal because:
Looking for guidance on the best way to implement this integration while maintaining reliability and manageability of the system.
The text was updated successfully, but these errors were encountered: