diff --git a/docs/examples/nginx/README.md b/docs/examples/nginx/README.md index 379ecd64378bf66abcd0c71a431c7786e9994ecb..a156d70de69acf7148e18341e05daec8fc300a6b 100644 --- a/docs/examples/nginx/README.md +++ b/docs/examples/nginx/README.md @@ -9,21 +9,25 @@ The chart installs a simple nginx server according to the following pattern: - A `ConfigMap` is used to store the files the server will serve. - (`templates/configmap.yaml`) + ([templates/configmap.yaml](templates/configmap.yaml)) - A `Deployment` is used to create a Replica Set of nginx pods. - (`templates/deployment.yaml`) + ([templates/deployment.yaml](templates/deployment.yaml)) - A `Service` is used to create a gateway to the pods running in the - replica set (`templates/svc.yaml`) + replica set ([templates/svc.yaml](templates/svc.yaml)) -The `values.yaml` exposes a few of the configuration options in the +The [values.yaml](values.yaml) exposes a few of the configuration options in the charts, though there are some that are not exposed there (like `.image`). -The `templates/_helpers.tpl` file contains helper templates. The leading +The [templates/_helpers.tpl](templates/_helpers.tpl) file contains helper templates. The leading underscore (`_`) on the filename is semantic. It tells the template renderer that this file does not contain a manifest. That file declares some templates that are used elsewhere in the chart. +Helpers (usually called "partials" in template languages) are an +advanced way for developers to structure their templates for optimal +reuse. + You can deploy this chart with `helm install docs/examples/nginx`. Or you can see how this chart would render with `helm install --dry-run --debug docs/examples/nginx`. diff --git a/docs/examples/nginx/templates/deployment.yaml b/docs/examples/nginx/templates/deployment.yaml index f70069c186141f1d74f5a1348794d6ab05cbd5db..5503dc38d90ec4985e457c6a38f4b51d51edbf81 100644 --- a/docs/examples/nginx/templates/deployment.yaml +++ b/docs/examples/nginx/templates/deployment.yaml @@ -6,8 +6,11 @@ metadata: # multiple times into the same namespace. name: {{template "fullname" .}} labels: + # This is a convention. It makes it possible for an admin to query a cluster + # using Kubectl and find out what packages are managed by Helm. Helm itself + # does not depend on this label, though. heritage: helm - # This makes it easy to search using kubectl + # This makes it easy to search for all components of a release using kubectl. release: {{.Release.Name}} # This makes it easy to audit chart usage. chart: {{.Chart.Name}}-{{.Chart.Version}} diff --git a/docs/examples/nginx/templates/svc.yaml b/docs/examples/nginx/templates/svc.yaml index e52e4f5a0537d9c0d4ded1372e703a1604056a3d..973e567746b36022634cb0523dd80da7536b2e72 100644 --- a/docs/examples/nginx/templates/svc.yaml +++ b/docs/examples/nginx/templates/svc.yaml @@ -1,4 +1,5 @@ # This is a service gateway to the replica set created by the deployment. +# Take a look at the deployment.yaml for general notes about this chart. apiVersion: v1 kind: Service metadata: