Move ClickHouse credentials to K8s Secret #33
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
ClickHouse credentials are hardcoded in plaintext in
deploy/clickhouse.yaml(CLICKHOUSE_USER=cameleer,CLICKHOUSE_PASSWORD=cameleer_dev). With the new NodePort service (30123,30900), ClickHouse is now reachable from the network, making this a security concern.Solution
cameleer-authsecret pattern)secretKeyRef--dry-run=client | kubectl apply)Priority
High — exposed credentials on the network.
Priority increased: ClickHouse is now exposed externally via NodePort (30123/30900) with plaintext credentials (
cameleer/cameleer_dev) in the StatefulSet env vars. Moving to K8s Secrets should be done before any production use.Implemented: ClickHouse credentials moved to K8s secret
clickhouse-credentials. Bothdeploy/server.yamlanddeploy/clickhouse.yamlnow usesecretKeyRef. CI deploy step creates the secret idempotently fromCLICKHOUSE_USERandCLICKHOUSE_PASSWORDGitea CI secrets.Prerequisite: Add
CLICKHOUSE_USERandCLICKHOUSE_PASSWORDas Gitea CI secrets before next deploy.