generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1164 from wzshiming/doc/charts
Update readme of chart
- Loading branch information
Showing
9 changed files
with
102 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{{- define "extra.usage" -}} | ||
[KWOK](https://kwok.sigs.k8s.io/) - Simulates thousands of Nodes and Clusters. | ||
|
||
## Installing the Chart | ||
|
||
Before you can install the chart you will need to add the `kwok` repo to [Helm](https://helm.sh/). | ||
|
||
```shell | ||
helm repo add kwok https://kwok.sigs.k8s.io/charts/ | ||
``` | ||
|
||
After you've installed the repo you can install the chart. | ||
|
||
```shell | ||
helm upgrade --namespace kube-system --install kwok kwok/kwok | ||
``` | ||
|
||
Set up default stage policy (required) | ||
> NOTE: This configures the pod/node emulation behavior, if not it will do nothing. | ||
|
||
```shell | ||
helm upgrade --install kwok kwok/stage-fast | ||
``` | ||
|
||
Set up default metrics usage policy (optional) | ||
|
||
```shell | ||
helm upgrade --install kwok kwok/metrics-usage | ||
``` | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# {{ template "chart.description" . }} | ||
|
||
{{ template "extra.usage" . }} | ||
|
||
## Configuration | ||
|
||
The following table lists the configurable parameters of the kwok chart and their default values. | ||
|
||
{{ template "chart.valuesTable" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# {{ template "chart.description" . }} | ||
|
||
{{ template "extra.usage" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# {{ template "chart.description" . }} | ||
|
||
{{ template "extra.usage" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,15 @@ function sync_to_chart() { | |
cp "${src}" "${dest}" | ||
} | ||
|
||
function update_readme() { | ||
local chart=$1 | ||
go run github.com/norwoodj/helm-docs/cmd/[email protected] \ | ||
-c charts/ \ | ||
-t ./_templates.gotmpl \ | ||
-t README.md.gotmpl \ | ||
-g "charts/${chart}" | ||
} | ||
|
||
function sync() { | ||
sync_object_to_chart kustomize/rbac/role.yaml charts/kwok/templates/role.yaml | ||
sync_object_to_chart kustomize/rbac/role_binding.yaml charts/kwok/templates/role_binding.yaml | ||
|
@@ -66,6 +75,10 @@ function sync() { | |
|
||
sync_stage_to_chart kustomize/metrics/resource/metrics-resource.yaml charts/metrics-usage/templates/metrics-resource.yaml | ||
sync_stage_to_chart kustomize/metrics/usage/usage-from-annotation.yaml charts/metrics-usage/templates/usage-from-annotation.yaml | ||
|
||
update_readme kwok | ||
update_readme stage-fast | ||
update_readme metrics-usage | ||
} | ||
|
||
cd "${ROOT_DIR}" && sync |