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

secrets-webhook ignores registry proxies #247

Open
arjen-s opened this issue Nov 15, 2023 · 1 comment
Open

secrets-webhook ignores registry proxies #247

arjen-s opened this issue Nov 15, 2023 · 1 comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/keep Denotes an issue or PR that should be preserved from going stale.

Comments

@arjen-s
Copy link

arjen-s commented Nov 15, 2023

Hi,

We have a kubernetes cluster that uses containerd as its container runtime.
Containerd has been configured to use registry proxies for certain registries, including our own private registry (in gitlab in our case).
This way requests for images on 'registry.gitlab.com' are actually sent to gitlab_proxy:5000 (our proxy for gitlab) without us having to change the image's repository or tags i n kubernetes.

Now the problem starts when the secrets-webhook tries to retrieve the 'image descriptor' of an image of a pod it needs to inject the init container into as it ignores the proxy altogether and calls the private registry directly.
https://github.com/bank-vaults/vault-secrets-webhook/blob/main/pkg/webhook/registry.go#L195

This results in 2 issues:

  • the private registry may not be accessible directly
  • the private registry may require a pull secret to be used that the proxy does not.

Looking at the source code and docs I don't think the 'remote' registry has the ability to get it's proxy config from somewhere, but does anyone have any suggestions how i can configure it to use proxies for specific registries?
https://pkg.go.dev/github.com/google/go-containerregistry/pkg/v1/remote

Thanks

Copy link

Thank you for your contribution! This issue has been automatically marked as stale because it has no recent activity in the last 60 days. It will be closed in 20 days, if no further activity occurs. If this issue is still relevant, please leave a comment to let us know, and the stale label will be automatically removed.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR that has become stale and will be auto-closed. label Jan 21, 2024
@ramizpolic ramizpolic added question lifecycle/keep Denotes an issue or PR that should be preserved from going stale. kind/feature Categorizes issue or PR as related to a new feature. and removed lifecycle/stale Denotes an issue or PR that has become stale and will be auto-closed. labels Jan 23, 2024
@github-actions github-actions bot removed the question label Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/keep Denotes an issue or PR that should be preserved from going stale.
Projects
None yet
Development

No branches or pull requests

2 participants