-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Support private repository extensions #928
Comments
It is not really a bug, it will be a new feature. You can customize the git repository but for now it does not support a private repository. |
The executor component is cloning the directory in this part of the code without adding any kind of authentication as you can see here. terrakube/executor/src/main/java/org/terrakube/executor/service/scripts/ScriptEngineService.java Line 107 in adc227f
This is the code when you are cloning a private git repository that is used inside a workspace that is really similar terrakube/executor/src/main/java/org/terrakube/executor/service/workspace/SetupWorkspaceImpl.java Line 140 in adc227f
The parameter that the executor receives to execute a job is done in this part of the code, maybe adding some information about the private extension could work. terrakube/executor/src/main/java/org/terrakube/executor/service/mode/TerraformJob.java Line 13 in adc227f
The API is sending the request with all the parameters to the executor in this part of the code terrakube/api/src/main/java/org/terrakube/api/plugin/scheduler/job/tcl/executor/ExecutorService.java Line 63 in adc227f
terrakube/api/src/main/java/org/terrakube/api/plugin/scheduler/job/tcl/executor/ExecutorContext.java Line 14 in adc227f
And finally the Java class that represents the YAML file that you use to define extension is in this part ot the code. By the way I think you are the first person that want to use a private extension repository |
Hmmm got it. Could we mount the SSH key we configure on the organization inside the executors and use it to clone the repo? I used https just because the default extensions repo is using it. And the reason I have a private repo is that I needed a MS Teams extension, to alert me about drift detection. If it gets too complicated, I can try opening a PR on your extensions repo to add the MS Teams extension, but as I'm not a developer, idk if it would even work (I |
Mounting the SSH key in executor won't work because JGIT is not using that keys to clone the repository. You could fork the extension repository and inside your fork you could create a branch with the new feature for MS teams. In the helm chart you could customize the parameter like this: executor:
properties:
toolsRepository: "https://github.com/mygithubuser/my-extensions"
toolsBranch: "my_feature_branch" Now you can test your new extension in a different repository and when you have it ready you could send the pull request with some sample code and some images so we can update the documentation. All help is welcome this is an open project 👍 |
I've created a draft on terrakube-extensions repo: AzBuilder/terrakube-extensions#36 I'll test it like you told me to, and then I open the PR for code reviews. |
I would be the 2nd person :) I am running this on a private GitHub Enterprise, and would like to avoid having this publicly available within our org in order to pull, so an option to add a PAT would be helpful :) Thanks! |
Feature description 💡
I created a private terrakube-extensions, and now I need to use it on the executors, though it's showing this error to me:
How do I pass the credentials? I thought the same GitHub App used to make Dex work was also being used here, but it's not.
Anything else?
Opened as a feature request because idk if it's a bug 😬
The text was updated successfully, but these errors were encountered: