Hey y'all, I've got a question about creating a `P...
# kubernetes
c
Hey y'all, I've got a question about creating a
PriorityClass
. I'm trying to do the following (on GCP):
Copy code
const schedulingPriorities = new k8s.scheduling.v1.PriorityClassList("scheduler-priorities", {
    items: [
        new k8s.scheduling.v1.PriorityClass("selector-spread-priority", {
            value: 10,
            metadata: {namespace: "default"}
        })
    ]
});
but it fails with the error:
Copy code
resource scheduler-priorities-5ynfh088 was not successfully created by the Kubernetes API server : failed to determine if the following GVK is namespaced: <http://scheduling.k8s.io/v1|scheduling.k8s.io/v1>, Kind=PriorityClassList
Anyone know what's going wrong there? Seems like the PriorityClassList doesn't take a namespace of its own
g
PriorityClass
is a cluster-scoped Kind, so it doesn’t include a namespace. It seems like the error message isn’t very helpful, but try removing the namespace value and see if that fixes it
c
oh, huh, Ill give that a shot. I originally had no namespace and got the same error so I tried adding it.
yeah, same thing
g
Ah, I think this is actually a bug with the List type. Can you file an issue on the pulumi-kubernetes repo with that code snippet and error message?
c
interesting, yup, will do. Thanks for the quick look
g
You should be able to work around it by creating the
PriorityClass
directly without the enclosing
PriorityClassList
c
nice, will give that a shot
b
c
huh, maybe, I'm not familiar enough to really know, but that seems to be on the read side instead of the write