Adding System message

Hello,
I am working with jenkins-operator helm. For adding System message I performed the following:

  1. Create user-config.yaml:
    apiVersion: v1
    kind: ConfigMap
    metadata:
    name: user-config
    data:
    1-system-message.yaml: |
    jenkins:
    systemMessage: ${SYSTEM_MESSAGE}

  2. Create user-config-secrets.yaml:
    kind: Secret

apiVersion: v1

type: Opaque

metadata:

name: user-config-secrets

stringData:

SYSTEM_MESSAGE: “Psss Secret value”

  1. In values.yaml:
    configuration:
    configurationAsCode:
    - configMapName: user-config
    # content: {}
    groovyScripts:
    - configMapName: user-config-secrets

    content: {}

  2. helm update

But I don’t see the System Message.
What I am missing?

Thanks,
Irina Rozalio

Hello,
A secret in the helm chart should be provided as secretRefName (or secretData see docs in kubernetes-operator/values.yaml at 126b02aaab2088a052c638842c7c31e0c67f21d9 · jenkinsci/kubernetes-operator · GitHub), e.g.:

  configuration:
    configurationAsCode:
      - configMapName: user-config
    groovyScripts: {}
    secretRefName: user-config-secrets

Hope this helps!

1 Like