Skip to content

Commit

Permalink
docs: copy Helm chart doc to documentation reference
Browse files Browse the repository at this point in the history
Signed-off-by: Mahe Tardy <[email protected]>
  • Loading branch information
mtardy committed Aug 2, 2023
1 parent 86fa200 commit f22b57b
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 2 deletions.
104 changes: 104 additions & 0 deletions docs/content/en/docs/reference/helm-chart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
title: "Helm chart"
description: "This reference is generated from the Tetragon Helm chart values."
---

{{< comment >}}
This page was generated with github.io/cilium/tetragon/install/kubernetes/export-doc.sh,
please do not edit directly.
{{< /comment >}}

The Tetragon Helm chart source is available under
[github.io/cilium/tetragon/install/kubernetes](https://github.com/cilium/tetragon/tree/main/install/kubernetes)
and is distributed from the Cilium helm charts repository [helm.cilium.io](https://helm.cilium.io).

To deploy Tetragon using this Helm chart you can run the following commands:
```shell-session
helm repo add cilium https://helm.cilium.io
helm repo update
helm install tetragon cilium/tetragon -n kube-system
```

To use [the values available](#values), with `helm install` or `helm upgrade`, use `--set key=value`.

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| daemonSetAnnotations | object | `{}` | |
| daemonSetLabelsOverride | object | `{}` | |
| dnsPolicy | string | `"Default"` | |
| enabled | bool | `true` | |
| export.filenames[0] | string | `"tetragon.log"` | |
| export.mode | string | `"stdout"` | |
| export.resources | object | `{}` | |
| export.securityContext | object | `{}` | |
| export.stdout.argsOverride | list | `[]` | |
| export.stdout.commandOverride | list | `[]` | |
| export.stdout.enabledArgs | bool | `true` | |
| export.stdout.enabledCommand | bool | `true` | |
| export.stdout.extraEnv | list | `[]` | |
| export.stdout.extraVolumeMounts | list | `[]` | |
| export.stdout.image.override | string | `nil` | |
| export.stdout.image.repository | string | `"quay.io/cilium/hubble-export-stdout"` | |
| export.stdout.image.tag | string | `"v1.0.3"` | |
| exportDirectory | string | `"/var/run/cilium/tetragon"` | |
| exportFileCreationInterval | string | `"120s"` | |
| extraConfigmapMounts | list | `[]` | |
| extraHostPathMounts | list | `[]` | |
| extraVolumes | list | `[]` | |
| hostNetwork | bool | `true` | |
| imagePullPolicy | string | `"IfNotPresent"` | |
| imagePullSecrets | list | `[]` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podLabelsOverride | object | `{}` | |
| podSecurityContext | object | `{}` | |
| selectorLabelsOverride | object | `{}` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | |
| serviceLabelsOverride | object | `{}` | |
| tetragon.argsOverride | list | `[]` | |
| tetragon.btf | string | `""` | |
| tetragon.commandOverride | list | `[]` | |
| tetragon.enableCiliumAPI | bool | `false` | |
| tetragon.enableK8sAPI | bool | `true` | |
| tetragon.enableMsgHandlingLatency | bool | `false` | |
| tetragon.enablePolicyFilter | bool | `false` | |
| tetragon.enablePolicyFilterDebug | bool | `false` | |
| tetragon.enableProcessCred | bool | `false` | |
| tetragon.enableProcessNs | bool | `false` | |
| tetragon.enabled | bool | `true` | |
| tetragon.exportAllowList | string | `"{\"event_set\":[\"PROCESS_EXEC\", \"PROCESS_EXIT\", \"PROCESS_KPROBE\", \"PROCESS_UPROBE\"]}"` | |
| tetragon.exportDenyList | string | `"{\"health_check\":true}\n{\"namespace\":[\"\", \"cilium\", \"kube-system\"]}"` | |
| tetragon.exportFileCompress | bool | `false` | |
| tetragon.exportFileMaxBackups | int | `5` | |
| tetragon.exportFileMaxSizeMB | int | `10` | |
| tetragon.exportFilename | string | `"tetragon.log"` | |
| tetragon.exportRateLimit | int | `-1` | |
| tetragon.extraArgs | object | `{}` | |
| tetragon.extraEnv | list | `[]` | |
| tetragon.extraVolumeMounts | list | `[]` | |
| tetragon.fieldFilters | string | `"{}"` | |
| tetragon.gops.address | string | `"localhost"` | The address at which to expose gops. |
| tetragon.gops.port | int | `8118` | The port at which to expose gops. |
| tetragon.grpc.address | string | `"localhost:54321"` | The address at which to expose gRPC. Examples: localhost:54321, unix:///var/run/tetragon/tetragon.sock |
| tetragon.grpc.enabled | bool | `true` | Whether to enable exposing Tetragon gRPC. |
| tetragon.image.override | string | `nil` | |
| tetragon.image.repository | string | `"quay.io/cilium/tetragon"` | |
| tetragon.image.tag | string | `"v0.10.0"` | |
| tetragon.processCacheSize | int | `65536` | |
| tetragon.prometheus.address | string | `""` | The address at which to expose metrics. Set it to "" to expose on all available interfaces. |
| tetragon.prometheus.enabled | bool | `true` | Whether to enable exposing Tetragon metrics. |
| tetragon.prometheus.port | int | `2112` | The port at which to expose metrics. |
| tetragon.prometheus.serviceMonitor.enabled | bool | `false` | Whether to create a 'ServiceMonitor' resource targeting the 'tetragon' pods. |
| tetragon.prometheus.serviceMonitor.labelsOverride | object | `{}` | The set of labels to place on the 'ServiceMonitor' resource. |
| tetragon.resources | object | `{}` | |
| tetragon.securityContext.privileged | bool | `true` | |
| tetragonOperator.enabled | bool | `true` | Enable the tetragon-operator component (required). |
| tetragonOperator.image | object | `{"override":null,"repository":"quay.io/cilium/tetragon-operator","suffix":"","tag":"v0.10.0"}` | tetragon-operator image. |
| tolerations[0].operator | string | `"Exists"` | |
| updateStrategy | object | `{}` | |

1 change: 1 addition & 0 deletions docs/layouts/shortcodes/comment.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ if .Inner}}{{ end }}
2 changes: 1 addition & 1 deletion install/kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ Helm chart for Tetragon
| updateStrategy | object | `{}` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.2.1](https://github.com/norwoodj/helm-docs/releases/v1.2.1)
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
54 changes: 54 additions & 0 deletions install/kubernetes/export-doc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash

set -e -o pipefail

if [ -z "$1" ]; then
echo "Usage: $0 export/to/path.md"
exit 1
fi

TMP_FILE=$(mktemp)
trap "rm $TMP_FILE" EXIT

# use the generated proto documentation as source
cp README.md $TMP_FILE

# cleanup the generated documentation for the website
# remove the title
sed -i '/^# tetragon$/d' $TMP_FILE
# remove the badges
sed -i '/^\!\[Version:/d' $TMP_FILE
# remove the "Helm chart for Tetragon mention"
sed -i '/^Helm chart for Tetragon$/d' $TMP_FILE
# remove unnecessary line
sed -i '/^----------------------------------------------$/d' $TMP_FILE
# remove autogenerated copyright
sed -i '/^Autogenerated from chart metadata using \[helm-docs /d' $TMP_FILE
# cleanup unecessary consecutive whitelines
sed -i '/^[[:space:]]*$/N;/^[[:space:]]*\n[[:space:]]*$/D' $TMP_FILE


# add a frontmatter and a small introduction
echo '---
title: "Helm chart"
description: "This reference is generated from the Tetragon Helm chart values."
---
{{< comment >}}
This page was generated with github.io/cilium/tetragon/install/kubernetes/export-doc.sh,
please do not edit directly.
{{< /comment >}}
The Tetragon Helm chart source is available under
[github.io/cilium/tetragon/install/kubernetes](https://github.com/cilium/tetragon/tree/main/install/kubernetes)
and is distributed from the Cilium helm charts repository [helm.cilium.io](https://helm.cilium.io).
To deploy Tetragon using this Helm chart you can run the following commands:
```shell-session
helm repo add cilium https://helm.cilium.io
helm repo update
helm install tetragon cilium/tetragon -n kube-system
```
To use [the values available](#values), with `helm install` or `helm upgrade`, use `--set key=value`.' | cat - $TMP_FILE > $1

3 changes: 2 additions & 1 deletion install/kubernetes/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ helm lint . --with-subcharts
helm template tetragon . | kubeval --strict --additional-schema-locations https://raw.githubusercontent.com/joshuaspence/kubernetes-json-schema/master

# Update README.md.
docker run --rm -v "$(pwd):/helm-docs" -u "$(id -u)" jnorwood/helm-docs:v1.2.1
docker run --rm -v "$(pwd):/helm-docs" -u "$(id -u)" jnorwood/helm-docs:v1.11.0@sha256:66c8f4164dec860fa5c1528239c4aa826a12485305b7b224594b1a73f7e6879a
./export-doc.sh ../../docs/content/en/docs/reference/helm-chart.md

0 comments on commit f22b57b

Please sign in to comment.