Skip to content

Conversation

@Danil-Grigorev
Copy link

Current setup allows to use functionality available for k/k 1.32+ already with streaming_list() option by piggybacking type_meta population on serialization as a typed object first with k/k below 1.32.

TypeMeta for core types in this scenario is always populated by k8s_openapi implementation, even though list response does omit type_meta for the inner set of objects.

Main differentiator here, is that streaming_list uses only watch, which never omits type_meta of the resource, while regular watch setup issues list request to collect initial events.

For the Cluster object defined as a CRD, to_dynamic_event performs necessary conversion with type_meta population in-place.

@Danil-Grigorev Danil-Grigorev force-pushed the simplify-dynamic-watches branch 2 times, most recently from 9523bf8 to 55fd9f4 Compare March 22, 2025 18:38
@Danil-Grigorev Danil-Grigorev force-pushed the simplify-dynamic-watches branch from 55fd9f4 to 6decc81 Compare March 22, 2025 19:32
- Move BundleNamespaceMapping cleanup into Class reconciler
- Remove finalizer from ClusterGroup, causing issues
- Refactor controllers to use stable API (duplicate cache for
  ClusterGroup)
- Fix hot loop on Helm install due to chart version compare issue

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
Current setup allows to use functionality available for k/k 1.32+
already with streaming_list() option by piggybacking type_meta
population on serialization as a typed object first with k/k below 1.32.

`TypeMeta` for core types in this scenario is always populated by
`k8s_openapi` implementation, even though list response does omit
type_meta for the inner set of objects.

Main differentiator here, is that streaming_list uses only `watch`,
which never omits type_meta of the resource, while regular watch setup
issues `list` request to collect initial events.

For the `Cluster` object defined as a `CRD`, `to_dynamic_event` performs
necessary conversion with type_meta population in-place.

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
@Danil-Grigorev Danil-Grigorev force-pushed the simplify-dynamic-watches branch from b28c6a9 to 091a228 Compare March 24, 2025 08:30
@Danil-Grigorev Danil-Grigorev added this pull request to the merge queue Mar 24, 2025
Merged via the queue into rancher:main with commit a8c77f9 Mar 24, 2025
11 checks passed
@Danil-Grigorev Danil-Grigorev deleted the simplify-dynamic-watches branch March 24, 2025 09:20
Danil-Grigorev added a commit to Danil-Grigorev/cluster-api-addon-provider-fleet that referenced this pull request Mar 24, 2025
* Drop finalizer on ClusterGroup

- Move BundleNamespaceMapping cleanup into Class reconciler
- Remove finalizer from ClusterGroup, causing issues
- Refactor controllers to use stable API (duplicate cache for
  ClusterGroup)
- Fix hot loop on Helm install due to chart version compare issue

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>

* Simplify dynamic watch setup version separation

Current setup allows to use functionality available for k/k 1.32+
already with streaming_list() option by piggybacking type_meta
population on serialization as a typed object first with k/k below 1.32.

`TypeMeta` for core types in this scenario is always populated by
`k8s_openapi` implementation, even though list response does omit
type_meta for the inner set of objects.

Main differentiator here, is that streaming_list uses only `watch`,
which never omits type_meta of the resource, while regular watch setup
issues `list` request to collect initial events.

For the `Cluster` object defined as a `CRD`, `to_dynamic_event` performs
necessary conversion with type_meta population in-place.

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>

* Implement default handling as trait extension

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>

---------

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
Danil-Grigorev added a commit that referenced this pull request Mar 24, 2025
* chore(deps): Bump opentelemetry_sdk from 0.28.0 to 0.29.0 (#223)

Bumps [opentelemetry_sdk](https://github.com/open-telemetry/opentelemetry-rust) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-rust/releases)
- [Commits](open-telemetry/opentelemetry-rust@opentelemetry_sdk-0.28.0...opentelemetry_sdk-0.29.0)

---
updated-dependencies:
- dependency-name: opentelemetry_sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>

* chore(deps): Bump opentelemetry-otlp from 0.28.0 to 0.29.0 (#222)

Bumps [opentelemetry-otlp](https://github.com/open-telemetry/opentelemetry-rust) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-rust/releases)
- [Commits](open-telemetry/opentelemetry-rust@opentelemetry-otlp-0.28.0...opentelemetry-otlp-0.29.0)

---
updated-dependencies:
- dependency-name: opentelemetry-otlp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>

* Simplify dynamic watch setup version separation (#219)

* Drop finalizer on ClusterGroup

- Move BundleNamespaceMapping cleanup into Class reconciler
- Remove finalizer from ClusterGroup, causing issues
- Refactor controllers to use stable API (duplicate cache for
  ClusterGroup)
- Fix hot loop on Helm install due to chart version compare issue

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>

* Simplify dynamic watch setup version separation

Current setup allows to use functionality available for k/k 1.32+
already with streaming_list() option by piggybacking type_meta
population on serialization as a typed object first with k/k below 1.32.

`TypeMeta` for core types in this scenario is always populated by
`k8s_openapi` implementation, even though list response does omit
type_meta for the inner set of objects.

Main differentiator here, is that streaming_list uses only `watch`,
which never omits type_meta of the resource, while regular watch setup
issues `list` request to collect initial events.

For the `Cluster` object defined as a `CRD`, `to_dynamic_event` performs
necessary conversion with type_meta population in-place.

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>

* Implement default handling as trait extension

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>

---------

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Danil-Grigorev added a commit to Danil-Grigorev/cluster-api-addon-provider-fleet that referenced this pull request Mar 26, 2025
* Drop finalizer on ClusterGroup

- Move BundleNamespaceMapping cleanup into Class reconciler
- Remove finalizer from ClusterGroup, causing issues
- Refactor controllers to use stable API (duplicate cache for
  ClusterGroup)
- Fix hot loop on Helm install due to chart version compare issue

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>

* Simplify dynamic watch setup version separation

Current setup allows to use functionality available for k/k 1.32+
already with streaming_list() option by piggybacking type_meta
population on serialization as a typed object first with k/k below 1.32.

`TypeMeta` for core types in this scenario is always populated by
`k8s_openapi` implementation, even though list response does omit
type_meta for the inner set of objects.

Main differentiator here, is that streaming_list uses only `watch`,
which never omits type_meta of the resource, while regular watch setup
issues `list` request to collect initial events.

For the `Cluster` object defined as a `CRD`, `to_dynamic_event` performs
necessary conversion with type_meta population in-place.

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>

* Implement default handling as trait extension

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>

---------

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
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.

1 participant