Commit Graph

11 Commits

Author SHA1 Message Date
Nic Cope dba741619e Bump Kubernetes deps, buf, and provider-aws
These all had quite a lot of interactions so I had to do them together.

Note we can't bump to Kubernetes v0.31.0 because it's newer than what
the latest crossplane-runtime release is using. We'll need to update
crossplane-runtime first.

I'm also seriously questioning keeping the dependency on provider-aws.
It's massive and has a lot of painful dependencies to fix when we update
the import. On the other hand, I experimented with e.g. using
provider-nop or provider-kubernetes for examples and didn't like it.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2024-09-17 11:24:01 -07:00
Steven Borrelli 53155a2d18 update comments to match resource type
Signed-off-by: Steven Borrelli <steve@borrelli.org>
2024-05-20 14:03:52 -05:00
Steven Borrelli 434972f741 fix lint error
Signed-off-by: Steven Borrelli <steve@borrelli.org>
2024-05-20 13:59:50 -05:00
Steven Borrelli 8ff4cae190 add observedGeneration
Signed-off-by: Steven Borrelli <steve@borrelli.org>
2024-05-20 13:54:35 -05:00
Nic Cope 82371e39a6 Clear out empty object metadata if it exists after conversion
Without this change any resource that has no ObjectMeta will end up with
an empty metadata (like "metadata": {}) when rendered. This is because
json serialization adds the generation field. We then delete it,
resulting in an empty metadata object.

This isn't actually so bad because Crossplane will always add a few
labels, owner refs, etc before the metadata becomes part of the SSA
fully-specified intent. So in reality we'll never ask the API server to
make metadata an empty object. It is misleading in unit tests though.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-10-30 15:47:14 -07:00
Nic Cope 810689042b Use a runtime.Scheme to load GVK using From
I don't love the package-scoped state here but this seems like the
nicest API to offer callers.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-10-30 00:08:48 -07:00
Nic Cope 09f878b7bf Use go-json-experiment (and hacks) to trim empty fields
This is necessary for functions to be able to return JSON (as
structpb.Struct) that can be used as server side apply fully specified
intent. Without it we include empty structs that are non-nil, even if
they have the omitempty marker.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-10-30 00:08:48 -07:00
Nic Cope 9fc84aa24d Demonstrate that MR structs marshal with extraneous fields
Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-10-30 00:08:45 -07:00
Steven Borrelli 66fe852bf9
Sync with upstream crossplane-runtime changes
* Bump crossplane-runtime
* Update GetInteger to handle floats locally
* Use new claim.Reference type

Signed-off-by: Steven Borrelli <steve@borrelli.org>
2023-10-24 14:16:20 -07:00
Nic Cope 391e26d51d Make GetInteger work with 'normal' non-Kubernetes JSON data
Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-09-28 22:12:58 -07:00
Nic Cope efcec9694a Automatically fieldpath.Pave composite and composed resources
This makes it more convenient and discoverable to get and set arbitrary
unstructured data from a composed or composite resource.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-09-28 20:04:38 -07:00