Skip to content

JcasC yaml merging error on securityRealm & authorizationStrategy with Configs from url #1474

@major-sam

Description

@major-sam

Describe the bug

CM config-authorizationstrategy & config-securityrealm merging in jcasc with multiple entries
errors:
Single entry map expected to configure a hudson.security.AuthorizationStrategy
Single entry map expected to configure a hudson.security.SecurityRealm

Version of Helm and Kubernetes

- Helm: Version:"v3.17.3"
- Kubernetes:  v1.30.0

Chart version

5.8.83; 2.524-jdk21

What happened?

1. add jcasc from url with

controller:
  JCasC:
    overwriteConfiguration: true
    configUrls:
     - http://jcasc.url.com/jcasc.yaml



jcasc.yaml contains 


jenkins:
 AuthorizationStrategy:
    ANY OTHER STRATEGY BUT HELM VALUES
  SecurityRealm:
  

2. jenkins pod fails with errors

  `Single entry map expected to configure a hudson.security.AuthorizationStrategy`
  `Single entry map expected to configure a hudson.security.SecurityRealm`

What you expected to happen?

apply AuthorizationStrategy from configUrls over ConfigMaps

How to reproduce it

Anything else we need to know?

Workaround

controller:
  containerEnv:
    - name: CASC_MERGE_STRATEGY
    value: "override"
  JCasC:
    configScripts:
      fix-cms: |
        unclassified:
          authorizationStrategy:
          securityRealm:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions