Skip to content

Have a single interface containing both ApiVersion/Kind and Metadata #393

Closed
@admilazz

Description

@admilazz

With IKubernetesObject and IMetadata<T> being completely separate, there is no single type that I can use to capture them both, which leads to a great proliferation of generics with type constraints, e.g.
Process<T>(T obj) where T : IKubernetesObject, IMetadata<V1ObjectMeta>. Every place where such an object is passed or returned must be made generic and decorated with type constraints.

It'd be helpful to have an interface that encapsulates the combination of the above. I suggest:

interface IKubernetesObject<TMetadata> : IKubernetesObject, IMetadata<TMetadata> { }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions