Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: Documenting values not explicitly present in values.yaml file #225

Open
Cavaler opened this issue Apr 23, 2024 · 1 comment
Open
Assignees
Labels
enhancement New feature or request

Comments

@Cavaler
Copy link

Cavaler commented Apr 23, 2024

I am looking for a way to document some Helm chart values which are not actually written down in the values.yaml.

Here is a piece of the current values.yaml:

# -- One and only one should be configured
input: 
  # -- TCP connection
  tcp: {}
  # -- UDP connection
  udp: {}
  # -- Serial connection
  serial: {}

If for example input.tcp is not empty, then it is used as an input - with expected fields like host and port inside.
But I cannot document those fields now, since I have to include them in the map.

I'd like to be able to write something like this:

# -- One and only one should be configured
input: 
  # input.tcp.host -- (string) TCP host
  # input.tcp.port -- (int) TCP port
  tcp: {}

But currently these comments are just ignored.

@Mo0rBy
Copy link

Mo0rBy commented Feb 25, 2025

I think I am doing something similar. Here is my problem.

Here is something in my values.yaml (these are the default values):

springBootSSL:
  enabled: false
  bundles: []

But if springBootSSL.enabled is true, the user needs to define a bundle, so I want to document HOW to define a bundle in the values.yaml. Something like this:

bundles:
  - name: myBundleName
    type: jks
    truststore:
      existingSecret:
        name: someName
        key: someKey
      password:
        existingSecret:
          name: someName
          key: someKey
    keystore:
      existingSecret:
        name: someName
        key: someKey
      password:
        existingSecret:
          name: someName
          key: someKey

I want to be able to do document this structure using the helm-docs tool, but unless I have something like this:

  # -- (list) Define a list of SSL Bundles to configure (see "Spring Boot SSL Bundles" section for details on how to define an SSL Bundle)
  # @section -- Spring Boot SSL
  bundles:
    -
      # -- (string) Define a name for the SSL Bundle
      # @section -- Spring Boot SSL Bundles
      name:
      # -- (string) Define a type for the SSL Bundle (can be 1 of 'jks', 'pem' or 'pkcs12')
      # @section -- Spring Boot SSL Bundles
      type:
      truststore:
        existingSecret:
          # -- (string) Reference the secret name that contains the truststore file
          # @section -- Spring Boot SSL Bundles
          name:
          # -- (string) Reference the secret key that contains the truststore file
          # @section -- Spring Boot SSL Bundles
          key:
        password:
          existingSecret:
            # -- (string) Reference the secret name that contains the truststore password
            # @section -- Spring Boot SSL Bundles
            name:
            # -- (string) Reference the secret key that contains the truststore password
            # @section -- Spring Boot SSL Bundles
            key:
      keystore:
        existingSecret:
          # -- (string) Reference the secret name that contains the keystore file
          # @section -- Spring Boot SSL Bundles
          name:
          # -- (string) Reference the secret key that contains the keystore file
          # @section -- Spring Boot SSL Bundles
          key:
        password:
          existingSecret:
            # -- (string) Reference the secret name that contains the keystore password
            # @section -- Spring Boot SSL Bundles
            name:
            # -- (string) Reference the secret key that contains the keystore password
            # @section -- Spring Boot SSL Bundles
            key:

But doing this defines 1 bundle, with required values not set, by default, and I don't want this.
I would like my chart to error if the user sets springBootSSL.enabled to true and defines 0 bundles, and this gets in the way of that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants