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

Migrate to readme-generator for helm maintained by bitnami #431

Merged
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
66090e9
Updated default values.yaml with available options
Jul 17, 2023
209dcb1
Merge branch 'spiffe:main' into main
krishnakv Jul 24, 2023
2a4dd2f
Merge branch 'spiffe:main' into main
krishnakv Aug 8, 2023
cd1a011
created values and README with readme-generator
Aug 8, 2023
d271e14
merge from main branch changes
Aug 18, 2023
ef17b1a
Add latest value changes in main branch here
Aug 18, 2023
aa64f68
Create readme-gen script for readme-generator install
Aug 21, 2023
17ce988
Add code to generate values tables for subcharts README files
Aug 21, 2023
61338fe
Change values files for readme-gen syntax
Aug 25, 2023
fe5c44b
Modify values.yaml and README.md files to readme-generator format
Aug 25, 2023
9dc5c1c
Renamed readme-gen.sh back to helm-docs.sh
Aug 25, 2023
cf54cb4
Ensure npm is installed in helm-docs.sh script
Aug 25, 2023
474e97a
Merge with latest changes and fix values.yaml for readme-generator
Aug 28, 2023
3509a1c
Fix @params lines and blocks in values files
Aug 30, 2023
0e1a9fb
Modify github workflows to use the readme-generator tool.
Aug 31, 2023
e436d80
Merge branch 'main' into feature/readme-generator-current-values
krishnakv Sep 2, 2023
8563e24
Fix shellcheck and helm test errors
Sep 5, 2023
aa49133
Merge branch 'main' into feature/readme-generator-current-values
krishnakv Sep 5, 2023
4037e52
Fixed typos in values and removed Parameters in README
Sep 7, 2023
91f8f4c
Fix changes in sprire chart README file
Sep 7, 2023
c581625
Fix docs after update of some doc strings
marcofranssen Sep 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Create readme-gen script for readme-generator install
Signed-off-by: Krishnakumar Venkataraman <krishna_kumar08@infosys.com>
Krishnakumar Venkataraman committed Aug 21, 2023
commit aa64f6863035058359f5961f39720d01af219d25
71 changes: 71 additions & 0 deletions charts/spire/README.md
Original file line number Diff line number Diff line change
@@ -105,3 +105,74 @@ Now you can interact with the Spire agent socket from your own application. The
| file://./charts/tornjak-frontend | tornjak-frontend | 0.1.0 |

## Parameters

### Global parameters

| Name | Description | Value |
| ------------------------------------ | ----------------------------------------------------------------------- | ---------------------------- |
| `global.k8s.clusterDomain` | Cluster domain name configured for Spire install | `cluster.local` |
| `global.spire.bundleConfigMap` | A configmap containing the Spire bundle | `""` |
| `global.spire.clusterName` | The name of the k8s cluster for Spire install | `example-cluster` |
| `global.spire.image.registry` | Image registry override | `""` |
| `global.spire.jwtIssuer` | The issuer for Spire JWT tokens | `oidc-discovery.example.org` |
| `global.spire.trustDomain` | The trust domain for Spire install | `example.org` |
| `global.spire.upstreamServerAddress` | Set what address to use for the upstream server when using nested spire | `""` |

### Spire server parameters

| Name | Description | Value |
| ---------------------------------------- | --------------------------------------------- | -------- |
| `spire-server.enabled` | Flag to enable Spire server | `true` |
| `spire-server.nameOverride` | Overrides the name of Spire server pods | `server` |
| `spire-server.controllerManager.enabled` | Enable controller manager and provision CRD's | `true` |

### Spire agent parameters

| Name | Description | Value |
| -------------------------- | -------------------------------------- | ------- |
| `spire-agent.enabled` | Flag to enable Spire agent | `true` |
| `spire-agent.nameOverride` | Overrides the name of Spire agent pods | `agent` |

### Upstream Spire agent and CSI driver configuration

| Name | Description | Value |
| ------------------ | ---------------------------------------------------------- | ------- |
| `upstream.enabled` | Enable upstream agent and driver for use with nested spire | `false` |

### Upstream Spire agent parameters

| Name | Description | Value |
| ------------------------------------------------ | -------------------------------------------------- | ---------------------------------------------------- |
| `upstream-spire-agent.upstream` | Flag for enabling upstream Spire agent | `true` |
| `upstream-spire-agent.nameOverride` | Name override for upstream Spire agent | `agent-upstream` |
| `upstream-spire-agent.bundleConfigMap` | The configmap name for upstream Spire agent bundle | `spire-bundle-upstream` |
| `upstream-spire-agent.socketPath` | Socket path where Spire agent socket is mounted | `/run/spire/agent-sockets-upstream/spire-agent.sock` |
| `upstream-spire-agent.serviceAccount.name` | Service account name for upstream Spire agent | `spire-agent-upstream` |
| `upstream-spire-agent.healthChecks.port` | Health check port number for upstream Spire agent | `9981` |
| `upstream-spire-agent.telemetry.prometheus.port` | The port where prometheus metrics are available | `9989` |

### Spire CSI Driver parameters

| Name | Description | Value |
| --------------------------- | ------------------------------------------------ | ------ |
| `spiffe-csi-driver.enabled` | Flag to enable spiffe-csi-driver for the cluster | `true` |

### Upstream Spire CSI Driver parameters

| Name | Description | Value |
| ---------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------------------- |
| `upstream-spiffe-csi-driver.pluginName` | The plugin name for configuring upstream Spiffe CSI driver | `upstream.csi.spiffe.io` |
| `upstream-spiffe-csi-driver.agentSocketPath` | The socket path where Spiffe CSI driver mounts agent socket | `/run/spire/agent-sockets-upstream/spire-agent.sock` |
| `upstream-spiffe-csi-driver.healthChecks.port` | The port where Spiffe CSI driver health checks are exposed | `9810` |

### SPIFFE oidc discovery provider parameters

| Name | Description | Value |
| ---------------------------------------- | ------------------------------------------------------------- | ------- |
| `spiffe-oidc-discovery-provider.enabled` | Flag to enable spiffe-oidc-discovery-provider for the cluster | `false` |

### Tornjak frontend parameters

| Name | Description | Value |
| -------------------------- | ------------------------------- | ------- |
| `tornjak-frontend.enabled` | Flag to enable Tronjak frontend | `false` |
19 changes: 19 additions & 0 deletions readme-gen.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we replace the original file helm-docs.sh instead of adding a new file? This way we don't have to update contributing.md as well the pipeline remains to work and safegaurds us for outdated docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The readme file is available at the bitnami readme-generator-for-helm repo. There are a limited number of tags "@param", "@Skip", "@section", "@extra" etc.

There is also only support for generating the values table under the "## Parameters" section in README.md. Other templating options such as introducing maintainers, chart version and other details into the README is not supported.

There is the option to divide the docs into different sections using "@section" tags. I have also retained the filename for helm-docs.sh.

All the values files including sub-charts are updated, so this PR can be taken for a test drive on your local setup. :-)

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -euo pipefail

SCRIPTPATH=$(dirname "$0")
README_GENERATOR_VERSION="2.5.1"
README_GENERATOR_EXE="readme-generator"

# platform agnostic npm install, also adds into the path
npm install -g "@bitnami/readme-generator-for-helm@${README_GENERATOR_VERSION}"
marcofranssen marked this conversation as resolved.
Show resolved Hide resolved

if [[ -z '$(type -d "${README_GENERATOR_EXE}")' ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This checks against the directory, but not the executable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, fixed that.

echo "readme-generator not installed successfully!!"
fi

# generate docs and show the diff
readme-generator --values="${SCRIPTPATH}/charts/spire/values.yaml" --readme="${SCRIPTPATH}/charts/spire/README.md"
marcofranssen marked this conversation as resolved.
Show resolved Hide resolved
git diff --exit-code