Skip to content

Commit

Permalink
[bitnami/*] Standardize documentation (#19835)
Browse files Browse the repository at this point in the history
Signed-off-by: Jota Martos <[email protected]>
  • Loading branch information
jotamartos authored Oct 20, 2023
1 parent 3e0672c commit af5f753
Show file tree
Hide file tree
Showing 216 changed files with 14,699 additions and 13,690 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/generate-chart-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,33 @@ jobs:
DIFF_URL: "${{github.event.pull_request.diff_url}}"
TEMP_FILE: "${{runner.temp}}/pr-${{github.event.number}}.diff"
run: |
exit_code=0
# This request doesn't consume API calls.
curl -Lkso $TEMP_FILE $DIFF_URL
files_changed="$(sed -nr 's/[\-\+]{3} [ab]\/(.*)/\1/p' $TEMP_FILE | sort | uniq)"
# Adding || true to avoid "Process exited with code 1" errors
charts_dirs_changed="$(echo "$files_changed" | xargs dirname | grep -o "bitnami/[^/]*" | sort | uniq || true)"
for chart in ${charts_dirs_changed}; do
echo "Validating README.md for ${chart}"
while read line; do
echo "$line" | grep --quiet "\[default: \(REGISTRY_NAME\|\"\"\)\]" || exit_code=$?
done < <(grep "@param\s\+[A-Za-z\.-]\+\.registry\s\+" "charts/${chart}/values.yaml")
if [[ $exit_code -ne 0 ]]; then
echo "::error:: Please ensure all *.registry params include the [default: REGISTRY_NAME] modifier the ${chart}/values.yaml file"
exit "$exit_code"
fi
while read line; do
param=$(echo "$line" | awk '{print $3}')
# Checking if it's a image's registry-related param
registry_param=$(echo ${param} | sed 's/\.repository/\.registry/g')
grep --quiet "@param\s\+${registry_param}" "${c}/values.yaml" && ( echo "$line" | grep --quiet "\[default: \(REPOSITORY_NAME/.*\|\"\"\)\]" || exit_code=$? )
echo "$line" | grep --quiet "\[default: \(REPOSITORY_NAME/.*\|\"\"\)\]" || exit_code=$?
done < <(grep "@param\s\+[A-Za-z\.-]\+\.repository\s\+" "charts/${chart}/values.yaml")
echo "$exit_code"
if [[ $exit_code -ne 0 ]]; then
echo "::error:: Please ensure all *.repository params include the [default: REPOSITORY_NAME] modifier the ${chart}/values.yaml file"
exit "$exit_code"
fi
echo "Updating README.md for ${chart}"
readme-generator --values "charts/${chart}/values.yaml" --readme "charts/${chart}/README.md" --schema "/tmp/schema.json"
done
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ Looking to use our applications in production? Try [VMware Application Catalog](
## TL;DR

```bash
helm install my-release oci://registry-1.docker.io/bitnamicharts/<chart>
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/<chart>
```

> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
## Vulnerabilities scanner

Each Helm chart contains one or more containers. Those containers use images provided by Bitnami through its test & release pipeline and whose source code can be found at [bitnami/containers](https://github.com/bitnami/containers).
Expand Down Expand Up @@ -54,8 +56,10 @@ Please refer to the [Quick Start guide](https://helm.sh/docs/intro/quickstart/)

Useful Helm Client Commands:

- Install a chart: `helm install my-release oci://registry-1.docker.io/bitnamicharts/<chart>`
- Upgrade your application: `helm upgrade my-release oci://registry-1.docker.io/bitnamicharts/<chart>`
- Install a chart: `helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/<chart>`
- Upgrade your application: `helm upgrade my-release oci://REGISTRY_NAME/REPOSITORY_NAME/<chart>`

> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
## License

Expand Down
565 changes: 286 additions & 279 deletions bitnami/airflow/README.md

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions bitnami/airflow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ dags:
existingConfigmap: ""
## OS Shell + Utility image
## ref: https://hub.docker.com/r/bitnami/os-shell/tags/
## @param dags.image.registry Init container load-dags image registry
## @param dags.image.repository Init container load-dags image repository
## @param dags.image.registry [default: REGISTRY_NAME] Init container load-dags image registry
## @param dags.image.repository [default: REPOSITORY_NAME/os-shell] Init container load-dags image repository
## @param dags.image.tag Init container load-dags image tag (immutable tags are recommended)
## @param dags.image.digest Init container load-dags image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param dags.image.pullPolicy Init container load-dags image pull policy
Expand Down Expand Up @@ -178,8 +178,8 @@ extraVolumes: []
web:
## Bitnami Airflow image version
## ref: https://hub.docker.com/r/bitnami/airflow/tags/
## @param web.image.registry Airflow image registry
## @param web.image.repository Airflow image repository
## @param web.image.registry [default: REGISTRY_NAME] Airflow image registry
## @param web.image.repository [default: REPOSITORY_NAME/airflow] Airflow image repository
## @param web.image.tag Airflow image tag (immutable tags are recommended)
## @param web.image.digest Airflow image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param web.image.pullPolicy Airflow image pull policy
Expand Down Expand Up @@ -435,8 +435,8 @@ web:
scheduler:
## Bitnami Airflow Scheduler image version
## ref: https://hub.docker.com/r/bitnami/airflow-scheduler/tags/
## @param scheduler.image.registry Airflow Scheduler image registry
## @param scheduler.image.repository Airflow Scheduler image repository
## @param scheduler.image.registry [default: REGISTRY_NAME] Airflow Scheduler image registry
## @param scheduler.image.repository [default: REPOSITORY_NAME/airflow-scheduler] Airflow Scheduler image repository
## @param scheduler.image.tag Airflow Scheduler image tag (immutable tags are recommended)
## @param scheduler.image.digest Airflow Schefuler image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param scheduler.image.pullPolicy Airflow Scheduler image pull policy
Expand Down Expand Up @@ -639,8 +639,8 @@ scheduler:
worker:
## Bitnami Airflow Worker image version
## ref: https://hub.docker.com/r/bitnami/airflow-worker/tags/
## @param worker.image.registry Airflow Worker image registry
## @param worker.image.repository Airflow Worker image repository
## @param worker.image.registry [default: REGISTRY_NAME] Airflow Worker image registry
## @param worker.image.repository [default: REPOSITORY_NAME/airflow-worker] Airflow Worker image repository
## @param worker.image.tag Airflow Worker image tag (immutable tags are recommended)
## @param worker.image.digest Airflow Worker image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param worker.image.pullPolicy Airflow Worker image pull policy
Expand Down Expand Up @@ -913,8 +913,8 @@ worker:
git:
## Bitnami Git image version
## ref: https://hub.docker.com/r/bitnami/git/tags/
## @param git.image.registry Git image registry
## @param git.image.repository Git image repository
## @param git.image.registry [default: REGISTRY_NAME] Git image registry
## @param git.image.repository [default: REPOSITORY_NAME/git] Git image repository
## @param git.image.tag Git image tag (immutable tags are recommended)
## @param git.image.digest Git image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param git.image.pullPolicy Git image pull policy
Expand Down Expand Up @@ -1276,8 +1276,8 @@ metrics:
enabled: false
## Bitnami Airflow exporter image
## ref: https://hub.docker.com/r/bitnami/airflow-exporter/tags/
## @param metrics.image.registry Airflow exporter image registry
## @param metrics.image.repository Airflow exporter image repository
## @param metrics.image.registry [default: REGISTRY_NAME] Airflow exporter image registry
## @param metrics.image.repository [default: REPOSITORY_NAME/airflow-exporter] Airflow exporter image repository
## @param metrics.image.tag Airflow exporter image tag (immutable tags are recommended)
## @param metrics.image.digest Airflow exporter image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param metrics.image.pullPolicy Airflow exporter image pull policy
Expand Down
Loading

0 comments on commit af5f753

Please sign in to comment.