refactor(operator): drop dead ClusterName defaulting fallback - #88
Open
armru wants to merge 3 commits into
Open
Conversation
armru
force-pushed
the
refactor/remove-dead-clustername-fallback
branch
2 times, most recently
from
August 12, 2026 12:22
847f1fd to
1996802
Compare
gabriele-wolfox
approved these changes
Aug 12, 2026
gabriele-wolfox
force-pushed
the
refactor/remove-dead-clustername-fallback
branch
from
August 12, 2026 13:50
50e8051 to
f805fbc
Compare
leonardoce
approved these changes
Aug 13, 2026
leonardoce
force-pushed
the
refactor/remove-dead-clustername-fallback
branch
from
August 13, 2026 08:24
f805fbc to
4b30df8
Compare
The `PluginConfiguration.spec.clusterName` field has been `Required` with `MinLength=1` since the auto-propagation work, so the API server rejects empty values and the two defaulting branches in klioconfig could no longer fire for any object written through the current CRD. Remove both branches, along with the stale comment claiming the cluster name doubles as the host name. Objects created while the field was still optional (v0.0.7 to v0.0.12) are not revalidated on read, so they can still carry an empty `clusterName`. Those now fail at client configuration validation with `invalid client config: cluster_name is empty` instead of being silently defaulted; setting `clusterName` on the resource fixes them. Closes #69 Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
The restore example commented `clusterName` as optional, while the field is `Required` with `MinLength=1`, so omitting it is rejected by the API server. Also state explicitly that the value must match the host name in the Common Name of the client certificate, which is the constraint the Kopia client enforces at connection time. Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Tier 1 base backups reject a Common Name mismatch at connection time, but WAL streaming has no such check and can silently misroute WALs. Also drops a stale GenerateConfig comment for a removed parameter. Signed-off-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
gabriele-wolfox
force-pushed
the
refactor/remove-dead-clustername-fallback
branch
from
August 13, 2026 08:48
4b30df8 to
baebd42
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PluginConfiguration.spec.clusterNameisRequiredwithMinLength=1, so theAPI server rejects empty values. The two branches in
klioconfigthat defaultedan empty
ClusterNamecould no longer fire for any object written through thecurrent CRD, and they disagreed with each other anyway: one defaulted to the
external cluster's
serverName, the other tocluster.Name.This removes both, along with the stale comment claiming the cluster name
doubles as the host name.
A second commit tightens the documentation of the field: the restore example
still commented it as optional, and neither page mentioned that the value has to
match the host name in the client certificate's Common Name.
Behavior note
Objects created while the field was still optional (v0.0.7 to v0.0.12) are not
revalidated on read, so they can still be served with an empty
clusterName.Such an object now fails at client configuration validation with
invalid client config: cluster_name is emptyinstead of being silentlydefaulted; setting
clusterNameon the resource fixes it.Closes #69