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

Add and fix CRD support #5

Draft
wants to merge 13 commits into
base: streamline
Choose a base branch
from
Draft

Add and fix CRD support #5

wants to merge 13 commits into from

Conversation

davidfestal
Copy link

No description provided.

@@ -115,6 +115,8 @@ func (c *crConverter) ConvertFieldLabel(gvk schema.GroupVersionKind, label, valu
return label, value, nil
case !c.clusterScoped && label == "metadata.namespace":
return label, value, nil
case gvk.Kind == "Pod" && label == "spec.nodeName":
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in fact an unrelated change that should be removed. I did it when trying to plug virtual-kubelet directly to KCP.
But obviously this should be fixed more widely in the future by enabling all possible fields in the filters for CRDs according to the CRD schema as we discussed.

... to allow `controller-gen`  to generate CRDs
 for core v1 resources that
are not part pf the controlplane corev1 resources.

Signed-off-by: David Festal <[email protected]>
This doesn''t fully work due to the fact that for now CRD don't support
strategic merge patch. The fix for this will be in a next commit.

Signed-off-by: David Festal <[email protected]>
... since they are used as `patchMergeKey` and
in the newly-added `listMapKeys`

Signed-off-by: David Festal <[email protected]>
... For legacy schema resources that are *not* in the core group.
Because the group can be totally absent from the main gorestful
registered web services in the main API server (typically `apps/v1` in
the case of a control plane api-server)

Signed-off-by: David Festal <[email protected]>
@davidfestal
Copy link
Author

@smarterclayton it would be great to have your review here, at least to know whether these changes, albeits hacks, are on the right track, or completely wrong...

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