Skip to content

Conversation

Diaphteiros
Copy link
Contributor

@Diaphteiros Diaphteiros commented Aug 29, 2025

What this PR does / why we need it:
We use the k8s default Condition type, which not only requires a non-empty Reason, but also validates it against a regex. To avoid issues, the ConditionUpdater just added a dummy reason if it was empty, for which it used the condition's Type. The regex for type and reason differ, though: type allows . but not :, while for the reason, it is the other way around.

This PR replaces . with : when using the type default the condition reason.

Which issue(s) this PR fixes:
Required for openmcp-project/openmcp-operator#115
(not a hard requirement, though, there is a workaround in place)

Special notes for your reviewer:

Release note:

The condition updater would produce an invalid dummy reason for a condition if that condition's type contained a `.`, because this is not an allowed character in the condition's reason. This is now avoided by replacing `.` with `:` when using the condition's type to construct a dummy reason.

@Diaphteiros Diaphteiros merged commit e00b4f2 into main Sep 1, 2025
7 checks passed
@Diaphteiros Diaphteiros deleted the fix-con-reason branch September 1, 2025 06:44
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