Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add a plugin to a stack #542

Open
avijitsarkar123 opened this issue Jan 18, 2024 · 1 comment
Open

Unable to add a plugin to a stack #542

avijitsarkar123 opened this issue Jan 18, 2024 · 1 comment
Labels
impact/accessibility Something that is difficult or impossible for some people to use kind/enhancement Improvements or new features

Comments

@avijitsarkar123
Copy link

avijitsarkar123 commented Jan 18, 2024

What happened?

I want to add a pulumi plugin for my stack, currently the pulumi-kubernetes-operator pod creates the pulumi workdir here, as its a dynamic path so I have no pay to run a pulumi plugin install from a local file that I am adding to the docker image for the stack to pickup.

Example

I added below to the Dockerfile to have my plugin installed

COPY ./bin/my-plugin-binary /tmp
RUN chmod 755 /tmp/my-plugin-binary

USER pulumi-kubernetes-operator

RUN pulumi plugin install resource my-plugin v0.0.1 -f /tmp/my-plugin-binary

It is installing the plugin in the path /home/pulumi-kubernetes-operator/.pulumi/plugins/ but the Stack root dir is
/tmp/pulumi-working/[my-namespace]/[my-stack-name]-[random alphanumeric string]/.pulumi so the custom plugin that I installed isn't being used by the stack when its doing pulumi up internally and I am getting the below error:

pulumi:providers:my-provider poc-gcp-us-west1Provider  error: Could not automatically download and install resource plugin 'pulumi-resource-my-provide' at version v0.0.1, install the plugin using `pulumi plugin install resource rubix v0.0.1`: error downloading provider rubix to file: failed to download plugin: rubix-0.0.1: 403 HTTP error fetching plugin from https://get.pulumi.com/releases/plugins/pulumi-resource-my-provide-v0.0.1-linux-amd64.tar.gz\n    pulumi:providers:rubix poc-gcp-us-west1Provider **failed**

Output of pulumi about

$pulumi about
CLI          
Version      3.92.0
Go Version   go1.21.3
Go Compiler  gc

Host     
OS       debian
Version  11.8
Arch     x86_64

Backend        
Name           pulumi.com
URL            https://app.pulumi.com
User           Unknown
Organizations  
Token type     personal

Pulumi locates its logs in /tmp by default

Additional context

My objective is to have a custom plugin available to my Stack, I am trying to achieve it by adding the pulumi plugin install... cmd to the Dockerfile assuming it will be used by the Stack but thats not happening as the pulumi root for the stack is different and my Dockerfile pulumi plugin install doesn't apply to that pulumi rootdir.

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).

@avijitsarkar123 avijitsarkar123 added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 18, 2024
@mjeffryes
Copy link
Contributor

thanks for reporting this @avijitsarkar123. I think we're intentionally isolating the stack root directories to avoid cross contamination, but I can see how that makes configuring custom plugins difficult. We'll hang on to this issue as a reminder to design a way to do this better.

@mjeffryes mjeffryes added kind/enhancement Improvements or new features impact/accessibility Something that is difficult or impossible for some people to use and removed kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/accessibility Something that is difficult or impossible for some people to use kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

2 participants