Nov
29
14 hours ago
Nov
28
1 day ago
Activity icon
issue

k8s-triage-robot issue comment kubernetes-client/javascript

k8s-triage-robot
k8s-triage-robot

Timestamps have wrong type

The timestamps have incorrect typescript types. For example https://github.com/kubernetes-client/javascript/blob/master/src/gen/model/v1ObjectMeta.ts#L32

creationTimestamp is of type Date | undefined, but the documentation says it's an RFC3339 formatted date aka a string.

Since this is generated code I'm not sure of where to fix this. Either the type has to change to string | undefined, or the string has to be parsed and passed on as a date object.

k8s-triage-robot
k8s-triage-robot

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

Activity icon
fork

jschirrmacher forked kubernetes-client/javascript

⚡ Javascript client
jschirrmacher Apache License 2.0 Updated
fork time in 1 day ago
Activity icon
issue

JaLe29 issue comment kubernetes-client/javascript

JaLe29
JaLe29

Function listNamespacedDeployment is not in released in v0.16.1

According to this issue https://github.com/kubernetes-client/javascript/issues/636 listNamespacedDeployment already exist in source code, but it's not in published package.

Client Version: 0.16.1

Looks like you must publish new version.

Thank you.

image

JaLe29
JaLe29

You are right. I am sorry.

I see, that I must use AppsV1API.

	const k8sApi = kc.makeApiClient(k8s.AppsV1Api); 
	k8sApi.listNamespacedDeployment ....
Activity icon
issue

brendandburns issue comment kubernetes-client/javascript

brendandburns
brendandburns

Function listNamespacedDeployment is not in released in v0.16.1

According to this issue https://github.com/kubernetes-client/javascript/issues/636 listNamespacedDeployment already exist in source code, but it's not in published package.

Client Version: 0.16.1

Looks like you must publish new version.

Thank you.

image

brendandburns
brendandburns

I just installed the 0.16.1 library and that function is in dist/gen/api/appsV1Api.js

Are you having trouble using it?

Nov
27
2 days ago
Activity icon
issue

JaLe29 issue kubernetes-client/javascript

JaLe29
JaLe29

Function listNamespacedDeployment is not in released version 0.16.1

Describe the bug According to this issue https://github.com/kubernetes-client/javascript/issues/636 listNamespacedDeployment already exist in source code, but it's not in published package.

** Client Version ** 0.16.1

Looks like you must publish new version.

Thank you.

image

Nov
26
3 days ago
Nov
25
4 days ago
Activity icon
issue

UchihaVeha issue comment kubernetes-client/javascript

UchihaVeha
UchihaVeha

Using with GKE

I've successful created a little test to create a pod in the default namespace, locally it works fine, it creates the pod. But when i test it in a GKE cluster i receive "HttpError: HTTP request failed".

Here is my code:

const k8s     = require("@kubernetes/client-node");

const kc = new k8s.KubeConfig();
kc.loadFromDefault();

const k8sApi = kc.makeApiClient(k8s.CoreV1Api);

var pod = {
            metadata: {
                name: "name"
            },
            spec: {
                containers: [
                    {
                        image: "image",
                        name: "name"
                    },
                ],
            },
        };

k8sApi.createNamespacedPod("default", pod).then(
    (response) => {
        console.log("Created pod -> ${response}");
    },
    (err) => {
        console.log("Error: ${err}");
    }
);
UchihaVeha
UchihaVeha

@Olympuus Thank you. You saved my time. This should be added to the readme. It works with Minikube also.

Activity icon
issue

Morriz issue kubernetes-client/javascript

Morriz
Morriz

makeApiClient has deps on external service

Describe the bug A clear and concise description of what the bug is.

Our tests are not able to mock any of the provided api clients, as there seems to be code running that wants to connect to a cluster:

Error: No active cluster!

** Client Version ** 0.12.3

To Reproduce Steps to reproduce the behavior:

const kc = new KubeConfig()
kc.loadFromDefault()
const k8sCoreClient = (): CoreV1Api => kc.makeApiClient(CoreV1Api)

Observe the error.

Expected behavior A clear and concise description of what you expected to happen.

The instantiation of an api client not to have deps on any service. If any method relies on server connectivity, that should be expected to be available. No premature checking should happen.

Environment (please complete the following information):

  • OS: MacOS Monterey
  • NodeJS Version: 16

Additional context Add any other context about the problem here.

Previous