Skip to content

Commit

Permalink
update(event-generator): remove values table from README.md
Browse files Browse the repository at this point in the history
The values table lives in a separate file and is referenced in the
README.md file through a hypelink. Further more the helm documentation
is generated using docker instead of downloading the binary for helm-docs.

Signed-off-by: Aldo Lacuku <[email protected]>
  • Loading branch information
alacuku authored and poiana committed Jul 12, 2022
1 parent 97de7b4 commit 0e80270
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 58 deletions.
2 changes: 1 addition & 1 deletion event-generator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: event-generator
description: A Helm chart for Kubernetes
description: A Helm chart used to deploy the event-generator in Kubernetes cluster.

# A chart can be either an 'application' or a 'library' chart.
#
Expand Down
38 changes: 9 additions & 29 deletions event-generator/Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,11 @@
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif

#generate helm documentation
docs: helm-docs
$(HELM_DOCS) -t README.gotmpl -o ./generated/helm-values.md
cat ./generated/helm-values.md >> README.md
DOCS_IMAGE_VERSION="v1.11.0"

helm-docs:
ifeq (, $(shell which helm-docs))
@{ \
set -e ;\
HELM_DOCS_TMP_DIR=$$(mktemp -d) ;\
cd $$HELM_DOCS_TMP_DIR ;\
version=1.5.0 ;\
arch=x86_64 ;\
echo $$HELM_DOCS_PATH ;\
echo https://github.com/norwoodj/helm-docs/releases/download/v$${version}/helm-docs_$${version}_linux_$${arch}.tar.gz ;\
curl -LO https://github.com/norwoodj/helm-docs/releases/download/v$${version}/helm-docs_$${version}_linux_$${arch}.tar.gz ;\
tar -zxvf helm-docs_$${version}_linux_$${arch}.tar.gz ;\
mv helm-docs $(GOBIN)/helm-docs ;\
rm -rf $$HELM_DOCS_TMP_DIR ;\
}
HELM_DOCS=$(GOBIN)/helm-docs
else
HELM_DOCS=$(shell which helm-docs)
endif
docs:
docker run \
--rm \
--workdir=/helm-docs \
--volume "$$(pwd):/helm-docs" \
-u $$(id -u) \
jnorwood/helm-docs:$(DOCS_IMAGE_VERSION) \
helm-docs -t ./README.gotmpl -o ./generated/helm-values.md
5 changes: 4 additions & 1 deletion event-generator/README.gotmpl
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{{ template "chart.valuesTable" . | }}
{{ template "chart.header" . }}
{{ template "chart.description" . }}
{{ template "chart.valuesSection" . }}

24 changes: 1 addition & 23 deletions event-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,26 +118,4 @@ The command removes all the Kubernetes components associated with the chart and

## Configuration

The following table lists the configurable parameters of the event-generator chart and their default values.

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity, like the nodeSelector but with more expressive syntax. |
| config.actions | string | `"^syscall"` | Regular expression used to select the actions to be run. |
| config.command | string | `"test"` | The event-generator accepts two commands (run, test): run: runs actions. test: runs and tests actions. For more info see: https://github.com/falcosecurity/event-generator |
| config.grpc.bindAddress | string | `"unix:///var/run/falco/falco.sock"` | Path to the Falco grpc socket. |
| config.grpc.enabled | bool | `true` | Set it to true if you are deploying in "test" mode. |
| config.loop | bool | `false` | Runs in a loop the actions. If set to "true" the event-generator is deployed using a k8s deployment otherwise a k8s job. |
| config.sleep | string | `""` | The length of time to wait before running an action. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means no sleep. (default 100ms) |
| fullnameOverride | string | `""` | Used to override the chart full name. |
| image.pullPolicy | string | `"IfNotPresent"` | Pull policy for the event-generator image |
| image.repository | string | `"falcosecurity/event-generator"` | Repository from where the image is pulled. |
| image.tag | string | `"latest"` | Images' tag to select a development/custom version of event-generator instead of a release. Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | Secrets used to pull the image from a private repository. |
| nameOverride | string | `""` | Used to override the chart name. |
| nodeSelector | object | `{}` | Selectors to choose a given node where to run the pods. |
| podAnnotations | object | `{}` | Annotations to be added to the pod. |
| podSecurityContext | object | `{}` | Security context for the pod. |
| replicasCount | int | `1` | Number of replicas of the event-generator (meaningful when installed as a deployment). |
| securityContext | object | `{}` | Security context for the containers. |
| tolerations | list | `[]` | Tolerations to allow the pods to be scheduled on nodes whose taints the pod tolerates. |
All the configurable parameters of the event-generator chart and their default values can be found [here](./generated/helm-values.md).
14 changes: 10 additions & 4 deletions event-generator/generated/helm-values.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# event-generator

A Helm chart used to deploy the event-generator in Kubernetes cluster.
## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity, like the nodeSelector but with more expressive syntax. |
| config.actions | string | `"^syscall"` | Regular expression used to select the actions to be run. |
| config.command | string | `"test"` | The event-generator accepts two commands (run, test): run: runs actions. test: runs and tests actions. For more info see: https://github.com/falcosecurity/event-generator |
| config.actions | string | `"^k8saudit"` | Regular expression used to select the actions to be run. |
| config.command | string | `"test"` | The event-generator accepts two commands (run, test): run: runs actions. test: runs and tests actions. For more info see: https://github.com/falcosecurity/event-generator. |
| config.grpc.bindAddress | string | `"unix:///var/run/falco/falco.sock"` | Path to the Falco grpc socket. |
| config.grpc.enabled | bool | `true` | Set it to true if you are deploying in "test" mode. |
| config.loop | bool | `false` | Runs in a loop the actions. If set to "true" the event-generator is deployed using a k8s deployment otherwise a k8s job. |
| config.sleep | string | `""` | The length of time to wait before running an action. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means no sleep. (default 100ms) |
| config.sleep | string | `""` | The length of time to wait before running an action. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means no sleep. (default 100ms) |
| fullnameOverride | string | `""` | Used to override the chart full name. |
| image.pullPolicy | string | `"IfNotPresent"` | Pull policy for the event-generator image |
| image.repository | string | `"falcosecurity/event-generator"` | Repository from where the image is pulled. |
Expand All @@ -18,4 +23,5 @@
| podSecurityContext | object | `{}` | Security context for the pod. |
| replicasCount | int | `1` | Number of replicas of the event-generator (meaningful when installed as a deployment). |
| securityContext | object | `{}` | Security context for the containers. |
| tolerations | list | `[]` | Tolerations to allow the pods to be scheduled on nodes whose taints the pod tolerates. |
| tolerations | list | `[]` | Tolerations to allow the pods to be scheduled on nodes whose taints the pod tolerates. |

0 comments on commit 0e80270

Please sign in to comment.