AFAICT you cant configure the operator to explicit...
# pulumi-kubernetes-operator
p
AFAICT you cant configure the operator to explicitly use yarn over npm. Will the operator autodetect yarn?
s
Yes you are right. Could you open an issue in https://github.com/pulumi/pulumi-kubernetes-operator/issues please?
p
So will it automatically use yarn if it detects a
yarn.lock
? This is a blocker for us, happy to contribute if you point me in the right direction.
s
That seems like a reasonable approach. Would also be nice to take a stack configuration override to force one over the other.
As a quick/hacky workaround, you could potentially install an init container which deletes the npm binary from the image - we currently first look for npm and then fallback to yarn. Both are installed in the image so always choose npm.. https://github.com/pulumi/pulumi-kubernetes-operator/blob/master/pkg/controller/stack/stack_controller.go#L729
p
doing that check wouldn’t actually solve my problem as I’m using yarn workspaces… I’ll do the init workaround
I’ve added that comment about yarn.lock as well
I’ve also added the dockerfile we use to workaround this.