Skip to content

[bug]: System.Object not supported in CRDs #858

@rgrama

Description

@rgrama

Describe the bug

Setting a property type to System.Object results in the following error

System.ArgumentException: 'The given type System.Object is not a valid Kubernetes entity.'

I created PR #857 to address this

To reproduce

    [KubernetesEntity(Group = "testing.dev", ApiVersion = "v1", Kind = "TestEntity")]
    private class EntityWithSystemObject : CustomKubernetesEntity<EntityWithSystemObject.EntitySpec>
    {
        public class EntitySpec
        {
            public object Obj { get; set; } = null!;
        }
    }

Expected behavior

System.Object is allowed and XKubernetesPreserveUnknownFields is set automatically

Screenshots

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions