radius-project / radius

Radius is a cloud-native, portable application platform that makes app development easier for teams building cloud-native apps.
https://radapp.io
Apache License 2.0
1.51k stars 97 forks source link

Support additional environment variables in Helm chart. #6877

Open rynowak opened 1 year ago

rynowak commented 1 year ago

Overview of feature request

The Radius helm chart should support setting additional/arbitrary environment variables.

When users are being a proxy, they often need to configure environment variables like these.

If we add support for arbitrary env-vars to the Helm chart then users can configure whatever they need for their scenario.

Acceptance criteria

Users can specify env-vars for rad install kubernetes or our helm chart.

These env-vars apply to all of the Radius control-plane pods.

Additional context

Originally reported via discord here: https://discord.com/channels/1113519723347456110/1179077937614561351/1179077937614561351

AB#10585

radius-triage-bot[bot] commented 1 year ago

:wave: @rynowak Thanks for filing this feature request.

A project maintainer will review this feature request and get back to you soon.

We also welcome community contributions! If you would like to pick this item up sooner and submit a pull request, please visit our contribution guidelines and assign this to yourself by commenting "/assign" on this issue.

For more information on our triage process please visit our triage overview

tdeheurles commented 1 year ago

Hey @rynowak, this is awesome, thank you for the reactivity ! (It's Asura)

radius-triage-bot[bot] commented 1 year ago

This issue is a great one to pickup for new contributors. It should only require small changes and not assume a deep knowledge of the Radius architecture.

We always welcome community contributions! If you would like to pick this item up sooner and submit a pull request, please visit our contribution guidelines and assign this to yourself by commenting "/assign" on this issue.

For more information on our triage process please visit our triage overview

rynowak commented 1 year ago

Thanks @tdeheurles - let us know if you're interested in working on this. Otherwise, we'll get to it sometime soon.

radius-triage-bot[bot] commented 12 months ago

:+1: We've reviewed this issue and have agreed to add it to our backlog. Please subscribe to this issue for notifications, we'll provide updates when we pick it up.

We also welcome community contributions! If you would like to pick this item up sooner and submit a pull request, please visit our contribution guidelines and assign this to yourself by commenting "/assign" on this issue.

For more information on our triage process please visit our triage overview

gpltaylor commented 11 months ago

For extra context

From Discord:

My question lack of details probably. Here are some additionals: The 7 standard recipes seems present. The issue is when I try to add the database in the getting started tutorial. error message is "err failed to fetch repository from ... lookupghcr.io in 10.96.0.10:53: no such host It's a typical error of proxy my local machine is behind proxy all the time and I usually fix by configuring theough https_proxy variables I'm going to go for the 2 links and try to apply

The user is behind a proxy so the call to pull the repository fails.

If I understand correctly, some details are unknown to me ATM... Allowing Rad to implement ENV may allow Rad services to pull repositories whilst honnoring the Proxy Settings. This was done by

Use kubectl edit to update Radius' deployment objects in Kubernetes. This is a pretty low-level way of hacking things, hence the issue to make things better.

https://github.com/radius-project/radius/blob/1145be169a90b8698d032556e21fb98f32335380/pkg/rp/util/registry.go#L52

If this is correct, I am assuming that when you install Rad into K8s, Rad also need to provide Proxy Settings to K8s?

rynowak commented 11 months ago

If this is correct, I am assuming that when you install Rad into K8s, Rad also need to provide Proxy Settings to K8s?

When you're behind a forwarding proxy every outgoing client needs to know the proxy settings.

The distro of Kubernetes you're using will provide it's own way of injecting settings. Example here for Minikube. These settings will be used Kubernetes internal functionality needs to talk to the internet - the most obvious example is pulling a container image. This isn't something Radius can do for you, it's specific to your Kubernetes distro.

Radius's functionality running inside Kubernetes needs to know the proxy setting too. These will be used for communication with cloud APIs as well as pulling recipes. This is the improvement tracked by this issue.

I hope that helps, let me know if you were asking something different.

gpltaylor commented 7 hours ago

I have been testing this today on a number of systems.

If I have my local ENV set within the Docker Machine and Cluster Nodes, everything works perfectly. ORAS supports the ENVs listed above and I am able to run the demo without issue.

I am unable to reproduce the error.