-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Operator does not remove stale users configuration when applying an updated CHI manifest #1518
Comments
Worth noting that if the |
Feel free to make PR with appropriate documentation changes. Any contribution is very welcome. |
Happy to do so! Can you please confirm that this is indeed intended behaviour, or if it's just incidental? This will determine how it should be phrased in the docs.. |
Additional default:
# Default values for ClickHouse user account(s) created by the operator
# 1. user/profile - string
# 2. user/quota - string
# 3. user/networks/ip - multiple strings
# 4. user/password - string
# These values can be overwritten on per-user basis.
profile: "default"
quota: "default"
networksIP:
- "::1"
- "127.0.0.1"
password: "default" These are default values and can be modified|overwritten if need be. |
The operator merges values provided in the CR (chi resource) with defaults from its configuration. |
so if i change the password of the default user using the following
it won't get picked up?? I keep getting |
Ah - I missed this, thank you. Please do note that the issue originally described is for something a little different though. |
Consider a CHI manifest:
Note that the
datadog_agent
'snetworks
configuration has a single entry (ip
)When the operator finishes reconciling this CHI, you can find the following entry in the clickhouse container's
/etc/clickhouse-server/users.d/chop-generated-users.xml
:Note that the
datadog_agent
'snetworks
configuration has theip
config we specified in the manifest (::/0
).It also has a
host_regexp
config and twoip
configs, which seem to be inherited/copied from thedefault
user. AFAICT this behaviour isn't documented and so seeing this was a little confusing; however, this is not what my issue is about.Now,
kubectl apply
the following (updated) CHI manifestNote the only change is that the
networks
configuration no longer has anip
; it now (only) has ahost_regexp
.When the operator has finished reconciling the changes produced by this manifest, the
chop-generated-users.xml
Note that the
host_regexp
entry has been added, but the originalip
entry::/0
still remains.Is this intentional? It is not something I would have expected, and afaict it is not documented anywhere in the operator's spec (https://github.com/Altinity/clickhouse-operator/blob/master/tests/requirements/requirements.md).
If we fetch CHI resource from kubernetes, it will show that both entries now exist (and so it seems like the issues lies somewhere in the reconciliation loop, and not the "config file generation" process):
The text was updated successfully, but these errors were encountered: