Skip to content

Conversation

pashtet04
Copy link

Pull Request Description

This PR introduces support for configuring remote_servers in the ClickHouseInstallation resource with secret-based authentication.

Error DB::Exception: default: Authentication failed: password is incorrect, or there is no user with such name. occurs because the Distributed table is unable to connect to another server in the cluster. By default, shards use the default user to connect to each other. You can resolve this issue by:

  1. Configuring a remote_servers entry with a specified user and password pair.
  2. Removing the password for the default user to allow seamless local connections.

Note

The current Altinity Helm chart for ClickHouse installations does not support configuring remote_servers. As a workaround, you can use the default user without a password. This setup is secure as it restricts access to local connections only.

Key Changes:

  • Updated chi.yaml to include a new settings section for remote_servers using the Helm chart's templating with dynamically configured via Kubernetes Secret references.

Reviewer Notes:

Please ensure that:

  • Secrets are properly defined in your Kubernetes cluster before deploying.
  • The changes align with your current security and deployment workflows.

@joshleecreates
Copy link
Collaborator

Thanks for the PR! We've actually been discussing this internally around what would be the best practice here. My current thinking is that this helm chart should always (or at least by default) create the default user with no password, and have a simple values section for adding a new remote user besides the default user. WDYT?

If we decide to keep the default user editable as it is currently, then we'd definitely want to include the changes from this PR.

@pashtet04
Copy link
Author

I think that by default you need to create a secret and refer to it. The password can be generated during the first installation via helm helpers.

@pashtet04
Copy link
Author

Moreover, It is not possible to add some custom configuration, isn't it? For example, how to configure max_connections?

@joshleecreates
Copy link
Collaborator

We'll implement the auto-generated password, thanks!

For more custom configurations it is recommended to create a CHI resource directly, although a mechanism for common options like max_connections would probably be useful here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants