Giter Club home page Giter Club logo

Comments (9)

zenyui avatar zenyui commented on June 14, 2024 3

I think I found the issue. I'm doing some tests and will post an update.

Temporary workaround: set the command and args for your container, even if they are specified in the Dockerfile.

containers:
- name: some-container
  image: 'private-org/some-image:latest'
  command: [ './server' ]
  args: [ 'run' ]

@awasilyev @AntonioCayulao @JTarball FYI

from kube-secrets-init.

sagikazarmark avatar sagikazarmark commented on June 14, 2024 1

Hey folks!

Since the original registry code is based on Bank Vaults from Banzai Cloud, I think I can offer a little bit of context here.

Let's start with the reason why kube-secrets-init needs registry access in the first place (and why @zenyui 's workaround works): in order to successfully prepend the secrets-init command to the container command (entrypoint), the webhook needs to know what it is. If you specify a command (and args) then the webhook can just mutate those fields, job done. But if not (in which case Kubernetes also falls back to the entrypoint and command in the container image) the webhook needs to look at the image to determine those parameters.

Now, the current code in this repo uses Heroku's "old" docker client that only supports username-password based credentials. Both Bank Vaults and kube-secrets-init used image pull secrets in the pod to try and authenticate against private registries.

Obviously, we also received complaints about this at Banzai Cloud, so we replaced the implementation with another one using Google's go-containerregistry library.

In addition to image pull secrets it also takes into account workload/cloud provider identity based registries as well (it supports ECR, GCR and ACR).

Given the registry implementation in kube-secrets-init is basically a 1:1 copy from Bank Vaults, I think it'd be relatively easy to do the same thing again and just copy the updated version using the new library.

(There are some changes, so if you decide to make the change keep out for those. Maybe first just diff the old registry implementation with the one in this library to see the differences first)

Hope this helps! If I get the time I might make the change myself, but I can't say when.

from kube-secrets-init.

AntonioCayulao avatar AntonioCayulao commented on June 14, 2024

Hi @awasilyev
How do you did to make a work around about this problem?
Do you also use workload-identity, right?
Any help that you can do I will really appreciate!
Greetings!

from kube-secrets-init.

JTarball avatar JTarball commented on June 14, 2024

Any updates on this issue? - I am experiencing the same problem

from kube-secrets-init.

brtkwr avatar brtkwr commented on June 14, 2024

I think I found the issue. I'm doing some tests and will post an update.

Temporary workaround: set the command and args for your container, even if they are specified in the Dockerfile.

containers:
- name: some-container
  image: 'private-org/some-image:latest'
  command: [ './server' ]
  args: [ 'run' ]

@awasilyev @AntonioCayulao @JTarball FYI

This did the trick for us but still a bit crap having to do it.

from kube-secrets-init.

zenyui avatar zenyui commented on June 14, 2024

@brtknr yeah, dont love it either, just sharing our hack.

my team forked the repo and will spend some cycles trying to see if we can add logs and sort out why the service account permissions aren't being used. will post an update when we sort it.

from kube-secrets-init.

zenyui avatar zenyui commented on June 14, 2024

@sagikazarmark my team would be interested in contributing. I'll take a look soon and reach out with questions!

from kube-secrets-init.

sagikazarmark avatar sagikazarmark commented on June 14, 2024

@zenyui Sure, happy to help!

from kube-secrets-init.

brtkwr avatar brtkwr commented on June 14, 2024

Is there due to be a new release at any point with this fix?

from kube-secrets-init.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.