Jenkins CaSC - Kubernetes

Hi,
I am using Jenkins deployed in Kubernetes.
I also used CasC which I define in values.yaml section of the helm chart, by adding it to the configScripts section.
It works but its not optimal. I would like to have CaSc defined outside of values.yaml and inject it, I tried:

  1. Placing casc.yaml config files in the folder of "/var/jenkins_home/casc_config/jenkins.yaml but I wasnt able to get it to work
  2. Similarly adding git repo with yamls in ConfigUrls didnt work.
    I guess issue could be due to lack of permissions or wrong setup, would anyone who got it to work be able to share with me how they configured it?
JCasC:
    # -- Enables default Jenkins configuration via configuration as code plugin
    defaultConfig: true

    # If true, the init container deletes all the plugin config files and Jenkins Config as Code overwrites any existing configuration
    # -- Whether Jenkins Config as Code should overwrite any existing configuration
    overwriteConfiguration: false
    # -- Remote URLs for configuration files.
    configUrls: []
    # - https://acme.org/jenkins.yaml
    # -- List of Jenkins Config as Code scripts
    configScripts: 
      welcome-message: |
        jenkins:
          systemMessage: Welcome to our CI\CD server. This Jenkins is configured and managed 'as code'.

I was never able to get it working by any other method other than in the values yaml section of the helm chart.

Yeah, thats what it seems to me as well :confused:
Was hoping someone might have figured it out, documentation is trash