From 458385d97114c300ad517eff6a9e2e4a31534fb5 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 22 Apr 2020 18:38:01 -0500 Subject: [PATCH] Amend examples which broke lock files in README.md (#1225) Prior to this change, these two examples suggested enclosing a release spec in an if expression, which breaks the lock file when switching environments. This change parameterizes `installed` instead of the entire release, thus preserving the dependency locking functionality. --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d278eba2..f1ce454c 100644 --- a/README.md +++ b/README.md @@ -618,11 +618,9 @@ environments: production: releases: - -{{ if eq .Environment.Name "production" }} - name: newrelic-agent + installed: {{ eq .Environment.Name "production" | toYaml }} # snip -{{ end }} - name: myapp # snip ``` @@ -688,12 +686,10 @@ releases: - name: myapp-{{ .Values.releaseName }} # release name will be one of `dev` or `prod` depending on selected environment values: - values.yaml.gotmpl - -{{ if eq (.Values.releaseName "prod" ) }} -# this release would be installed only if selected environment is `production` - name: production-specific-release + # this release would be installed only if selected environment is `production` + installed: {{ eq .Values.releaseName "prod" | toYaml }} ... -{{ end }} ``` ### Note