[nova] Allow deterministic setting of 'ironic.memcache_secret_key

If conf.nova.ironic.memcache_secret_key is not explicitly set, derive
it from endpoints.oslo_cache.auth.memcache_secret_key or use a random
value.

This means when installing charts where we explicitly set
endpoints.oslo_cache.auth.memcache_secret_key upgrades without changes
won't churn.

Change-Id: I686297e25627d88ff9bd32df0a3f7ee8afc11f58
This commit is contained in:
Chris Wedgwood 2018-09-26 03:29:23 +00:00
parent a82fdd2491
commit 8ae990e622

View File

@ -189,7 +189,7 @@ limitations under the License.
{{- end -}}
{{- if empty .Values.conf.nova.ironic.memcache_secret_key -}}
{{- $_ := randAlphaNum 64 | set .Values.conf.nova.ironic "memcache_secret_key" -}}
{{- $_ := (default (randAlphaNum 64) .Values.endpoints.oslo_cache.auth.memcache_secret_key) | set .Values.conf.nova.ironic "memcache_secret_key" -}}
{{- end -}}
{{- if empty .Values.conf.nova.ironic.memcache_servers -}}