A configuration management service with support for secrets.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configmap-etc.yaml 3.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright 2017 The Openstack-Helm Authors.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. {{- $envAll := . }}
  15. {{- if empty .Values.conf.deckhand.keystone_authtoken.auth_uri -}}
  16. {{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.deckhand.keystone_authtoken "auth_uri" | quote | trunc 0 -}}
  17. {{- end -}}
  18. # FIXME fix for broken keystonemiddleware oslo config gen in newton - will remove in future
  19. {{- if empty .Values.conf.deckhand.keystone_authtoken.auth_url -}}
  20. {{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.deckhand.keystone_authtoken "auth_url" | quote | trunc 0 -}}
  21. {{- end -}}
  22. # Add endpoint URI lookup for Deckhand Postgresql DB Connection
  23. {{- if empty .Values.conf.deckhand.database.connection -}}
  24. {{- tuple "postgresql" "internal" "user" "postgresql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.deckhand.database "connection" | quote | trunc 0 -}}
  25. {{- end -}}
  26. # Add endpoint URI lookup for memcached servers Connection
  27. {{- if empty .Values.conf.deckhand.keystone_authtoken.memcached_servers -}}
  28. {{- tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.deckhand.keystone_authtoken "memcached_servers" | quote | trunc 0 -}}
  29. {{- end -}}
  30. # Add endpoint URI lookup for barbican
  31. {{- if empty .Values.conf.deckhand.barbican.api_endpoint -}}
  32. {{- tuple "barbican" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.deckhand.barbican "api_endpoint" | quote | trunc 0 -}}
  33. {{- end -}}
  34. {{- $userIdentity := .Values.endpoints.identity.auth.user -}}
  35. {{- if empty .Values.conf.deckhand.keystone_authtoken.project_name -}}
  36. {{- set .Values.conf.deckhand.keystone_authtoken "project_name" $userIdentity.project_name | quote | trunc 0 -}}
  37. {{- end -}}
  38. {{- if empty .Values.conf.deckhand.keystone_authtoken.project_domain_name -}}
  39. {{- set .Values.conf.deckhand.keystone_authtoken "project_domain_name" $userIdentity.project_domain_name | quote | trunc 0 -}}
  40. {{- end -}}
  41. {{- if empty .Values.conf.deckhand.keystone_authtoken.user_domain_name -}}
  42. {{- set .Values.conf.deckhand.keystone_authtoken "user_domain_name" $userIdentity.user_domain_name | quote | trunc 0 -}}
  43. {{- end -}}
  44. {{- if empty .Values.conf.deckhand.keystone_authtoken.username -}}
  45. {{- set .Values.conf.deckhand.keystone_authtoken "username" $userIdentity.username | quote | trunc 0 -}}
  46. {{- end -}}
  47. {{- if empty .Values.conf.deckhand.keystone_authtoken.password -}}
  48. {{- set .Values.conf.deckhand.keystone_authtoken "password" $userIdentity.password | quote | trunc 0 -}}
  49. {{- end -}}
  50. # Set a random string as secret key.
  51. {{- if empty .Values.conf.deckhand.keystone_authtoken.memcache_secret_key -}}
  52. {{- randAlphaNum 64 | set .Values.conf.deckhand.keystone_authtoken "memcache_secret_key" | quote | trunc 0 -}}
  53. {{- end -}}
  54. ---
  55. apiVersion: v1
  56. kind: ConfigMap
  57. metadata:
  58. name: deckhand-etc
  59. data:
  60. deckhand.conf: |+
  61. {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.deckhand | indent 4 }}
  62. logging.conf: |+
  63. {{ include "helm-toolkit.utils.to_ini" .Values.conf.logging | indent 4 }}
  64. deckhand-paste.ini: |+
  65. {{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | indent 4 }}
  66. policy.yaml: |+
  67. {{ toYaml .Values.conf.policy | indent 4 }}