Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle unknown types as unstructured (#954) #968

Merged
merged 1 commit into from
Oct 18, 2019

Conversation

alenkacz
Copy link
Contributor

Backport of 5459b7d

**What this PR does / why we need it**:
When scheme did not contain that type, we previously failed. Since we should be able to handle all types that people might have installed in their cluster, we should fallback to parsing a type as unstructured when not available.

This PR has 3 parts:
- update to `ParseKubernetesObjects` to process unknown types as Unstructured
- use of dynamic restmapper in execution that ensures that we discover new types that were added during the lifetime of the controller
- integration test

NOTE: Right now we are using dynamic mapper from test harness. That is probably not as robust as the one introduced in the controller-runtime 0.3.0. I will port this code to the controller-runtime mapper when we bump the version of controller-runtime (that should happen prior to 0.8.0 anyway).

Fixes #913
@alenkacz alenkacz merged commit b35d39b into releases/0.7 Oct 18, 2019
@alenkacz alenkacz deleted the av/unstructured-07 branch October 18, 2019 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants