2017-08-07 17:07:38 -05:00
|
|
|
{{/*
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/}}
|
2017-07-05 02:34:12 -05:00
|
|
|
|
2022-03-16 14:55:47 -05:00
|
|
|
{{- if (.Values.global).subchart_release_name }}
|
|
|
|
{{- $_ := set . "deployment_name" .Chart.Name }}
|
|
|
|
{{- else }}
|
|
|
|
{{- $_ := set . "deployment_name" .Release.Name }}
|
|
|
|
{{- end }}
|
|
|
|
|
2017-08-07 11:37:42 -05:00
|
|
|
{{- if .Values.manifests.configmap_etc }}
|
2017-07-05 02:34:12 -05:00
|
|
|
{{- $envAll := . }}
|
|
|
|
|
2017-09-18 17:37:33 -05:00
|
|
|
{{- if empty .Values.conf.glance.keystone_authtoken.auth_uri -}}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.glance.keystone_authtoken "auth_uri" -}}
|
2017-04-12 00:50:59 -05:00
|
|
|
{{- end -}}
|
|
|
|
|
2017-09-18 17:37:33 -05:00
|
|
|
{{- if empty .Values.conf.glance.keystone_authtoken.auth_url -}}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.glance.keystone_authtoken "auth_url" -}}
|
2017-04-12 00:50:59 -05:00
|
|
|
{{- end -}}
|
|
|
|
|
2017-09-18 17:37:33 -05:00
|
|
|
{{- if empty .Values.conf.glance.keystone_authtoken.region_name -}}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := set .Values.conf.glance.keystone_authtoken "region_name" .Values.endpoints.identity.auth.glance.region_name -}}
|
2017-07-02 19:43:43 -05:00
|
|
|
{{- end -}}
|
2017-09-18 17:37:33 -05:00
|
|
|
{{- if empty .Values.conf.glance.keystone_authtoken.project_name -}}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := set .Values.conf.glance.keystone_authtoken "project_name" .Values.endpoints.identity.auth.glance.project_name -}}
|
2017-07-02 19:43:43 -05:00
|
|
|
{{- end -}}
|
2017-09-18 17:37:33 -05:00
|
|
|
{{- if empty .Values.conf.glance.keystone_authtoken.project_domain_name -}}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := set .Values.conf.glance.keystone_authtoken "project_domain_name" .Values.endpoints.identity.auth.glance.project_domain_name -}}
|
2017-07-02 19:43:43 -05:00
|
|
|
{{- end -}}
|
2017-09-18 17:37:33 -05:00
|
|
|
{{- if empty .Values.conf.glance.keystone_authtoken.user_domain_name -}}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := set .Values.conf.glance.keystone_authtoken "user_domain_name" .Values.endpoints.identity.auth.glance.user_domain_name -}}
|
2017-07-02 19:43:43 -05:00
|
|
|
{{- end -}}
|
2017-09-18 17:37:33 -05:00
|
|
|
{{- if empty .Values.conf.glance.keystone_authtoken.username -}}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := set .Values.conf.glance.keystone_authtoken "username" .Values.endpoints.identity.auth.glance.username -}}
|
2017-07-02 19:43:43 -05:00
|
|
|
{{- end -}}
|
2017-09-18 17:37:33 -05:00
|
|
|
{{- if empty .Values.conf.glance.keystone_authtoken.password -}}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := set .Values.conf.glance.keystone_authtoken "password" .Values.endpoints.identity.auth.glance.password -}}
|
2017-07-02 19:43:43 -05:00
|
|
|
{{- end -}}
|
|
|
|
|
2017-09-18 17:37:33 -05:00
|
|
|
{{- if empty .Values.conf.glance.keystone_authtoken.memcached_servers -}}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.glance.keystone_authtoken "memcached_servers" -}}
|
2017-04-12 00:50:59 -05:00
|
|
|
{{- end -}}
|
2020-02-21 17:12:38 +00:00
|
|
|
{{- if empty .Values.conf.glance.keystone_authtoken.memcache_secret_key -}}
|
|
|
|
{{- $_ := set .Values.conf.glance.keystone_authtoken "memcache_secret_key" ( default ( randAlphaNum 64 ) .Values.endpoints.oslo_cache.auth.memcache_secret_key ) -}}
|
|
|
|
{{- end -}}
|
2017-04-12 00:50:59 -05:00
|
|
|
|
2017-09-18 17:37:33 -05:00
|
|
|
{{- if empty .Values.conf.glance.database.connection -}}
|
2020-07-01 00:25:27 +00:00
|
|
|
{{- $connection := tuple "oslo_db" "internal" "glance" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" -}}
|
|
|
|
{{- if .Values.manifests.certificates -}}
|
|
|
|
{{- $_ := (printf "%s?charset=utf8&ssl_ca=/etc/mysql/certs/ca.crt&ssl_key=/etc/mysql/certs/tls.key&ssl_cert=/etc/mysql/certs/tls.crt&ssl_verify_cert" $connection ) | set .Values.conf.glance.database "connection" -}}
|
|
|
|
{{- else -}}
|
|
|
|
{{- $_ := set .Values.conf.glance.database "connection" $connection -}}
|
|
|
|
{{- end -}}
|
2017-04-12 00:50:59 -05:00
|
|
|
{{- end -}}
|
|
|
|
|
2017-09-18 17:37:33 -05:00
|
|
|
{{- if empty .Values.conf.glance.DEFAULT.transport_url -}}
|
2019-06-17 08:56:59 -05:00
|
|
|
{{- $_ := tuple "oslo_messaging" "internal" "glance" "amqp" . | include "helm-toolkit.endpoints.authenticated_transport_endpoint_uri_lookup" | set .Values.conf.glance.DEFAULT "transport_url" -}}
|
2017-04-12 00:50:59 -05:00
|
|
|
{{- end -}}
|
2017-02-17 09:59:51 -05:00
|
|
|
|
2017-09-18 17:37:33 -05:00
|
|
|
{{- if empty .Values.conf.glance.DEFAULT.public_endpoint -}}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := tuple "image" "public" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.glance.DEFAULT "public_endpoint" -}}
|
2017-09-07 02:22:41 -05:00
|
|
|
{{- end -}}
|
|
|
|
|
2017-09-18 17:37:33 -05:00
|
|
|
{{- if empty .Values.conf.glance.glance_store.stores -}}
|
2017-09-07 02:22:41 -05:00
|
|
|
{{- if eq .Values.storage "rbd" }}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := "file, http, rbd" | set .Values.conf.glance.glance_store "stores" -}}
|
2017-09-07 02:22:41 -05:00
|
|
|
{{- end -}}
|
|
|
|
{{- if eq .Values.storage "pvc" }}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := "file, http" | set .Values.conf.glance.glance_store "stores" -}}
|
2017-09-07 02:22:41 -05:00
|
|
|
{{- end -}}
|
|
|
|
{{ if or (eq .Values.storage "radosgw") (eq .Values.storage "swift") }}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := "file, http, swift" | set .Values.conf.glance.glance_store "stores" -}}
|
2017-09-07 02:22:41 -05:00
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
2017-09-18 17:37:33 -05:00
|
|
|
{{- if empty .Values.conf.glance.glance_store.default_store -}}
|
2017-09-07 02:22:41 -05:00
|
|
|
{{- if eq .Values.storage "rbd" }}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := "rbd" | set .Values.conf.glance.glance_store "default_store" -}}
|
2017-09-07 02:22:41 -05:00
|
|
|
{{- end -}}
|
|
|
|
{{- if eq .Values.storage "pvc" }}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := "file" | set .Values.conf.glance.glance_store "default_store" -}}
|
2017-09-07 02:22:41 -05:00
|
|
|
{{- end -}}
|
|
|
|
{{ if or (eq .Values.storage "radosgw") (eq .Values.storage "swift") }}
|
2018-06-15 19:26:57 -05:00
|
|
|
{{- $_ := "swift" | set .Values.conf.glance.glance_store "default_store" -}}
|
2017-09-07 02:22:41 -05:00
|
|
|
{{- end -}}
|
2017-06-14 20:04:05 -05:00
|
|
|
{{- end -}}
|
|
|
|
|
2018-03-03 15:31:25 +00:00
|
|
|
{{- if empty .Values.conf.glance.DEFAULT.bind_port -}}
|
2021-12-02 16:49:29 +02:00
|
|
|
{{- $_ := tuple "image" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.glance.DEFAULT "bind_port" -}}
|
2018-03-03 15:31:25 +00:00
|
|
|
{{- end -}}
|
|
|
|
|
2018-06-17 16:12:25 -05:00
|
|
|
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
|
|
|
{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
|
|
|
|
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
2022-03-16 14:55:47 -05:00
|
|
|
{{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .deployment_name $fluentd_host $fluentd_port }}
|
2018-06-17 16:12:25 -05:00
|
|
|
{{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}}
|
|
|
|
{{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{- if and (empty .Values.conf.logging.formatter_fluent) (has "fluent" .Values.conf.logging.formatters.keys) -}}
|
|
|
|
{{- $formatter_fluent := dict "class" "oslo_log.formatters.FluentFormatter" -}}
|
|
|
|
{{- $_ := set .Values.conf.logging "formatter_fluent" $formatter_fluent -}}
|
2019-08-21 12:31:15 +03:00
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{- if empty .Values.conf.glance.cors.allowed_origin -}}
|
|
|
|
{{- $endpointScheme := tuple "dashboard" "public" "web" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }}
|
|
|
|
{{- $endpointHost := tuple "dashboard" "public" . | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
|
|
|
|
{{- $endpointPort := tuple "dashboard" "public" "web" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
upgrading umbrella w/o changes has no app changes
If a Helm upgrade is performed on the OpenStack Umbrella chart using
the exact same configuration as the first release, then it's expected
for no DaemonSets, Deployments, or StatefulSets to be updated.
This did not work as expected.
A few changes were required to support this desired behavior:
1. Update glance's configmap-etc.yaml to trim whitespace and convert
YAML comment to Helm template comment. Before this change, Helm
rendered the template with the YAML comment and a newline for the
install phase. On upgrades, Helm rendered the template without the
YAML comment and newline causing the hash of configmap-etc to change,
thus causing the glance-api Deployment to update.
2. Update openstack.sh script to create a randomly generated memcache
secret for glance. Without this change, the glance-api deployment
changes each time since Helm randomly generates a new memcache
secret if not provided.
This behavior is enforced via a new test script,
validate-umbrella-upgrade-no-side-effects.sh.
The following jobs are always recreated due to hooks:
- keystone-bootstrap
- keystone-credential-setup
- keystone-db-init
- keystone-db-sync
- keystone-domain-manage
- keystone-fernet-setup
- keystone-rabbit-init
- rabbitmq-cluster-wait
Some Jobs are created via CronJobs and could be created during
validation. So far, heat-engine-cleaner has been seen, but others
could be caught too.
So the validation script ignores these pod changes by ignoring if
Jobs were recreated. Plus Jobs being recreated should not impact
the OpenStack deployment.
Change-Id: Iffaa346d814b8d0a3e2292849943219f70d50a23
2022-06-22 11:28:18 -05:00
|
|
|
{{- if eq $endpointPort "80" "443" -}}
|
|
|
|
{{/*
|
|
|
|
Common browsers don't add default ports like 80 and 443 to the headers
|
|
|
|
and URLs therefore CORS should allow to use URLs both with 80,443 and
|
|
|
|
without it in the URL.
|
|
|
|
*/}}
|
2019-08-21 12:31:15 +03:00
|
|
|
{{- $_ := set $envAll.Values.conf.glance.cors "allowed_origin" ( list ) }}
|
|
|
|
{{- $__allowed_origin := append $envAll.Values.conf.glance.cors.allowed_origin (printf "%s://%s" $endpointScheme $endpointHost) }}
|
|
|
|
{{- $_ := set $envAll.Values.conf.glance.cors "allowed_origin" $__allowed_origin }}
|
|
|
|
{{- $__allowed_origin := append $envAll.Values.conf.glance.cors.allowed_origin (printf "%s://%s:%s" $endpointScheme $endpointHost $endpointPort) }}
|
|
|
|
{{- $_ := set $envAll.Values.conf.glance.cors "allowed_origin" $__allowed_origin }}
|
|
|
|
{{- else }}
|
|
|
|
{{- printf "%s://%s:%s" $endpointScheme $endpointHost $endpointPort | set .Values.conf.glance.cors "allowed_origin" }}
|
|
|
|
{{- end }}
|
2018-06-17 16:12:25 -05:00
|
|
|
{{- end -}}
|
2017-07-05 02:34:12 -05:00
|
|
|
---
|
2017-01-13 15:40:38 -06:00
|
|
|
apiVersion: v1
|
2018-08-08 14:56:30 -05:00
|
|
|
kind: Secret
|
2017-01-13 15:40:38 -06:00
|
|
|
metadata:
|
|
|
|
name: glance-etc
|
2018-08-08 14:56:30 -05:00
|
|
|
type: Opaque
|
2017-01-13 15:40:38 -06:00
|
|
|
data:
|
2018-08-08 14:56:30 -05:00
|
|
|
rally_tests.yaml: {{ toYaml .Values.conf.rally_tests.tests | b64enc }}
|
|
|
|
glance-api.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.glance | b64enc }}
|
|
|
|
logging.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | b64enc }}
|
|
|
|
glance-api-paste.ini: {{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | b64enc }}
|
2021-05-17 19:16:54 -03:00
|
|
|
policy.yaml: {{ toYaml .Values.conf.policy | b64enc }}
|
2019-04-10 15:32:38 -05:00
|
|
|
api_audit_map.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.api_audit_map | b64enc }}
|
2022-09-08 17:01:41 -04:00
|
|
|
glance_sudoers: {{ $envAll.Values.conf.glance_sudoers | b64enc }}
|
|
|
|
rootwrap.conf: {{ $envAll.Values.conf.rootwrap | b64enc }}
|
|
|
|
{{- range $key, $value := $envAll.Values.conf.rootwrap_filters }}
|
|
|
|
{{- $filePrefix := replace "_" "-" $key }}
|
|
|
|
{{ printf "%s.filters" $filePrefix }}: {{ $value.content | b64enc }}
|
|
|
|
{{- end }}
|
2018-08-08 14:56:30 -05:00
|
|
|
{{- include "helm-toolkit.snippets.values_template_renderer" ( dict "envAll" $envAll "template" .Values.conf.swift_store "key" "swift-store.conf" "format" "Secret" ) | indent 2 }}
|
2020-06-03 12:40:40 -05:00
|
|
|
{{- include "helm-toolkit.snippets.values_template_renderer" ( dict "envAll" $envAll "template" .Values.conf.nginx "key" "nginx.conf" "format" "Secret" ) | indent 2 }}
|
2017-08-07 11:37:42 -05:00
|
|
|
{{- end }}
|