https://pulumi.com logo
#aws
Title
# aws
s

shy-solstice-54260

03/28/2024, 1:42 PM
Hey folks, I'm creating a priorityClass in EKS, pulumi says the priority class was created and stores it in the state, but when I check in the cluster no priority class has been created. If I run pulumi refresh then it detect the drift for priority class not being present in the cluster and deleted it from state. This is bad as I'm loosing resources silently and pulumi state doesn't complain and consequent updates don't try to create the resource. Am I doing something wrong?
Copy code
export const createPodPriorityClass = (priorityClasssName: string, priorityClassValue: number, preemptionPolicy: string, k8sProvider: k8s.Provider) => {
    new k8s.scheduling.v1.PriorityClass(priorityClasssName, {
        metadata: {
            name: priorityClasssName,
        },
        preemptionPolicy: preemptionPolicy,
        value: priorityClassValue,
        globalDefault: false,
    });
}
This is the snippet I'm using to create priortiy class