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

Allow references to other volumes (eg. PVCs) for instrumention auto-inject #3267

Closed
jnarezo opened this issue Sep 6, 2024 · 4 comments · Fixed by #3285
Closed

Allow references to other volumes (eg. PVCs) for instrumention auto-inject #3267

jnarezo opened this issue Sep 6, 2024 · 4 comments · Fixed by #3285
Labels
enhancement New feature or request needs triage

Comments

@jnarezo
Copy link
Contributor

jnarezo commented Sep 6, 2024

Component(s)

auto-instrumentation

Is your feature request related to a problem? Please describe.

In an environment where you can't provision an emptyDir above ~150Mi (the size of the nodejs instrumentation), it's impossible to use auto-instrumentation, since the emptyDir would be too small to transfer the instrumentation from the injected init container to the main container.

Describe the solution you'd like

Changing the Instrumentation resource spec to replace Instrumentation.spec.<lang>.volumeSizeLimit with something more generic like Instrumentation.spec.<lang>.volume that references a Volume.

This solution should allow a reference to a pre-existing or ephemeral volume help alleviate this issue.

Describe alternatives you've considered

I've also considered:

  • Allow some switch between emptyDir and a reference to a PVC
    • Not as flexible as just allowing the user to specify a k8s core spec
  • Forcing user to change their environment
    • Operator is responsible for creating the volume to transfer instrumentation, it makes more sense for it to be customizable/solved at this level

Additional context

No response

@jnarezo jnarezo added enhancement New feature or request needs triage labels Sep 6, 2024
@jnarezo
Copy link
Contributor Author

jnarezo commented Sep 6, 2024

I actually would like tackling this myself + opening a PR, but would like to hear your opinions/suggestions for the overall feature. 🙂

@iblancasa
Copy link
Contributor

Changing the Instrumentation resource spec to replace Instrumentation.spec..volumeSizeLimit with something more generic like Instrumentation.spec..volume that references a Volume.

I think those should be two independent configurations. Not a replacement.

Forcing user to change their environment
Operator is responsible for creating the volume to transfer instrumentation, it makes more sense for it to be customizable/solved at this level

It is more or less what the operator is currently doing, right? It creates the Volumen to inject the instrumentation.

I don't get the Forcing user to change their environment, can you give context?

@jnarezo
Copy link
Contributor Author

jnarezo commented Sep 10, 2024

I don't get the Forcing user to change their environment, can you give context?

Sorry, I meant to say that I considered these alternative workarounds, however I don't think they're good solutions.

With my second bullet point, a workaround could be "forcing the user to change their environment," which means forcing the user to work with their cluster admins to change policies and increase the emptyDir size limit policy.

However, that's not really a solution so that's why I opened this issue.


I think those should be two independent configurations. Not a replacement.

Yeah! I'm not against it, but I'm not sure about this edge case: When user provides a volume spec with a specific size + volumeSizeLimit at the same time.

If both are defined, will this just throw an error? Or should the values somehow be merged?

@iblancasa
Copy link
Contributor

Yeah! I'm not against it, but I'm not sure about this edge case: When user provides a volume spec with a specific size + volumeSizeLimit at the same time.

If both are defined, will this just throw an error? Or should the values somehow be merged?

Yes, we can just do something in the validation webhook.

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