pulumi-kubernetes icon indicating copy to clipboard operation
pulumi-kubernetes copied to clipboard

PriorityClassList fails to create due to: failed to determine if namespaced

Open CoreyLoose opened this issue 4 years ago • 3 comments

Problem description

When creating a PriorityClassList the following error happens:

resource scheduler-priorities-rqaatzhi was not successfully created by the Kubernetes API server : failed to determine if the following GVK is namespaced: scheduling.k8s.io/v1, Kind=PriorityClassList

Errors & Logs

This is simplest version of the code I've got that causes the error. Running just the PriorityClass piece by itself works, so the problem is definitely with the PriorityClassList

new k8s.scheduling.v1.PriorityClassList("scheduler-priorities", {
    items: [
        new k8s.scheduling.v1.PriorityClass("selector-spread-priority", {value: 10})
    ]
});

Affected product version(s)

I'm using pulumi 1.6

CoreyLoose avatar Mar 25 '20 16:03 CoreyLoose

Talked with @lblackstone a little bit about this in slack

CoreyLoose avatar Mar 25 '20 16:03 CoreyLoose

Same for CronJobList

pulumi: v3.33.2

deepio avatar May 31 '22 19:05 deepio

I got something that works for me. Instead of using any *List (e.g., CronJobList, NamespaceList, PriorityClassList) try just putting them in an array.

const cronJob = [
  new k8s.batch.v1beta1.CronJob(...),
  new k8s.batch.v1beta1.CronJob(...),
];

deepio avatar Jun 01 '22 13:06 deepio