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

Value of ephemeral container property targetContainerName not present on host #2073

Open
dee0sap opened this issue Aug 15, 2024 · 5 comments
Labels

Comments

@dee0sap
Copy link

dee0sap commented Aug 15, 2024

What happened?

We have enabled ephemeral container syncing

sync:
  pods:
    enabled: true 
    ephemeralContainers: true

Within our vcluster we have set values for .spec.ephemeralContainers[].targetContainerName however when we examine the pods that syncing created on the host targetContainerName is unset.

See example yaml in attached zip.
pod-target-has-multiple-mounts0-redacted.zip

What did you expect to happen?

I expect the pod on the host to have the same targetContainerName value as the pod in the vcluster.

How can we reproduce it (as minimally and precisely as possible)?

  • Enable syncing as above
  • Use 'kubectl debug' with the '--target' option

Anything else we need to know?

Not sure if it is related, but will mention for completeness' sake.

kubectl debug creates ephemeral containers via PATCH. I have code that is doing this programmatically and I found that rapidly PATCHing in effort to add a pair of ephemeral containers causes the pods on the host and the vcluster to get out of sync and/or corrupted. Generally 'out of sync' would look like

  • ephemeral container missing from host
  • resource version data suggesting that syncer things the objects are in sync when they are not
    Corruption would look like
  • Possibly an ephemeral container missing from the pod on the host
  • On host ephemeralContainerStatuses show that the ephemeral containers all using same image when they should have been using different ones

Host cluster Kubernetes version

Client Version: v1.30.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.3

vcluster version

$ vcluster --version
vcluster version 0.19.6

VCluster Config

sync:
  priorityclasses:
    enabled: true
  pods:
    enabled: true 
    ephemeralContainers: true
syncer:
  extraArgs:
  - --tls-san=XXXX
init:    
  manifests: |-
   # A priority class definition 
    ---
   # A secret for docker image pull

Above is the config. Note that I redacted a few things.

Copy link
Contributor

We've made some refactoring in the code around syncing in our v0.21.0 release version, but it's still in alpha.

Would you be willing to test out our latest alpha (v0.21.0-alpha6) if this is still an issue in v0.21.0?

@dee0sap
Copy link
Author

dee0sap commented Sep 3, 2024

Hey @deniseschannon

Sure. Btw, I might not be able to test it until next week though.

@dee0sap
Copy link
Author

dee0sap commented Oct 15, 2024

Hey @deniseschannon
Finally got to try this. Tried vcluster version 0.21.0-beta.2 and it is fixed.

@cbron
Copy link
Contributor

cbron commented Nov 7, 2024

Thanks for testing @dee0sap , if this is fixed can it be closed ?

@dee0
Copy link

dee0 commented Nov 7, 2024

Hey @cbron

Yep, this can be closed. Thanks!

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

No branches or pull requests

4 participants