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

Copy Helm chart values doc to docs reference #1288

Merged
merged 2 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ v1:
--user "$(shell id -u):$(shell id -g)" \
$(BUILDER_IMAGE) \
make -C /src -f Makefile.protoc
./export-docs.sh ../docs/content/en/docs/reference/grpc-api.md
./export-doc.sh ../docs/content/en/docs/reference/grpc-api.md

.PHONY: vendor
vendor:
Expand Down
7 changes: 6 additions & 1 deletion api/export-docs.sh → api/export-doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ description: >
documents the gRPC API of Tetragon.
---

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

The Tetragon API is an independant Go module that can be found in the Tetragon
repository under [api](https://github.com/cilium/tetragon/tree/main/api). The
version 1 of this API is defined in
[api/v1/tetragon](https://github.com/cilium/tetragon/tree/main/api/v1/tetragon).' | cat - $TMP_FILE > $1
[github.com/cilium/tetragon/api/v1/tetragon](https://github.com/cilium/tetragon/tree/main/api/v1/tetragon).' | cat - $TMP_FILE > $1

7 changes: 6 additions & 1 deletion docs/content/en/docs/reference/grpc-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ description: >
documents the gRPC API of Tetragon.
---

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

The Tetragon API is an independant Go module that can be found in the Tetragon
repository under [api](https://github.com/cilium/tetragon/tree/main/api). The
version 1 of this API is defined in
[api/v1/tetragon](https://github.com/cilium/tetragon/tree/main/api/v1/tetragon).
[github.com/cilium/tetragon/api/v1/tetragon](https://github.com/cilium/tetragon/tree/main/api/v1/tetragon).

## tetragon/capabilities.proto

Expand Down
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"
Copy link
Member

Choose a reason for hiding this comment

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

Please make this: Kubernetes Helm chart , so it is clear for everyone.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the review, however, I don't agree, what is a non-Kubernetes helm chart? I try to keep it short for the summary navbar on the left and don't want to introduce unnecessary stuff.

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
Loading