Adjust runtime to properly support provider-kubernetes SSA#663
Merged
github-actions[bot] merged 2 commits intodevelopfrom May 5, 2026
Merged
Adjust runtime to properly support provider-kubernetes SSA#663github-actions[bot] merged 2 commits intodevelopfrom
github-actions[bot] merged 2 commits intodevelopfrom
Conversation
3 tasks
Contributor
|
mikeshootzz
approved these changes
May 5, 2026
83a4c0f to
7d46c95
Compare
Contributor
|
Kidswiss
requested changes
May 5, 2026
| // the fields needed to identify the object (apiVersion, kind, metadata). | ||
| // Use this for observer objects whose types contain non-omitempty fields (e.g. StatefulSet.spec.serviceName) | ||
| // that would otherwise be sent via server-side apply and fail immutability validation. | ||
| func KubeOptionObserveMinimalManifest(obj *xkube.Object) { |
Contributor
There was a problem hiding this comment.
I would probably add this to the normal observe. Observe only needs the metadata anyway. Any observed state lands in the status.
Member
Author
There was a problem hiding this comment.
Fixed. Please check again
The empty spec fields cause issues with server-side-apply in provider-kubernetes with StatefulSets as SSA wants to override the already present and immutable fields. Since this is only used for observing SSTs we don't need the spec at all, as the information in the `metadata` is enough to identify the SST to observe
We might create objects with `nil` values in fields which can cause issues with some CRs that expect a non-nil value. To fix that, we drop any fields that have a `nil` value before putting the object into the desired state
7d46c95 to
a061e2b
Compare
Contributor
|
Kidswiss
approved these changes
May 5, 2026
Contributor
Kidswiss
left a comment
There was a problem hiding this comment.
LGTM
I'd advise to do one last round of testing though, since it's now used more broadly.
mdnix
approved these changes
May 5, 2026
Member
Author
|
Tested it on lab and works without issues |
Member
Author
|
/merge |
Contributor
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.
Summary
specfieldsChecklist
/mergecomment.Component PR: vshn/component-appcat#1168