Closed
Description
Idea
I'd like to propose an idea.
How about providing a utility function that outputs the diff information to show which fields have changed between the actual resource and the desired resource?
Currently, it seems that such a feature doesn't exist, so when unintended events are generated, we have to log both the actual and desired resources as text and manually compare them field by field to find the differences. This process takes too much time.
Example
override fun match(
actualResource: StatefulSet,
desired: StatefulSet,
primary: OpenSearch,
context: Context<OpenSearch>,
): Matcher.Result<StatefulSet> {
println(ResourceDiffPrinter.printDiff(actualResource, desired))
}
"""
Diff :
(actual) -> (desired)
annotations.last-modification-timestamp: "2024-08-13T11:07:04+09:00" -> annotations.last-modification-timestamp: "2024-08-13T12:07:04+09:00"
spec.replicas: "3" -> spec.replicas: "4"
"""
Metadata
Metadata
Assignees
Labels
No labels