pulumi-kubernetes-operator
pulumi-kubernetes-operator copied to clipboard
Abilities to skip install dependencies
Hello!
- Vote on this issue by adding a 👍 reaction
- If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)
Issue details
It would be great to have flag to skip installing dependencies. In my case, I use poetry to build and package code with all dependencies as OCI artifact. When Pulumi operator executed, it failed to install dependencies because requirements.txt is not in the OCI artifact. So in this case, it does not need to install dependencies because they are already included in artifact file.
Affected area/feature
Pulumi Operator
This seems entirely reasonable to me 😄 Does this mean you are using this operator with a Flux OCI source?
@squaremo Yes exactly. We are experimenting the operator with FluxCD.
Can't wait for this feature! I'm using nodejs and TurboRepo and can't get the operator to successfully npm install as it has issues with resolving internal shared monorepo packages. This addition combined with OCI sources would be killer 🤘
Good news everyone, we just released a preview of Pulumi Kubernetes Operator v2. This new release has a whole-new architecture that uses pods as the execution environment. The installation step is now done using pulumi install and, to my knowledge, it is harmless to invoke regardless of how the source was obtained. Could someone explain whether skipping installation is still a valuable feature?
Please read the announcement blog post for more information: https://www.pulumi.com/blog/pulumi-kubernetes-operator-2-0/
Would love to hear your feedback! Feel free to engage with us on the #kubernetes channel of the Pulumi Slack workspace. cc @worawatwi @JarvisPrestidge @JonCholas
Didn't run into this issue with v1. But I am in v2. Not sure on the fix right now when attempting upgrade. I feel like this is broken.
In v2 the agent can be started with --skip-install, but I agree it's not straightforward for the user to customize the install behavior.
Didn't run into this issue with v1. But I am in v2.
@drduker were you not installing any dependencies in v1?
We also ran into this issue (using operator v2).
Our case is with go, compiled to a binary, and the project is set to use the binary
runtime:
name: go
options:
binary: ./some-binary
It failed because of go: go.mod file not found ....
I had to give it a go.mod file, and even an empty go.mod works
Sounds like we need a flag in the workspace template to tell the system to skip running pulumi install. I was of the impression that the install command was harmless in all situations.
I see the flag in the command for the workspace container, but It's still trying to install.
- /share/tini
- /share/agent
- --
- serve
- --workspace
- /share/workspace
- --skip-install
Installing dependencies...
go: updating go.mod: open /home/zitadel-pulumi/go.mod: permission denied
error: installing dependencies: `go mod tidy` failed to install dependencies: exit status 1
Isn't that what the flag should prevent?
I'm using v2
image: docker.io/pulumi/pulumi-kubernetes-operator:v2.0.0
There seem to be 2 stages happening 30 seconds apart, in the first one the installation is being skipped.
Defaulted container "pulumi" out of: pulumi, bootstrap (init), fetch (init)
2025-04-20T19:39:02.166Z INFO cmd.serve Pulumi Kubernetes Agent {"version": "v2.0.0"}
2025-04-20T19:39:02.168Z INFO cmd.serve activated the Kubernetes authorization mode {"audiences": ["zitadel-pulumi.default"], "workspace.namespace": "default", "workspace.name": "zitadel-pulumi"}
2025-04-20T19:39:02.911Z INFO cmd.serve opened a local workspace {"workspace": "/home/zitadel-pulumi", "project": "zitadel-pulumi", "runtime": "go"}
2025-04-20T19:39:02.912Z INFO cmd.serve installation skipped {"project": "zitadel-pulumi", "runtime": "go"}
2025-04-20T19:39:02.912Z INFO server project serving {"project": "zitadel-pulumi", "runtime": "go"}
2025-04-20T19:39:02.912Z INFO cmd.serve starting the RPC server {"address": "0.0.0.0:50051"}
2025-04-20T19:39:02.912Z INFO cmd.serve.grpc [core][Server #1]Server created {"system": "grpc", "grpc_log": true}
2025-04-20T19:39:02.913Z INFO cmd.serve server listening {"address": "[::]:50051", "workspace": "/home/zitadel-pulumi"}
2025-04-20T19:39:02.913Z INFO cmd.serve.grpc [core][Server #1 ListenSocket #2]ListenSocket created {"system": "grpc", "grpc_log": true}
2025-04-20T19:39:34.141Z INFO cmd.serve.grpc finished unary call with code OK {"grpc.start_time": "2025-04-20T19:39:33Z", "system": "grpc", "span.kind": "server", "grpc.service": "agent.AutomationService", "grpc.method": "WhoAmI", "auth.mode": "kubernetes", "user.id": "99e408b4-9b04-4462-9b5b-93c467ed3c1f", "user.name": "system:serviceaccount:pulumi-kubernetes-operator:pulumi-kubernetes-operator", "peer.address": "10.244.0.12:52840", "grpc.code": "OK", "grpc.time_ms": 905.236}
2025-04-20T19:39:34.155Z INFO server installing the project dependencies
2025-04-20T19:39:34.400Z INFO pulumi Installing dependencies...
2025-04-20T19:39:34.400Z INFO pulumi
2025-04-20T19:39:34.680Z WARN pulumi go: updating go.mod: open /home/zitadel-pulumi/go.mod: permission denied
2025-04-20T19:39:34.683Z WARN pulumi error: installing dependencies: `go mod tidy` failed to install dependencies: exit status 1
2025-04-20T19:39:34.683Z WARN pulumi `go mod tidy` failed to install dependencies: exit status 1
2025-04-20T19:39:34.683Z WARN pulumi `go mod tidy` failed to install dependencies: exit status 1
2025-04-20T19:39:34.688Z ERROR server install completed with an error {"error": "could not install dependencies: exit status 255\ncode: 255\nstdout: Installing dependencies...\n\n\nstderr: go: updating go.mod: open /home/zitadel-pulumi/go.mod: permission denied\nerror: installing dependencies: `go mod tidy` failed to install dependencies: exit status 1\n`go mod tidy` failed to install dependencies: exit status 1\n`go mod tidy` failed to install dependencies: exit status 1\n\n"}
2025-04-20T19:39:34.688Z WARN cmd.serve.grpc finished unary call with code Aborted {"grpc.start_time": "2025-04-20T19:39:34Z", "system": "grpc", "span.kind": "server", "grpc.service": "agent.AutomationService", "grpc.method": "Install", "peer.address": "10.244.0.12:52840", "auth.mode": "kubernetes", "user.id": "99e408b4-9b04-4462-9b5b-93c467ed3c1f", "user.name": "system:serviceaccount:pulumi-kubernetes-operator:pulumi-kubernetes-operator", "error": "rpc error: code = Aborted desc = could not install dependencies: exit status 255\ncode: 255\nstdout: Installing dependencies...\n\n\nstderr: go: updating go.mod: open /home/zitadel-pulumi/go.mod: permission denied\nerror: installing dependencies: `go mod tidy` failed to install dependencies: exit status 1\n`go mod tidy` failed to install dependencies: exit status 1\n`go mod tidy` failed to install dependencies: exit status 1\n\n", "grpc.code": "Aborted", "grpc.time_ms": 533.148}
2025-04-20T19:39:34.705Z INFO cmd.serve.grpc shutting down the server
2025-04-20T19:39:34.706Z INFO cmd.serve.grpc [core][Server #1 ListenSocket #2]ListenSocket deleted {"system": "grpc", "grpc_log": true}
2025-04-20T19:39:34.706Z INFO cmd.serve server stopped