-
Notifications
You must be signed in to change notification settings - Fork 182
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
Private remote target not working #392
Comments
Good issue!
Please correct me if I am wrong. |
Haven't thought o that one: having two But I want to emphasize, that this is still only a workaround. If I'll most likely end up using it because having DRY code is more appealing to me than the complexity of making it work. I'll try to find time this week to test this out. I'll post back the result. |
This controller is not meant to be used standalone, it’s part of Flux and depends on source-controller for manifests acquisition, origin validation (pgp) and caching. To kustomize resources you have 3 options: in-line patches, source includes and git submodules. |
The way I see it (and, of course, all this is base on how we organized our kustomization):
I didn't go through with what was outlined above. Instead, I found this gem: injecting the git ssh credentials inside Thanks to this issue comment: #158 (comment) As far as I'm concern, that's a clean solution to my problem. |
Injecting ssh credentials in kustomize-controller homedir is now broken since v0.20.0 release 3 days ago. Flux now deploy controller without root access, using a read-only FS with low priviledged "nobody" account. This breaks a bit this workaround that I'm also using on a daily basis :( EDIT : solved by creating a /.ssh emptyDir & using it as nobody ~/.ssh (since / is useraccount homedir) |
Our setup is that each application have their Kustomize configuration in their own repo, residing along the actual code. Some of the configuration (mostly labels) are pretty much the same across our fleet. In an effort to turn our Kustomize configuration more DRY, I was trying to implement remote target for common Components that apply mostly patches. Those Components resides in a private repository, which also contains all our Kustomize infrastructure applications.
I was testing locally and came up with the design by manually calling
kustomize build ...
and made it work. But once insidekustomize-controller
, it was no longer working. I searched for solution or insight through the documentation, but I haven't found anything. Though I came across this quote from an issue of flux2: fluxcd/flux2#1445 (comment)It would be awesome if this feature, available to Kustomize, would be made available to
kustomize-controller
. It could reuse the same secret created forGitRepository
.As a work around, I have tried using
GitRepository.spec.include
and it works. You just need to bind the two repositories, and add the inclusion to the applicationGitRepository
. What is a deal breaker is that you loose the ability to do local (or via CI)kustomize build ...
, because the injected folder is never to be found in the git repository.Seeing that, I tried to create a symbolic link at the designated target folder inside the application repository (
spec.include[*].toPath
). Locally, it work, but once the symbolic link is commit in the repository, the applicationGitRepository
doesn't like it and error out instead of trying to replace the existing path with the intended folder coming from the inclusion.Is their any alternative to using remote target on private repositories, that I haven't thought of, that would still allow us the use of local
kustomize build ...
while also working with Flux?The text was updated successfully, but these errors were encountered: