Skip to content

Taints.Effect.NO_EXECUTE.toString() returns "NoExcute" instead of "NoExecute" #2340

@sky-bro

Description

@sky-bro

Describe the bug

the enum value Taints.Effect.NO_EXECUTE's toString() method returns "NoExcute" instead of "NoExecute".

source code: https://github.com/kubernetes-client/java/blob/master/util/src/main/java/io/kubernetes/client/util/taints/Taints.java#L35

Client Version
16.0.0

Kubernetes Version
1.24.3

Java Version
Java 8

To Reproduce
add a taint to a node with:

import io.kubernetes.client.extended.kubectl.Kubectl;
import io.kubernetes.client.extended.kubectl.exception.KubectlException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.util.Config;

import java.io.IOException;

class Main{
    public static void main(String[] args) throws KubectlException, IOException {
        Configuration.setDefaultApiClient(Config.defaultClient());
        String nodeName = "myk8s-4nodes-worker";
        // neither "NoExecute" or "NoExcute" will work
        Kubectl.taint().name(nodeName).addTaint("key", "value", "NoExecute").execute();
    }
}

Expected behavior
taint (with Effect "NoExecute") should be added correctly

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions