pulumi / pulumi-kubernetes-operator

A Kubernetes Operator that automates the deployment of Pulumi Stacks
Apache License 2.0
221 stars 55 forks source link

examples: yaml nginx example is out of date #385

Closed stevesloka closed 1 year ago

stevesloka commented 1 year ago

What happened?

When following the example yaml implementation (https://github.com/pulumi/pulumi-kubernetes-operator/blob/master/docs/create-stacks-using-kubectl.md#nginx-deployment) it uses the projectRepo (https://github.com/metral/pulumi-nginx) which has a sample nginx deployment and is very out of date.

When running this example, I ended up with the following errors in the operator:

{"level":"error","ts":1671481232.6940339,"logger":"controller_stack","msg":"Failed to update Stack","Request.Namespace":"pulumi","Request.Name":"nginx-k8s-stack","Stack.Name":"stevesloka/nginx/dev","error":"installing project dependencies: exit status 1","stacktrace":"github.com/pulumi/pulumi-kubernetes-operator/pkg/controller/stack.(*ReconcileStack).Reconcile\n\t/Users/stevesloka/godev/src/github.com/pulumi/pulumi-kubernetes-operator/pkg/controller/stack/stack_controller.go:462\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/Users/stevesloka/godev/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/Users/stevesloka/godev/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/Users/stevesloka/godev/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:214"}

It turns out that the deps are so old that npm install failed which matches the error (e.g. exit 1), but wasn't quite apparent.

I forked the repo and updated my deps and it works fine now: https://github.com/stevesloka/pulumi-nginx

Steps to reproduce

Follow the steps in the example (https://github.com/pulumi/pulumi-kubernetes-operator/blob/master/docs/create-stacks-using-kubectl.md#nginx-deployment).

Expected Behavior

It deploys the nginx sample.

Actual Behavior

Get error from operator:

{"level":"error","ts":1671481232.6940339,"logger":"controller_stack","msg":"Failed to update Stack","Request.Namespace":"pulumi","Request.Name":"nginx-k8s-stack","Stack.Name":"stevesloka/nginx/dev","error":"installing project dependencies: exit status 1","stacktrace":"github.com/pulumi/pulumi-kubernetes-operator/pkg/controller/stack.(*ReconcileStack).Reconcile\n\t/Users/stevesloka/godev/src/github.com/pulumi/pulumi-kubernetes-operator/pkg/controller/stack/stack_controller.go:462\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/Users/stevesloka/godev/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/Users/stevesloka/godev/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/Users/stevesloka/godev/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.0/pkg/internal/controller/controller.go:214"}

Output of pulumi about

No response

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).