Skip to content

KubernetesObject type should have a spec field #1218

@bencooper222

Description

@bencooper222

Describe the bug
This type here: https://github.com/kubernetes-client/javascript/blob/6305ecd4308543407910f8db5529f3639bd758c5/src/types.ts#L2C1-L8C1

It should have a spec?: object property on it that is compatible with all derived object's spec type.

** Client Version **
0.18.1

** Server Version **
1.24.1

To Reproduce
N/A

Expected behavior
A spec?: object property added. I've extended it in my own codebase and added the property, I can't see a reason consumers should be expected to do that.

** Example Code**

import type { KubernetesObject } from '@kubernetes/client-node';

export interface CustomKubernetesObject extends KubernetesObject {
  spec?: object;
}

Environment (please complete the following information):

  • OS: macOS
  • NodeJS Versio: 18
  • Cloud runtime: Docker (Debian Bullseye)

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