Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Support for commented out values #10

Open
tomas-sipko opened this issue Aug 4, 2020 · 1 comment
Open

Support for commented out values #10

tomas-sipko opened this issue Aug 4, 2020 · 1 comment

Comments

@tomas-sipko
Copy link

Dear maintainers,

We are happy using your tool for quick and beautiful documentation generation. However, in our case, we use multiple layers of Helm configuration. Thus, we keep some of the values.yaml entries commented out in the base layer, so other layers would have to define that configuration themselves, and developers could have a look at the configuration example and understand what configuration is possible. For example, there is a short excerpt from our base values.yaml file

# Resources are INTENTIONALLY commented out, as they need to be provided by the microservice chart
#  resources:
#    limits:
#      cpu: 1 # Number of max CPU that can be used in a Pod
#      memory: 1Gi # Max amount of memory that can be used in a Pod
#    requests:
#      cpu: 1 # Requested amount of CPU for a pod
#      memory: 1Gi # Requested amount of memory for a pod

# Readiness & liveness probes are mandatory
  livenessProbe:
    initialDelaySeconds: 30 # Delay after which to start liveliness probe
    timeoutSeconds: 5 # Timeout length between liveliness probes

So I would like to ask if there is a possibility, that you could include a feature for generating documentation for entries that are commented out?

@jacobtomlinson
Copy link
Member

jacobtomlinson commented Aug 4, 2020

I have also found myself wanting this kind of functionality. One option is to use empty values such as {}, [] and null and handle those via if statements in the template. That way all possible config options are available in the config.

resources: {}  # Comment describing resources
#    limits:
#      cpu: 1 # Number of max CPU that can be used in a Pod
#      memory: 1Gi # Max amount of memory that can be used in a Pod
#    requests:
#      cpu: 1 # Requested amount of CPU for a pod
#      memory: 1Gi # Requested amount of memory for a pod

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants