Commit Graph

2 Commits

Author SHA1 Message Date
Christopher Haar 70e86c0d30 fix(defaults): add apiVersion and kind
Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
2025-01-06 17:10:32 +01:00
Nic Cope 974bdc45a6 Add a resource.update convenience function
This function can be used to add or update a resource.

For example, to add a desired composed bucket (assuming the "bucket"
resource doesn't yet exist):

```python
resource.update(rsp.desired.resources["bucket"], bucket)
```

Or to update the desired XR:

```python
resource.update(rsp.desired.composite.resource, partial_xr)
```

The source resource can be a dictionary, a protobuf struct, or a
Pydantic model.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2024-10-09 18:04:33 -07:00