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

Forward git credentials to config management plugins #1628

Closed
stevendborrelli opened this issue May 20, 2019 · 10 comments
Closed

Forward git credentials to config management plugins #1628

stevendborrelli opened this issue May 20, 2019 · 10 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@stevendborrelli
Copy link

We've been experimenting with configuration management plugins and have come across an issue when connecting to authenticated repositories.

Could we do something similar to the kustomize code https://github.com/argoproj/argo-cd/blob/master/util/kustomize/kustomize.go#L118 and forward Git credentials to the config management plugins?

@stevendborrelli stevendborrelli added the enhancement New feature or request label May 20, 2019
@jessesuen jessesuen added this to the v1.1 milestone Jun 1, 2019
@alexec
Copy link
Contributor

alexec commented Jun 3, 2019

@stevendborrelli do you have repo steps please?

@alexmt
Copy link
Collaborator

alexmt commented Jun 3, 2019

I believe this is an enhancement not a bug. So there are no steps to reproduce. It definitely makes sense to support passing credentials to the config management plugins

@alexec
Copy link
Contributor

alexec commented Jun 3, 2019

@alexmt I'm not familiar with the plugin code, are you able to provide any pointers to code?

@jessesuen
Copy link
Member

I had asked @stevendborrelli to file this issue in slack. Basically, we gave kustomize special treatment to set up a proper git environment whenever we run kustomize build, so that it could use its remote base feature.

Since users can additionally perform kustomize build as part of plugins, we need to extend this special treatment to custom plugins.

@jessesuen
Copy link
Member

@alexmt I'm not familiar with the plugin code, are you able to provide any pointers to code?

Here is the feature which enabled forwarding git credentials to kustomize:

1d3ec93

@alexec
Copy link
Contributor

alexec commented Jun 3, 2019

Do we need to include SSH too? Out of scope?

@jessesuen
Copy link
Member

SSH should be supported too. It should be easy to do once we support SSH kustomize remote bases.

@alexec alexec self-assigned this Jun 6, 2019
@alexec
Copy link
Contributor

alexec commented Jun 7, 2019

SSH out of scope of this issue. See #827 instead.

@alexec
Copy link
Contributor

alexec commented Jun 7, 2019

Here is where the change needs to be made:

env := append(os.Environ(), fmt.Sprintf("%s=%s", PluginEnvAppName, q.AppLabelValue), fmt.Sprintf("%s=%s", PluginEnvAppNamespace, q.Namespace))

@alexec
Copy link
Contributor

alexec commented Jun 8, 2019

Closed. Will be in v1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants