Jenkins Jcasc - cannot set proxy automatically

Hello,
I wanted to use JcasC to deploy Jenkins. It’s working but i need to set proxy to the agent that will build with Kaniko on Kubernetes.

It’s working if i check the box “Transfer proxy related environment variables from controller to agent”:

But the good thing of JCasC is to not do manual steps to have a fully working Jenkins here.
I could define the agent with the full yaml but i prefer let Jenkins generate it than harcoding configs. And just have this flag set.

In code it seems to be:
kubernetes: |
jenkins:
clouds:
- kubernetes:
addMasterProxyEnvVars: true

Do you have a way to make it work without manual step and without configuring all?

Thanks

To be able to configure a plugin via JCasC, the plugin needs to be “JCasc compatible”.
Checkout out this list of open compatibility issues with plugins: JCasC - Open Compatibility Issues - Jenkins Jira

Feel free to log an issue, in regards to your configuration needs. The plugin maintainer might not be aware of your need.

If you feel up for it, you can even contribute yourself. Follow this guideline as to how to enable compatibility with JCasC: GitHub - jenkinsci/configuration-as-code-plugin: Jenkins Configuration as Code Plugin

Thanks for your reply and links.
I finally found a workaround by setting globalenv from containerenv in Jacasc and seems to work

thanks