Skip to content
Discussion options

You must be logged in to vote

Hello, it looks like the name you want to set test1 is conflicting with name that's already present in the YAML manifest. Do you want to keep YAML name? If yes, you can remove resourceResource.item().getMetadata().setName(jobName); line. If you want to modify YAML manifest name, you can first load the object, modify name and then apply it:

NonNamespaceOperation<GenericKubernetesResource, GenericKubernetesResourceList, Resource<GenericKubernetesResource>> volcanoJobResource = client
  .genericKubernetesResources("batch.volcano.sh/v1alpha1", "Job")
  .inNamespace("foo");

GenericKubernetesResource volcanoJob = volcanoJobResource.load(VolcanoJobCreate.class.getClassLoader().getResourceAsStream(

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hzp01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants