From 116931bb51372fc472843e6d9c9ff359a5c3354a Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Wed, 15 Feb 2017 00:52:38 +0000 Subject: [PATCH] Rename common chart, and update all references to functions within it. (#167) * Rename common chart to helm-toolkit * Update useage of helpers to include reference to chart they come from. * Update helm-toolkit function naming Also catches several functions missed in previous PS * Update remaining requirements.yaml to use helm-toolbox * Dep Check container fix for common -> helm-toolbox renaming --- Makefile | 14 +++---- bootstrap/requirements.yaml | 22 +++++++++-- ceph/requirements.yaml | 2 +- cinder/requirements.yaml | 2 +- cinder/templates/_helpers.tpl | 4 +- cinder/templates/configmap-bin.yaml | 8 ++-- cinder/templates/configmap-etc.yaml | 10 ++--- cinder/templates/deployment-api.yaml | 6 +-- cinder/templates/deployment-scheduler.yaml | 6 +-- cinder/templates/deployment-volume.yaml | 6 +-- cinder/templates/etc/_cinder.conf.tpl | 2 +- cinder/templates/job-db-init.yaml | 2 +- cinder/templates/job-db-sync.yaml | 2 +- cinder/templates/job-ks-endpoints.yaml.yaml | 6 +-- cinder/templates/job-ks-service.yaml | 4 +- cinder/templates/job-ks-user.yaml | 6 +-- common/templates/_hosts.tpl | 38 ------------------- glance/requirements.yaml | 2 +- glance/templates/bin/_post.sh.tpl | 25 ++++++------ glance/templates/configmap-bin.yaml | 4 +- glance/templates/configmap-etc.yaml | 14 +++---- glance/templates/deployment-api.yaml | 6 +-- glance/templates/deployment-registry.yaml | 6 +-- glance/templates/job-db-init.yaml | 2 +- glance/templates/job-db-sync.yaml | 2 +- glance/templates/job-post.yaml | 2 +- heat/requirements.yaml | 2 +- heat/templates/configmap-bin.yaml | 10 ++--- heat/templates/configmap-etc.yaml | 6 +-- heat/templates/deployment-api.yaml | 2 +- heat/templates/deployment-cfn.yaml | 2 +- heat/templates/deployment-cloudwatch.yaml | 2 +- heat/templates/etc/_heat.conf.tpl | 6 +-- heat/templates/job-db-init.yaml | 2 +- heat/templates/job-db-sync.yaml | 2 +- heat/templates/job-ks-endpoints.yaml.yaml | 8 ++-- heat/templates/job-ks-service.yaml | 6 +-- heat/templates/job-ks-user.yaml | 12 +++--- heat/templates/statefulset-engine.yaml | 2 +- {common => helm-toolkit}/.gitignore | 0 {common => helm-toolkit}/.helmignore | 0 {common => helm-toolkit}/Chart.yaml | 2 +- {common => helm-toolkit}/Makefile | 2 +- {common => helm-toolkit}/requirements.yaml | 0 {common => helm-toolkit}/secrets/.gitkeep | 0 .../templates/_endpoints.tpl | 24 ++++++------ {common => helm-toolkit}/templates/_funcs.tpl | 6 +-- helm-toolkit/templates/_hosts.tpl | 22 +++++++++++ .../templates/scripts/_ks-domain-user.sh.tpl | 2 +- .../templates/scripts/_ks-endpoints.sh.tpl | 2 +- .../templates/scripts/_ks-service.sh.tpl | 2 +- .../templates/scripts/_ks-user.sh.tpl | 2 +- .../snippets/_k8s_init_dep_check.tpl | 10 ++--- .../templates/snippets/_ks_env_openrc.tpl | 2 +- .../snippets/_ks_env_user_create_openrc.tpl | 2 +- .../utils/secret-generator/README.md | 0 .../utils/secret-generator/ceph-key.py | 0 .../secret-generator/generate_secrets.sh | 0 .../templates/ceph/admin.keyring.tmpl | 0 .../templates/ceph/bootstrap.keyring.tmpl | 0 .../templates/ceph/ceph.conf.tmpl | 0 .../templates/ceph/mon.keyring.tmpl | 0 .../utils/test/ceph-rbd-test.yaml | 0 .../utils/values/values.py | 0 {common => helm-toolkit}/values.yaml | 0 horizon/requirements.yaml | 2 +- horizon/templates/configmap-bin.yaml | 2 +- horizon/templates/configmap-etc.yaml | 4 +- horizon/templates/deployment.yaml | 6 +-- horizon/templates/etc/_local_settings.tpl | 4 +- keystone/requirements.yaml | 2 +- keystone/templates/bin/_db-sync.sh.tpl | 6 +-- keystone/templates/bin/_init.sh.tpl | 4 +- keystone/templates/configmap-bin.yaml | 6 +-- keystone/templates/configmap-etc.yaml | 12 +++--- keystone/templates/deployment.yaml | 6 +-- keystone/templates/etc/_keystone.conf.tpl | 6 +-- keystone/templates/job-db-init.yaml | 2 +- keystone/templates/job-db-sync.yaml | 2 +- maas/requirements.yaml | 2 +- maas/templates/configmap-bin.yaml | 10 ++--- maas/templates/configmap-etc.yaml | 6 +-- mariadb/requirements.yaml | 2 +- mariadb/templates/configmap-bin.yaml | 10 ++--- mariadb/templates/configmap-etc.yaml | 16 ++++---- memcached/requirements.yaml | 2 +- neutron/requirements.yaml | 2 +- neutron/templates/bin/_init.sh.tpl | 4 +- neutron/templates/bin/_post.sh.tpl | 22 +++++------ neutron/templates/configmap-bin.yaml | 12 +++--- neutron/templates/configmap-etc.yaml | 12 +++--- neutron/templates/daemonset-dhcp-agent.yaml | 6 +-- neutron/templates/daemonset-l3-agent.yaml | 6 +-- .../templates/daemonset-metadata-agent.yaml | 6 +-- neutron/templates/daemonset-ovs-agent.yaml | 6 +-- neutron/templates/daemonset-ovs-db.yaml | 4 +- neutron/templates/daemonset-ovs-vswitchd.yaml | 4 +- neutron/templates/deployment-server.yaml | 6 +-- neutron/templates/etc/_metadata-agent.ini.tpl | 6 +-- neutron/templates/etc/_ml2-conf.ini.tpl | 8 ++-- neutron/templates/etc/_neutron.conf.tpl | 6 +-- neutron/templates/job-db-init.yaml | 2 +- neutron/templates/job-db-sync.yaml | 2 +- neutron/templates/job-post.yaml | 2 +- nova/requirements.yaml | 2 +- nova/templates/bin/_init.sh.tpl | 8 ++-- nova/templates/bin/_post.sh.tpl | 24 ++++++------ nova/templates/configmap-bin.yaml | 8 ++-- nova/templates/configmap-etc.yaml | 8 ++-- nova/templates/daemonset-compute.yaml | 6 +-- nova/templates/daemonset-libvirt.yaml | 6 +-- nova/templates/deployment-api-metadata.yaml | 6 +-- nova/templates/deployment-api-osapi.yaml | 6 +-- nova/templates/deployment-conductor.yaml | 6 +-- nova/templates/deployment-consoleauth.yaml | 6 +-- nova/templates/deployment-scheduler.yaml | 6 +-- nova/templates/etc/_nova.conf.tpl | 10 ++--- nova/templates/job-db-init.yaml | 2 +- nova/templates/job-db-sync.yaml | 2 +- nova/templates/job-post.yaml | 2 +- openstack/requirements.yaml | 2 +- postgresql/requirements.yaml | 16 +++++++- rabbitmq/requirements.yaml | 2 +- rabbitmq/templates/configmap-bin.yaml | 2 +- rabbitmq/templates/deployment.yaml | 2 +- 125 files changed, 357 insertions(+), 346 deletions(-) delete mode 100644 common/templates/_hosts.tpl rename {common => helm-toolkit}/.gitignore (100%) rename {common => helm-toolkit}/.helmignore (100%) rename {common => helm-toolkit}/Chart.yaml (81%) rename {common => helm-toolkit}/Makefile (88%) rename {common => helm-toolkit}/requirements.yaml (100%) rename {common => helm-toolkit}/secrets/.gitkeep (100%) rename {common => helm-toolkit}/templates/_endpoints.tpl (80%) rename {common => helm-toolkit}/templates/_funcs.tpl (84%) create mode 100644 helm-toolkit/templates/_hosts.tpl rename {common => helm-toolkit}/templates/scripts/_ks-domain-user.sh.tpl (97%) rename {common => helm-toolkit}/templates/scripts/_ks-endpoints.sh.tpl (97%) rename {common => helm-toolkit}/templates/scripts/_ks-service.sh.tpl (96%) rename {common => helm-toolkit}/templates/scripts/_ks-user.sh.tpl (97%) rename {common => helm-toolkit}/templates/snippets/_k8s_init_dep_check.tpl (72%) rename {common => helm-toolkit}/templates/snippets/_ks_env_openrc.tpl (94%) rename {common => helm-toolkit}/templates/snippets/_ks_env_user_create_openrc.tpl (93%) rename {common => helm-toolkit}/utils/secret-generator/README.md (100%) rename {common => helm-toolkit}/utils/secret-generator/ceph-key.py (100%) rename {common => helm-toolkit}/utils/secret-generator/generate_secrets.sh (100%) rename {common => helm-toolkit}/utils/secret-generator/templates/ceph/admin.keyring.tmpl (100%) rename {common => helm-toolkit}/utils/secret-generator/templates/ceph/bootstrap.keyring.tmpl (100%) rename {common => helm-toolkit}/utils/secret-generator/templates/ceph/ceph.conf.tmpl (100%) rename {common => helm-toolkit}/utils/secret-generator/templates/ceph/mon.keyring.tmpl (100%) rename {common => helm-toolkit}/utils/test/ceph-rbd-test.yaml (100%) rename {common => helm-toolkit}/utils/values/values.py (100%) rename {common => helm-toolkit}/values.yaml (100%) diff --git a/Makefile b/Makefile index 86c6aa342a..7c5cc367f4 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,14 @@ -.PHONY: ceph bootstrap mariadb postgresql keystone memcached rabbitmq common openstack neutron nova cinder heat maas all clean +.PHONY: ceph bootstrap mariadb postgresql keystone memcached rabbitmq helm-toolkit openstack neutron nova cinder heat maas all clean -B64_DIRS := common/secrets -B64_EXCLUDE := $(wildcard common/secrets/*.b64) +B64_DIRS := helm-toolkit/secrets +B64_EXCLUDE := $(wildcard helm-toolkit/secrets/*.b64) CHARTS := ceph mariadb postgresql rabbitmq memcached keystone glance horizon neutron nova cinder heat maas openstack -COMMON_TPL := common/templates/_globals.tpl +TOOLKIT_TPL := helm-toolkit/templates/_globals.tpl -all: common ceph bootstrap mariadb postgresql rabbitmq memcached keystone glance horizon neutron nova cinder heat maas openstack +all: helm-toolkit ceph bootstrap mariadb postgresql rabbitmq memcached keystone glance horizon neutron nova cinder heat maas openstack -common: build-common +helm-toolkit: build-helm-toolkit #ceph: nolint-build-ceph ceph: build-ceph @@ -42,7 +42,7 @@ memcached: build-memcached openstack: build-openstack clean: - $(shell rm -rf common/secrets/*.b64) + $(shell rm -rf helm-toolkit/secrets/*.b64) $(shell rm -rf */templates/_partials.tpl) $(shell rm -rf */templates/_globals.tpl) echo "Removed all .b64, _partials.tpl, and _globals.tpl files" diff --git a/bootstrap/requirements.yaml b/bootstrap/requirements.yaml index c36a1cba34..53782e69b2 100644 --- a/bootstrap/requirements.yaml +++ b/bootstrap/requirements.yaml @@ -1,4 +1,18 @@ -dependencies: -- name: common - repository: http://localhost:8879/charts - version: 0.1.0 +# Copyright 2017 The Openstack-Helm Authors. +# +# 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. + +dependencies: + - name: helm-toolkit + repository: http://localhost:8879/charts + version: 0.1.0 diff --git a/ceph/requirements.yaml b/ceph/requirements.yaml index 7a29aad448..7a05316a84 100644 --- a/ceph/requirements.yaml +++ b/ceph/requirements.yaml @@ -13,6 +13,6 @@ # limitations under the License. dependencies: - - name: common + - name: helm-toolkit repository: http://localhost:8879/charts version: 0.1.0 diff --git a/cinder/requirements.yaml b/cinder/requirements.yaml index 2350b1facb..4b15632039 100644 --- a/cinder/requirements.yaml +++ b/cinder/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - - name: common + - name: helm-toolkit repository: http://localhost:8879/charts version: 0.1.0 diff --git a/cinder/templates/_helpers.tpl b/cinder/templates/_helpers.tpl index 97ab3325eb..9eb1e93682 100644 --- a/cinder/templates/_helpers.tpl +++ b/cinder/templates/_helpers.tpl @@ -4,10 +4,10 @@ # this function returns the endpoint uri for a service, it takes an tuple # input in the form: service-type, endpoint-class, port-name. eg: -# { tuple "orchestration" "public" "api" . | include "endpoint_type_lookup_addr" } +# { tuple "orchestration" "public" "api" . | include "helm-toolkit.endpoint_type_lookup_addr" } # will return the appropriate URI. Once merged this should phase out the above. -{{- define "endpoint_type_lookup_addr" -}} +{{- define "helm-toolkit.endpoint_type_lookup_addr" -}} {{- $type := index . 0 -}} {{- $endpoint := index . 1 -}} {{- $port := index . 2 -}} diff --git a/cinder/templates/configmap-bin.yaml b/cinder/templates/configmap-bin.yaml index b549121df9..2bc8044e84 100644 --- a/cinder/templates/configmap-bin.yaml +++ b/cinder/templates/configmap-bin.yaml @@ -4,10 +4,10 @@ metadata: name: cinder-bin data: db-init.sh: |+ -{{ tuple "bin/_db-init.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_db-init.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} ks-service.sh: |+ -{{- include "common_keystone_service" . | indent 4 }} +{{- include "helm-toolkit.keystone_service" . | indent 4 }} ks-endpoints.sh: |+ -{{- include "common_keystone_endpoints" . | indent 4 }} +{{- include "helm-toolkit.keystone_endpoints" . | indent 4 }} ks-user.sh: |+ -{{- include "common_keystone_user" . | indent 4 }} +{{- include "helm-toolkit.keystone_user" . | indent 4 }} diff --git a/cinder/templates/configmap-etc.yaml b/cinder/templates/configmap-etc.yaml index bb3b8f8c04..b41e82c637 100644 --- a/cinder/templates/configmap-etc.yaml +++ b/cinder/templates/configmap-etc.yaml @@ -4,12 +4,12 @@ metadata: name: cinder-etc data: cinder.conf: |+ -{{ tuple "etc/_cinder.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_cinder.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} api-paste.ini: |+ -{{ tuple "etc/_cinder-api-paste.ini.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_cinder-api-paste.ini.tpl" . | include "helm-toolkit.template" | indent 4 }} policy.json: |+ -{{ tuple "etc/_policy.json.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.template" | indent 4 }} ceph.conf: |+ -{{ tuple "etc/_ceph.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_ceph.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} ceph.client.{{ .Values.ceph.cinder_user }}.keyring: |+ -{{ tuple "etc/_ceph-cinder.keyring.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_ceph-cinder.keyring.tpl" . | include "helm-toolkit.template" | indent 4 }} diff --git a/cinder/templates/deployment-api.yaml b/cinder/templates/deployment-api.yaml index 74b0c59b7a..537edf27cb 100644 --- a/cinder/templates/deployment-api.yaml +++ b/cinder/templates/deployment-api.yaml @@ -19,10 +19,10 @@ spec: labels: app: cinder-api annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/cinder/templates/deployment-scheduler.yaml b/cinder/templates/deployment-scheduler.yaml index 443cd7f9b2..9a653c51ed 100644 --- a/cinder/templates/deployment-scheduler.yaml +++ b/cinder/templates/deployment-scheduler.yaml @@ -19,10 +19,10 @@ spec: labels: app: cinder-scheduler annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/cinder/templates/deployment-volume.yaml b/cinder/templates/deployment-volume.yaml index 4c064029ab..5f8ccdc408 100644 --- a/cinder/templates/deployment-volume.yaml +++ b/cinder/templates/deployment-volume.yaml @@ -19,10 +19,10 @@ spec: labels: app: cinder-volume annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/cinder/templates/etc/_cinder.conf.tpl b/cinder/templates/etc/_cinder.conf.tpl index 1c8c1052da..38eef1bbea 100644 --- a/cinder/templates/etc/_cinder.conf.tpl +++ b/cinder/templates/etc/_cinder.conf.tpl @@ -15,7 +15,7 @@ api_paste_config = /etc/cinder/api-paste.ini glance_api_servers = "{{ .Values.glance.proto }}://{{ .Values.glance.host }}:{{ .Values.glance.port }}" glance_api_version = {{ .Values.glance.version }} -enabled_backends = {{ include "joinListWithComma" .Values.backends.enabled }} +enabled_backends = {{ include "helm-toolkit.joinListWithComma" .Values.backends.enabled }} auth_strategy = keystone os_region_name = {{ .Values.keystone.cinder_region_name }} diff --git a/cinder/templates/job-db-init.yaml b/cinder/templates/job-db-init.yaml index eb057e9af4..fa2cfb56a1 100644 --- a/cinder/templates/job-db-init.yaml +++ b/cinder/templates/job-db-init.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure diff --git a/cinder/templates/job-db-sync.yaml b/cinder/templates/job-db-sync.yaml index 97da3bc262..2a324585d8 100644 --- a/cinder/templates/job-db-sync.yaml +++ b/cinder/templates/job-db-sync.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure diff --git a/cinder/templates/job-ks-endpoints.yaml.yaml b/cinder/templates/job-ks-endpoints.yaml.yaml index 242ba42b4b..efce49941a 100644 --- a/cinder/templates/job-ks-endpoints.yaml.yaml +++ b/cinder/templates/job-ks-endpoints.yaml.yaml @@ -10,7 +10,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure @@ -41,7 +41,7 @@ spec: readOnly: true env: {{- with $env := dict "ksUserSecret" $ksAdminSecret }} -{{- include "env_ks_openrc_tpl" $env | indent 12 }} +{{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }} {{- end }} - name: OS_SVC_ENDPOINT value: {{ $osServiceEndPoint }} @@ -50,7 +50,7 @@ spec: - name: OS_SERVICE_TYPE value: {{ $osServiceType }} - name: OS_SERVICE_ENDPOINT - value: {{ tuple $osServiceType $osServiceEndPoint "api" $envAll | include "endpoint_type_lookup_addr" }} + value: {{ tuple $osServiceType $osServiceEndPoint "api" $envAll | include "helm-toolkit.endpoint_type_lookup_addr" }} {{- end }} {{- end }} volumes: diff --git a/cinder/templates/job-ks-service.yaml b/cinder/templates/job-ks-service.yaml index c63c6103b9..a081d2031a 100644 --- a/cinder/templates/job-ks-service.yaml +++ b/cinder/templates/job-ks-service.yaml @@ -10,7 +10,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure @@ -40,7 +40,7 @@ spec: readOnly: true env: {{- with $env := dict "ksUserSecret" $ksAdminSecret }} -{{- include "env_ks_openrc_tpl" $env | indent 12 }} +{{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }} {{- end }} - name: OS_SERVICE_NAME value: {{ tuple $osServiceType $envAll | include "endpoint_name_lookup" }} diff --git a/cinder/templates/job-ks-user.yaml b/cinder/templates/job-ks-user.yaml index cc383e6f0c..195348c31d 100644 --- a/cinder/templates/job-ks-user.yaml +++ b/cinder/templates/job-ks-user.yaml @@ -11,7 +11,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure @@ -40,12 +40,12 @@ spec: readOnly: true env: {{- with $env := dict "ksUserSecret" $ksAdminSecret }} -{{- include "env_ks_openrc_tpl" $env | indent 12 }} +{{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }} {{- end }} - name: SERVICE_OS_SERVICE_NAME value: "cinder" {{- with $env := dict "ksUserSecret" $ksUserSecret }} -{{- include "env_ks_user_create_openrc_tpl" $env | indent 12 }} +{{- include "helm-toolkit.keystone_user_create_env_vars" $env | indent 12 }} {{- end }} - name: SERVICE_OS_ROLE value: {{ .Values.keystone.cinder_user_role | quote }} diff --git a/common/templates/_hosts.tpl b/common/templates/_hosts.tpl deleted file mode 100644 index 941ece39c6..0000000000 --- a/common/templates/_hosts.tpl +++ /dev/null @@ -1,38 +0,0 @@ -# fqdn -{{- define "region"}}cluster{{- end}} -{{- define "tld"}}local{{- end}} - -{{- define "fqdn" -}} -{{- $fqdn := .Release.Namespace -}} -{{- if .Values.endpoints.fqdn -}} -{{- $fqdn := .Values.endpoints.fqdn -}} -{{- end -}} -{{- $fqdn -}} -{{- end -}} - -#----------------------------------------- -# hosts -#----------------------------------------- - -# infrastructure services -{{- define "rabbitmq_host"}}rabbitmq.{{.Release.Namespace}}.svc.{{ include "region" . }}.{{ include "tld" . }}{{- end}} -{{- define "memcached_host"}}memcached.{{.Release.Namespace}}.svc.{{ include "region" . }}.{{ include "tld" . }}{{- end}} -{{- define "mariadb_host"}}mariadb.{{.Release.Namespace}}.svc.{{ include "region" . }}.{{ include "tld" . }}{{- end}} - -# keystone defaults -{{- define "keystone_db_host"}}{{ include "mariadb_host" . }}{{- end}} -{{- define "keystone_api_endpoint_host_admin"}}keystone-api.{{.Release.Namespace}}.svc.{{ include "region" . }}.{{ include "tld" . }}{{- end}} -{{- define "keystone_api_endpoint_host_internal"}}keystone-api.{{.Release.Namespace}}.svc.{{ include "region" . }}.{{ include "tld" . }}{{- end}} -{{- define "keystone_api_endpoint_host_public"}}keystone-api.{{ include "region" . }}.{{ include "tld" . }}{{- end}} -{{- define "keystone_api_endpoint_host_admin_ext"}}keystone-api.{{ include "region" . }}.{{ include "tld" . }}{{- end}} - -# glance defaults -{{- define "glance_registry_host"}}glance-registry.{{ include "fqdn" . }}{{- end}} - -# nova defaults -{{- define "nova_metadata_host"}}nova-api.{{ include "fqdn" . }}{{- end}} - -# neutron defaults -{{- define "neutron_db_host"}}{{ include "mariadb_host" . }}{{- end}} -{{- define "neutron_rabbit_host"}}{{- include "rabbitmq_host" .}}{{- end}} - diff --git a/glance/requirements.yaml b/glance/requirements.yaml index 2350b1facb..4b15632039 100644 --- a/glance/requirements.yaml +++ b/glance/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - - name: common + - name: helm-toolkit repository: http://localhost:8879/charts version: 0.1.0 diff --git a/glance/templates/bin/_post.sh.tpl b/glance/templates/bin/_post.sh.tpl index d46e924974..3800925de9 100644 --- a/glance/templates/bin/_post.sh.tpl +++ b/glance/templates/bin/_post.sh.tpl @@ -1,42 +1,41 @@ #!/bin/bash set -ex export HOME=/tmp - + ansible localhost -vvv -m kolla_keystone_service -a "service_name=glance \ service_type=image \ description='Openstack Image' \ endpoint_region='{{ .Values.keystone.glance_region_name }}' \ -url='{{ include "endpoint_glance_api_internal" . }}' \ +url='{{ include "helm-toolkit.endpoint_glance_api_internal" . }}' \ interface=admin \ region_name='{{ .Values.keystone.admin_region_name }}' \ -auth='{{ include "keystone_auth" . }}'" \ --e "{'openstack_glance_auth': {{ include "keystone_auth" . }}}" +auth='{{ include "helm-toolkit.keystone_auth" . }}'" \ +-e "{'openstack_glance_auth': {{ include "helm-toolkit.keystone_auth" . }}}" ansible localhost -vvv -m kolla_keystone_service -a "service_name=glance \ service_type=image \ description='Openstack Image' \ endpoint_region='{{ .Values.keystone.glance_region_name }}' \ -url='{{ include "endpoint_glance_api_internal" . }}' \ +url='{{ include "helm-toolkit.endpoint_glance_api_internal" . }}' \ interface=internal \ region_name='{{ .Values.keystone.admin_region_name }}' \ -auth='{{ include "keystone_auth" . }}'" \ --e "{ 'openstack_glance_auth': {{ include "keystone_auth" . }} }" +auth='{{ include "helm-toolkit.keystone_auth" . }}'" \ +-e "{ 'openstack_glance_auth': {{ include "helm-toolkit.keystone_auth" . }} }" ansible localhost -vvv -m kolla_keystone_service -a "service_name=glance \ service_type=image \ description='Openstack Image' \ endpoint_region='{{ .Values.keystone.glance_region_name }}' \ -url='{{ include "endpoint_glance_api_internal" . }}' \ +url='{{ include "helm-toolkit.endpoint_glance_api_internal" . }}' \ interface=public \ region_name='{{ .Values.keystone.admin_region_name }}' \ -auth='{{ include "keystone_auth" . }}'" \ --e "{ 'openstack_glance_auth': {{ include "keystone_auth" . }} }" +auth='{{ include "helm-toolkit.keystone_auth" . }}'" \ +-e "{ 'openstack_glance_auth': {{ include "helm-toolkit.keystone_auth" . }} }" ansible localhost -vvv -m kolla_keystone_user -a "project=service \ user={{ .Values.keystone.glance_user }} \ password={{ .Values.keystone.glance_password }} \ role=admin \ region_name={{ .Values.keystone.admin_region_name }} \ -auth='{{ include "keystone_auth" . }}'" \ --e "{ 'openstack_glance_auth': {{ include "keystone_auth" . }} }" - +auth='{{ include "helm-toolkit.keystone_auth" . }}'" \ +-e "{ 'openstack_glance_auth': {{ include "helm-toolkit.keystone_auth" . }} }" diff --git a/glance/templates/configmap-bin.yaml b/glance/templates/configmap-bin.yaml index fe1e9d9858..ab1f557880 100644 --- a/glance/templates/configmap-bin.yaml +++ b/glance/templates/configmap-bin.yaml @@ -4,6 +4,6 @@ metadata: name: glance-bin data: init.sh: |+ -{{ tuple "bin/_init.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_init.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} post.sh: |+ -{{ tuple "bin/_post.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_post.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} diff --git a/glance/templates/configmap-etc.yaml b/glance/templates/configmap-etc.yaml index ae34308b9a..882cb7ed1c 100644 --- a/glance/templates/configmap-etc.yaml +++ b/glance/templates/configmap-etc.yaml @@ -4,16 +4,16 @@ metadata: name: glance-etc data: ceph.conf: |+ -{{ tuple "etc/_ceph.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_ceph.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} ceph.client.{{ .Values.ceph.glance_user }}.keyring: |+ -{{ tuple "etc/_ceph.client.glance.keyring.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_ceph.client.glance.keyring.tpl" . | include "helm-toolkit.template" | indent 4 }} glance-api.conf: |+ -{{ tuple "etc/_glance-api.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_glance-api.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} glance-api-paste.ini: |+ -{{ tuple "etc/_glance-api-paste.ini.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_glance-api-paste.ini.tpl" . | include "helm-toolkit.template" | indent 4 }} glance-registry.conf: |+ -{{ tuple "etc/_glance-registry.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_glance-registry.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} glance-registry-paste.ini: |+ -{{ tuple "etc/_glance-registry-paste.ini.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_glance-registry-paste.ini.tpl" . | include "helm-toolkit.template" | indent 4 }} policy.json: |+ -{{ tuple "etc/_policy.json.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.template" | indent 4 }} diff --git a/glance/templates/deployment-api.yaml b/glance/templates/deployment-api.yaml index aea5b40841..457da65ddb 100644 --- a/glance/templates/deployment-api.yaml +++ b/glance/templates/deployment-api.yaml @@ -23,10 +23,10 @@ spec: labels: app: glance-api annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/glance/templates/deployment-registry.yaml b/glance/templates/deployment-registry.yaml index f83530a1bf..f7a7845d6a 100644 --- a/glance/templates/deployment-registry.yaml +++ b/glance/templates/deployment-registry.yaml @@ -15,10 +15,10 @@ spec: labels: app: glance-registry annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/glance/templates/job-db-init.yaml b/glance/templates/job-db-init.yaml index 20bff8ce26..154caa6d7b 100644 --- a/glance/templates/job-db-init.yaml +++ b/glance/templates/job-db-init.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure diff --git a/glance/templates/job-db-sync.yaml b/glance/templates/job-db-sync.yaml index 23914b2dbe..a9a01319cd 100644 --- a/glance/templates/job-db-sync.yaml +++ b/glance/templates/job-db-sync.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure diff --git a/glance/templates/job-post.yaml b/glance/templates/job-post.yaml index fbb011ae55..25de07b1cb 100644 --- a/glance/templates/job-post.yaml +++ b/glance/templates/job-post.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/heat/requirements.yaml b/heat/requirements.yaml index 2350b1facb..4b15632039 100644 --- a/heat/requirements.yaml +++ b/heat/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - - name: common + - name: helm-toolkit repository: http://localhost:8879/charts version: 0.1.0 diff --git a/heat/templates/configmap-bin.yaml b/heat/templates/configmap-bin.yaml index 27da8c6947..d2dc798657 100644 --- a/heat/templates/configmap-bin.yaml +++ b/heat/templates/configmap-bin.yaml @@ -4,12 +4,12 @@ metadata: name: heat-bin data: db-init.sh: |+ -{{ tuple "bin/_db-init.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_db-init.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} ks-service.sh: |+ -{{- include "common_keystone_service" . | indent 4 }} +{{- include "helm-toolkit.keystone_service" . | indent 4 }} ks-endpoints.sh: |+ -{{- include "common_keystone_endpoints" . | indent 4 }} +{{- include "helm-toolkit.keystone_endpoints" . | indent 4 }} ks-user.sh: |+ -{{- include "common_keystone_user" . | indent 4 }} +{{- include "helm-toolkit.keystone_user" . | indent 4 }} ks-domain-user.sh: |+ -{{- include "common_keystone_domain_user" . | indent 4 }} +{{- include "helm-toolkit.keystone_domain_user" . | indent 4 }} diff --git a/heat/templates/configmap-etc.yaml b/heat/templates/configmap-etc.yaml index c3039714c8..b426b98662 100644 --- a/heat/templates/configmap-etc.yaml +++ b/heat/templates/configmap-etc.yaml @@ -4,8 +4,8 @@ metadata: name: heat-etc data: heat.conf: |+ -{{ tuple "etc/_heat.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_heat.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} api-paste.ini: |+ -{{ tuple "etc/_heat-api-paste.ini.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_heat-api-paste.ini.tpl" . | include "helm-toolkit.template" | indent 4 }} policy.json: |+ -{{ tuple "etc/_heat-policy.json.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_heat-policy.json.tpl" . | include "helm-toolkit.template" | indent 4 }} diff --git a/heat/templates/deployment-api.yaml b/heat/templates/deployment-api.yaml index dafbba9cda..b92792fe67 100755 --- a/heat/templates/deployment-api.yaml +++ b/heat/templates/deployment-api.yaml @@ -12,7 +12,7 @@ spec: app: heat-api annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/heat/templates/deployment-cfn.yaml b/heat/templates/deployment-cfn.yaml index 11d25b745a..9a88bf85ea 100644 --- a/heat/templates/deployment-cfn.yaml +++ b/heat/templates/deployment-cfn.yaml @@ -12,7 +12,7 @@ spec: app: heat-cfn annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/heat/templates/deployment-cloudwatch.yaml b/heat/templates/deployment-cloudwatch.yaml index 17b17fecd0..829f0f6198 100644 --- a/heat/templates/deployment-cloudwatch.yaml +++ b/heat/templates/deployment-cloudwatch.yaml @@ -12,7 +12,7 @@ spec: app: heat-cloudwatch annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/heat/templates/etc/_heat.conf.tpl b/heat/templates/etc/_heat.conf.tpl index b268a6ecfd..02760a0aea 100644 --- a/heat/templates/etc/_heat.conf.tpl +++ b/heat/templates/etc/_heat.conf.tpl @@ -33,7 +33,7 @@ max_retries = -1 signing_dir = "/var/cache/heat" memcached_servers = "{{ .Values.memcached.host }}:{{ .Values.memcached.port }}" auth_version = v3 -auth_url = {{ include "endpoint_keystone_internal" . }} +auth_url = {{ include "helm-toolkit.endpoint_keystone_internal" . }} auth_type = password region_name = {{ .Values.keystone.heat_region_name }} project_domain_name = {{ .Values.keystone.heat_project_domain }} @@ -74,7 +74,7 @@ auth_section = "trustee_keystone" signing_dir = "/var/cache/heat" memcached_servers = "{{ .Values.memcached.host }}:{{ .Values.memcached.port }}" auth_version = v3 -auth_url = {{ include "endpoint_keystone_internal" . }} +auth_url = {{ include "helm-toolkit.endpoint_keystone_internal" . }} auth_type = password region_name = {{ .Values.keystone.heat_trustee_region_name }} user_domain_name = {{ .Values.keystone.heat_trustee_user_domain }} @@ -87,4 +87,4 @@ endpoint_type = internalURL [clients_keystone] endpoint_type = internalURL -auth_uri = {{ include "endpoint_keystone_internal" . }} +auth_uri = {{ include "helm-toolkit.endpoint_keystone_internal" . }} diff --git a/heat/templates/job-db-init.yaml b/heat/templates/job-db-init.yaml index 4633c7af9c..b02fe8e9e6 100644 --- a/heat/templates/job-db-init.yaml +++ b/heat/templates/job-db-init.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure diff --git a/heat/templates/job-db-sync.yaml b/heat/templates/job-db-sync.yaml index 0ee761c201..1aa88e3c55 100644 --- a/heat/templates/job-db-sync.yaml +++ b/heat/templates/job-db-sync.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure diff --git a/heat/templates/job-ks-endpoints.yaml.yaml b/heat/templates/job-ks-endpoints.yaml.yaml index c5dfd3aaa1..ea0fe20784 100644 --- a/heat/templates/job-ks-endpoints.yaml.yaml +++ b/heat/templates/job-ks-endpoints.yaml.yaml @@ -10,7 +10,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure @@ -41,16 +41,16 @@ spec: readOnly: true env: {{- with $env := dict "ksUserSecret" $ksAdminSecret }} -{{- include "env_ks_openrc_tpl" $env | indent 12 }} +{{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }} {{- end }} - name: OS_SVC_ENDPOINT value: {{ $osServiceEndPoint }} - name: OS_SERVICE_NAME value: {{ $osServiceName }} - name: OS_SERVICE_TYPE - value: {{ tuple $osServiceName $envAll | include "endpoint_type_lookup" }} + value: {{ tuple $osServiceName $envAll | include "helm-toolkit.endpoint_type_lookup" }} - name: OS_SERVICE_ENDPOINT - value: {{ tuple $osServiceName $osServiceEndPoint "api" $envAll | include "endpoint_addr_lookup" }} + value: {{ tuple $osServiceName $osServiceEndPoint "api" $envAll | include "helm-toolkit.endpoint_uri_lookup" }} {{- end }} {{- end }} volumes: diff --git a/heat/templates/job-ks-service.yaml b/heat/templates/job-ks-service.yaml index dd3295a5ec..98e96e17c0 100644 --- a/heat/templates/job-ks-service.yaml +++ b/heat/templates/job-ks-service.yaml @@ -10,7 +10,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure @@ -40,12 +40,12 @@ spec: readOnly: true env: {{- with $env := dict "ksUserSecret" $ksAdminSecret }} -{{- include "env_ks_openrc_tpl" $env | indent 12 }} +{{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }} {{- end }} - name: OS_SERVICE_NAME value: {{ $osServiceName }} - name: OS_SERVICE_TYPE - value: {{ tuple $osServiceName $envAll | include "endpoint_type_lookup" }} + value: {{ tuple $osServiceName $envAll | include "helm-toolkit.endpoint_type_lookup" }} {{- end }} volumes: diff --git a/heat/templates/job-ks-user.yaml b/heat/templates/job-ks-user.yaml index a55743ef02..41a6997705 100644 --- a/heat/templates/job-ks-user.yaml +++ b/heat/templates/job-ks-user.yaml @@ -14,7 +14,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure @@ -43,12 +43,12 @@ spec: readOnly: true env: {{- with $env := dict "ksUserSecret" $ksAdminSecret }} -{{- include "env_ks_openrc_tpl" $env | indent 12 }} +{{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }} {{- end }} - name: SERVICE_OS_SERVICE_NAME value: "heat" {{- with $env := dict "ksUserSecret" $ksUserSecret }} -{{- include "env_ks_user_create_openrc_tpl" $env | indent 12 }} +{{- include "helm-toolkit.keystone_user_create_env_vars" $env | indent 12 }} {{- end }} - name: SERVICE_OS_ROLE value: {{ .Values.keystone.heat_user_role | quote }} @@ -65,12 +65,12 @@ spec: readOnly: true env: {{- with $env := dict "ksUserSecret" $ksAdminSecret }} -{{- include "env_ks_openrc_tpl" $env | indent 12 }} +{{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }} {{- end }} - name: SERVICE_OS_SERVICE_NAME value: "heat" {{- with $env := dict "ksUserSecret" $ksTrusteeUserSecret }} -{{- include "env_ks_user_create_openrc_tpl" $env | indent 12 }} +{{- include "helm-toolkit.keystone_user_create_env_vars" $env | indent 12 }} {{- end }} - name: SERVICE_OS_ROLE value: {{ .Values.keystone.heat_trustee_role | quote }} @@ -87,7 +87,7 @@ spec: readOnly: true env: {{- with $env := dict "ksUserSecret" $ksAdminSecret }} -{{- include "env_ks_openrc_tpl" $env | indent 12 }} +{{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }} {{- end }} - name: SERVICE_OS_SERVICE_NAME value: "heat" diff --git a/heat/templates/statefulset-engine.yaml b/heat/templates/statefulset-engine.yaml index d27bf99665..32f401afbb 100644 --- a/heat/templates/statefulset-engine.yaml +++ b/heat/templates/statefulset-engine.yaml @@ -13,7 +13,7 @@ spec: app: heat-engine annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/common/.gitignore b/helm-toolkit/.gitignore similarity index 100% rename from common/.gitignore rename to helm-toolkit/.gitignore diff --git a/common/.helmignore b/helm-toolkit/.helmignore similarity index 100% rename from common/.helmignore rename to helm-toolkit/.helmignore diff --git a/common/Chart.yaml b/helm-toolkit/Chart.yaml similarity index 81% rename from common/Chart.yaml rename to helm-toolkit/Chart.yaml index bd300afd6d..48c23620e4 100755 --- a/common/Chart.yaml +++ b/helm-toolkit/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v1 description: A base chart for all openstack charts -name: common +name: helm-toolkit version: 0.1.0 diff --git a/common/Makefile b/helm-toolkit/Makefile similarity index 88% rename from common/Makefile rename to helm-toolkit/Makefile index 410cd4cd7c..c9abcb2c1a 100644 --- a/common/Makefile +++ b/helm-toolkit/Makefile @@ -1,4 +1,4 @@ -EXCLUDE := templates/* charts/* Chart.yaml requirement* values.yaml Makefile utils/* common/Chart.yaml +EXCLUDE := templates/* charts/* Chart.yaml requirement* values.yaml Makefile utils/* helm-toolkit/Chart.yaml SECRETS := $(shell find secrets -type f $(foreach e,$(EXCLUDE), -not -path "$(e)") ) templates/_secrets.tpl: Makefile $(SECRETS) diff --git a/common/requirements.yaml b/helm-toolkit/requirements.yaml similarity index 100% rename from common/requirements.yaml rename to helm-toolkit/requirements.yaml diff --git a/common/secrets/.gitkeep b/helm-toolkit/secrets/.gitkeep similarity index 100% rename from common/secrets/.gitkeep rename to helm-toolkit/secrets/.gitkeep diff --git a/common/templates/_endpoints.tpl b/helm-toolkit/templates/_endpoints.tpl similarity index 80% rename from common/templates/_endpoints.tpl rename to helm-toolkit/templates/_endpoints.tpl index fe0a7d1888..b1ffc0a47b 100644 --- a/common/templates/_endpoints.tpl +++ b/helm-toolkit/templates/_endpoints.tpl @@ -7,7 +7,7 @@ # however, constructing this appears to be a # herculean effort in gotpl -{{- define "endpoint_keystone_internal" -}} +{{- define "helm-toolkit.endpoint_keystone_internal" -}} {{- $fqdn := .Release.Namespace -}} {{- if .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}} @@ -17,7 +17,7 @@ {{- end -}} {{- end -}} -{{- define "endpoint_keystone_admin" -}} +{{- define "helm-toolkit.endpoint_keystone_admin" -}} {{- $fqdn := .Release.Namespace -}} {{- if .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}} @@ -27,7 +27,7 @@ {{- end -}} {{- end -}} -{{- define "endpoint_nova_api_internal" -}} +{{- define "helm-toolkit.endpoint_nova_api_internal" -}} {{- $fqdn := .Release.Namespace -}} {{- if .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}} @@ -37,7 +37,7 @@ {{- end -}} {{- end -}} -{{- define "endpoint_nova_metadata_internal" -}} +{{- define "helm-toolkit.endpoint_nova_metadata_internal" -}} {{- $fqdn := .Release.Namespace -}} {{- if .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}} @@ -47,7 +47,7 @@ {{- end -}} {{- end -}} -{{- define "endpoint_nova_novncproxy_internal" -}} +{{- define "helm-toolkit.endpoint_nova_novncproxy_internal" -}} {{- $fqdn := .Release.Namespace -}} {{- if .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}} @@ -57,7 +57,7 @@ {{- end -}} {{- end -}} -{{- define "endpoint_glance_api_internal" -}} +{{- define "helm-toolkit.endpoint_glance_api_internal" -}} {{- $fqdn := .Release.Namespace -}} {{- if .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}} @@ -67,7 +67,7 @@ {{- end -}} {{- end -}} -{{- define "endpoint_glance_registry_internal" -}} +{{- define "helm-toolkit.endpoint_glance_registry_internal" -}} {{- $fqdn := .Release.Namespace -}} {{- if .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}} @@ -77,7 +77,7 @@ {{- end -}} {{- end -}} -{{- define "endpoint_neutron_api_internal" -}} +{{- define "helm-toolkit.endpoint_neutron_api_internal" -}} {{- $fqdn := .Release.Namespace -}} {{- if .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}} @@ -89,10 +89,10 @@ # this function returns the endpoint uri for a service, it takes an tuple # input in the form: service-name, endpoint-class, port-name. eg: -# { tuple "heat" "public" "api" . | include "endpoint_addr_lookup" } +# { tuple "heat" "public" "api" . | include "helm-toolkit.endpoint_uri_lookup" } # will return the appropriate URI. Once merged this should phase out the above. -{{- define "endpoint_addr_lookup" -}} +{{- define "helm-toolkit.endpoint_uri_lookup" -}} {{- $name := index . 0 -}} {{- $endpoint := index . 1 -}} {{- $port := index . 2 -}} @@ -122,7 +122,7 @@ # { tuple heat . | include "ks_endpoint_type" } # will return "orchestration" -{{- define "endpoint_type_lookup" -}} +{{- define "helm-toolkit.endpoint_type_lookup" -}} {{- $name := index . 0 -}} {{- $context := index . 1 -}} {{- $nameNorm := $name | replace "-" "_" }} @@ -134,4 +134,4 @@ #------------------------------- # kolla helpers #------------------------------- -{{ define "keystone_auth" }}{'auth_url':'{{ include "endpoint_keystone_internal" . }}', 'username':'{{ .Values.keystone.admin_user }}','password':'{{ .Values.keystone.admin_password }}','project_name':'{{ .Values.keystone.admin_project_name }}','domain_name':'default'}{{end}} +{{ define "helm-toolkit.keystone_auth" }}{'auth_url':'{{ include "helm-toolkit.endpoint_keystone_internal" . }}', 'username':'{{ .Values.keystone.admin_user }}','password':'{{ .Values.keystone.admin_password }}','project_name':'{{ .Values.keystone.admin_project_name }}','domain_name':'default'}{{end}} diff --git a/common/templates/_funcs.tpl b/helm-toolkit/templates/_funcs.tpl similarity index 84% rename from common/templates/_funcs.tpl rename to helm-toolkit/templates/_funcs.tpl index d3a25177ce..d2393c726a 100644 --- a/common/templates/_funcs.tpl +++ b/helm-toolkit/templates/_funcs.tpl @@ -1,8 +1,8 @@ -{{- define "joinListWithComma" -}} +{{- define "helm-toolkit.joinListWithComma" -}} {{ range $k, $v := . }}{{ if $k }},{{ end }}{{ $v }}{{ end }} {{- end -}} -{{- define "template" -}} +{{- define "helm-toolkit.template" -}} {{- $name := index . 0 -}} {{- $context := index . 1 -}} {{- $v:= $context.Template.Name | split "/" -}} @@ -12,7 +12,7 @@ {{ include $wtf $context }} {{- end -}} -{{- define "hash" -}} +{{- define "helm-toolkit.hash" -}} {{- $name := index . 0 -}} {{- $context := index . 1 -}} {{- $v:= $context.Template.Name | split "/" -}} diff --git a/helm-toolkit/templates/_hosts.tpl b/helm-toolkit/templates/_hosts.tpl new file mode 100644 index 0000000000..48f183f2b2 --- /dev/null +++ b/helm-toolkit/templates/_hosts.tpl @@ -0,0 +1,22 @@ +# fqdn +{{- define "helm-toolkit.region"}}cluster{{- end}} +{{- define "helm-toolkit.tld"}}local{{- end}} + +{{- define "helm-toolkit.fqdn" -}} +{{- $fqdn := .Release.Namespace -}} +{{- if .Values.endpoints.fqdn -}} +{{- $fqdn := .Values.endpoints.fqdn -}} +{{- end -}} +{{- $fqdn -}} +{{- end -}} + +#----------------------------------------- +# hosts +#----------------------------------------- + +# infrastructure services +{{- define "helm-toolkit.rabbitmq_host"}}memcached.{{.Release.Namespace}}.svc.{{ include "helm-toolkit.region" . }}.{{ include "helm-toolkit.tld" . }}{{- end}} +{{- define "helm-toolkit.mariadb_host"}}mariadb.{{.Release.Namespace}}.svc.{{ include "helm-toolkit.region" . }}.{{ include "helm-toolkit.tld" . }}{{- end}} + +# nova defaults +{{- define "helm-toolkit.nova_metadata_host"}}nova-api.{{ include "helm-toolkit.fqdn" . }}{{- end}} diff --git a/common/templates/scripts/_ks-domain-user.sh.tpl b/helm-toolkit/templates/scripts/_ks-domain-user.sh.tpl similarity index 97% rename from common/templates/scripts/_ks-domain-user.sh.tpl rename to helm-toolkit/templates/scripts/_ks-domain-user.sh.tpl index 44bfd27684..e68d8ac384 100644 --- a/common/templates/scripts/_ks-domain-user.sh.tpl +++ b/helm-toolkit/templates/scripts/_ks-domain-user.sh.tpl @@ -1,4 +1,4 @@ -{{- define "common_keystone_domain_user" }} +{{- define "helm-toolkit.keystone_domain_user" }} #!/bin/bash # Copyright 2017 Pete Birley diff --git a/common/templates/scripts/_ks-endpoints.sh.tpl b/helm-toolkit/templates/scripts/_ks-endpoints.sh.tpl similarity index 97% rename from common/templates/scripts/_ks-endpoints.sh.tpl rename to helm-toolkit/templates/scripts/_ks-endpoints.sh.tpl index 1c70a499a1..df1162d289 100755 --- a/common/templates/scripts/_ks-endpoints.sh.tpl +++ b/helm-toolkit/templates/scripts/_ks-endpoints.sh.tpl @@ -1,4 +1,4 @@ -{{- define "common_keystone_endpoints" }} +{{- define "helm-toolkit.keystone_endpoints" }} #!/bin/bash # Copyright 2017 Pete Birley diff --git a/common/templates/scripts/_ks-service.sh.tpl b/helm-toolkit/templates/scripts/_ks-service.sh.tpl similarity index 96% rename from common/templates/scripts/_ks-service.sh.tpl rename to helm-toolkit/templates/scripts/_ks-service.sh.tpl index 7c6f2580f3..1377694703 100644 --- a/common/templates/scripts/_ks-service.sh.tpl +++ b/helm-toolkit/templates/scripts/_ks-service.sh.tpl @@ -1,4 +1,4 @@ -{{- define "common_keystone_service" }} +{{- define "helm-toolkit.keystone_service" }} #!/bin/bash # Copyright 2017 Pete Birley diff --git a/common/templates/scripts/_ks-user.sh.tpl b/helm-toolkit/templates/scripts/_ks-user.sh.tpl similarity index 97% rename from common/templates/scripts/_ks-user.sh.tpl rename to helm-toolkit/templates/scripts/_ks-user.sh.tpl index e815da3049..0e853a7435 100644 --- a/common/templates/scripts/_ks-user.sh.tpl +++ b/helm-toolkit/templates/scripts/_ks-user.sh.tpl @@ -1,4 +1,4 @@ -{{- define "common_keystone_user" }} +{{- define "helm-toolkit.keystone_user" }} #!/bin/bash # Copyright 2017 Pete Birley diff --git a/common/templates/snippets/_k8s_init_dep_check.tpl b/helm-toolkit/templates/snippets/_k8s_init_dep_check.tpl similarity index 72% rename from common/templates/snippets/_k8s_init_dep_check.tpl rename to helm-toolkit/templates/snippets/_k8s_init_dep_check.tpl index b918b10d74..40f4679f0e 100644 --- a/common/templates/snippets/_k8s_init_dep_check.tpl +++ b/helm-toolkit/templates/snippets/_k8s_init_dep_check.tpl @@ -1,4 +1,4 @@ -{{- define "dep_check_init_cont" -}} +{{- define "helm-toolkit.kubernetes_entrypoint_init_container" -}} {{- $envAll := index . 0 -}} {{- $deps := index . 1 -}} { @@ -34,19 +34,19 @@ }, { "name": "DEPENDENCY_SERVICE", - "value": "{{ include "joinListWithComma" $deps.service }}" + "value": "{{ include "helm-toolkit.joinListWithComma" $deps.service }}" }, { "name": "DEPENDENCY_JOBS", - "value": "{{ include "joinListWithComma" $deps.jobs }}" + "value": "{{ include "helm-toolkit.joinListWithComma" $deps.jobs }}" }, { "name": "DEPENDENCY_DAEMONSET", - "value": "{{ include "joinListWithComma" $deps.daemonset }}" + "value": "{{ include "helm-toolkit.joinListWithComma" $deps.daemonset }}" }, { "name": "DEPENDENCY_CONTAINER", - "value": "{{ include "joinListWithComma" $deps.container }}" + "value": "{{ include "helm-toolkit.joinListWithComma" $deps.container }}" }, { "name": "COMMAND", diff --git a/common/templates/snippets/_ks_env_openrc.tpl b/helm-toolkit/templates/snippets/_ks_env_openrc.tpl similarity index 94% rename from common/templates/snippets/_ks_env_openrc.tpl rename to helm-toolkit/templates/snippets/_ks_env_openrc.tpl index 140ce25c97..79b8865934 100644 --- a/common/templates/snippets/_ks_env_openrc.tpl +++ b/helm-toolkit/templates/snippets/_ks_env_openrc.tpl @@ -1,4 +1,4 @@ -{{- define "env_ks_openrc_tpl" }} +{{- define "helm-toolkit.keystone_openrc_env_vars" }} {{- $ksUserSecret := .ksUserSecret }} - name: OS_IDENTITY_API_VERSION value: "3" diff --git a/common/templates/snippets/_ks_env_user_create_openrc.tpl b/helm-toolkit/templates/snippets/_ks_env_user_create_openrc.tpl similarity index 93% rename from common/templates/snippets/_ks_env_user_create_openrc.tpl rename to helm-toolkit/templates/snippets/_ks_env_user_create_openrc.tpl index 5ce6e58077..da94bd3c9b 100644 --- a/common/templates/snippets/_ks_env_user_create_openrc.tpl +++ b/helm-toolkit/templates/snippets/_ks_env_user_create_openrc.tpl @@ -1,4 +1,4 @@ -{{- define "env_ks_user_create_openrc_tpl" }} +{{- define "helm-toolkit.keystone_user_create_env_vars" }} {{- $ksUserSecret := .ksUserSecret }} - name: SERVICE_OS_REGION_NAME valueFrom: diff --git a/common/utils/secret-generator/README.md b/helm-toolkit/utils/secret-generator/README.md similarity index 100% rename from common/utils/secret-generator/README.md rename to helm-toolkit/utils/secret-generator/README.md diff --git a/common/utils/secret-generator/ceph-key.py b/helm-toolkit/utils/secret-generator/ceph-key.py similarity index 100% rename from common/utils/secret-generator/ceph-key.py rename to helm-toolkit/utils/secret-generator/ceph-key.py diff --git a/common/utils/secret-generator/generate_secrets.sh b/helm-toolkit/utils/secret-generator/generate_secrets.sh similarity index 100% rename from common/utils/secret-generator/generate_secrets.sh rename to helm-toolkit/utils/secret-generator/generate_secrets.sh diff --git a/common/utils/secret-generator/templates/ceph/admin.keyring.tmpl b/helm-toolkit/utils/secret-generator/templates/ceph/admin.keyring.tmpl similarity index 100% rename from common/utils/secret-generator/templates/ceph/admin.keyring.tmpl rename to helm-toolkit/utils/secret-generator/templates/ceph/admin.keyring.tmpl diff --git a/common/utils/secret-generator/templates/ceph/bootstrap.keyring.tmpl b/helm-toolkit/utils/secret-generator/templates/ceph/bootstrap.keyring.tmpl similarity index 100% rename from common/utils/secret-generator/templates/ceph/bootstrap.keyring.tmpl rename to helm-toolkit/utils/secret-generator/templates/ceph/bootstrap.keyring.tmpl diff --git a/common/utils/secret-generator/templates/ceph/ceph.conf.tmpl b/helm-toolkit/utils/secret-generator/templates/ceph/ceph.conf.tmpl similarity index 100% rename from common/utils/secret-generator/templates/ceph/ceph.conf.tmpl rename to helm-toolkit/utils/secret-generator/templates/ceph/ceph.conf.tmpl diff --git a/common/utils/secret-generator/templates/ceph/mon.keyring.tmpl b/helm-toolkit/utils/secret-generator/templates/ceph/mon.keyring.tmpl similarity index 100% rename from common/utils/secret-generator/templates/ceph/mon.keyring.tmpl rename to helm-toolkit/utils/secret-generator/templates/ceph/mon.keyring.tmpl diff --git a/common/utils/test/ceph-rbd-test.yaml b/helm-toolkit/utils/test/ceph-rbd-test.yaml similarity index 100% rename from common/utils/test/ceph-rbd-test.yaml rename to helm-toolkit/utils/test/ceph-rbd-test.yaml diff --git a/common/utils/values/values.py b/helm-toolkit/utils/values/values.py similarity index 100% rename from common/utils/values/values.py rename to helm-toolkit/utils/values/values.py diff --git a/common/values.yaml b/helm-toolkit/values.yaml similarity index 100% rename from common/values.yaml rename to helm-toolkit/values.yaml diff --git a/horizon/requirements.yaml b/horizon/requirements.yaml index 2350b1facb..4b15632039 100644 --- a/horizon/requirements.yaml +++ b/horizon/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - - name: common + - name: helm-toolkit repository: http://localhost:8879/charts version: 0.1.0 diff --git a/horizon/templates/configmap-bin.yaml b/horizon/templates/configmap-bin.yaml index 61b4a0213a..fbb1601ceb 100644 --- a/horizon/templates/configmap-bin.yaml +++ b/horizon/templates/configmap-bin.yaml @@ -4,4 +4,4 @@ metadata: name: horizon-bin data: start.sh: | -{{ tuple "bin/_start.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_start.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} diff --git a/horizon/templates/configmap-etc.yaml b/horizon/templates/configmap-etc.yaml index 0f49b8c342..21040a4379 100644 --- a/horizon/templates/configmap-etc.yaml +++ b/horizon/templates/configmap-etc.yaml @@ -4,6 +4,6 @@ metadata: name: horizon-etc data: horizon.conf: | -{{ tuple "etc/_horizon.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_horizon.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} local_settings: | -{{ tuple "etc/_local_settings.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_local_settings.tpl" . | include "helm-toolkit.template" | indent 4 }} diff --git a/horizon/templates/deployment.yaml b/horizon/templates/deployment.yaml index 25b90efb0c..d01ae46bb9 100644 --- a/horizon/templates/deployment.yaml +++ b/horizon/templates/deployment.yaml @@ -19,10 +19,10 @@ spec: labels: app: horizon annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/horizon/templates/etc/_local_settings.tpl b/horizon/templates/etc/_local_settings.tpl index cad765a1ab..b271bc7060 100644 --- a/horizon/templates/etc/_local_settings.tpl +++ b/horizon/templates/etc/_local_settings.tpl @@ -130,7 +130,7 @@ SESSION_ENGINE = 'django.contrib.sessions.backends.cache' CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', - 'LOCATION': '{{ include "memcached_host" . }}' + 'LOCATION': '{{ include "helm-toolkit.rabbitmq_host" . }}' } } @@ -151,7 +151,7 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' # ('http://cluster2.example.com:5000/v2.0', 'cluster2'), #] -OPENSTACK_KEYSTONE_URL = "{{ include "endpoint_keystone_internal" . }}" +OPENSTACK_KEYSTONE_URL = "{{ include "helm-toolkit.endpoint_keystone_internal" . }}" OPENSTACK_KEYSTONE_DEFAULT_ROLE = "_member_" # Enables keystone web single-sign-on if set to True. diff --git a/keystone/requirements.yaml b/keystone/requirements.yaml index 2350b1facb..4b15632039 100644 --- a/keystone/requirements.yaml +++ b/keystone/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - - name: common + - name: helm-toolkit repository: http://localhost:8879/charts version: 0.1.0 diff --git a/keystone/templates/bin/_db-sync.sh.tpl b/keystone/templates/bin/_db-sync.sh.tpl index e4f69c7214..4bca446116 100644 --- a/keystone/templates/bin/_db-sync.sh.tpl +++ b/keystone/templates/bin/_db-sync.sh.tpl @@ -7,7 +7,7 @@ keystone-manage --config-file=/etc/keystone/keystone.conf bootstrap \ --bootstrap-username {{ .Values.keystone.admin_user }} \ --bootstrap-password {{ .Values.keystone.admin_password }} \ --bootstrap-project-name {{ .Values.keystone.admin_project_name }} \ - --bootstrap-admin-url {{ include "endpoint_keystone_admin" . }} \ - --bootstrap-public-url {{ include "endpoint_keystone_internal" . }} \ - --bootstrap-internal-url {{ include "endpoint_keystone_internal" . }} \ + --bootstrap-admin-url {{ include "helm-toolkit.endpoint_keystone_admin" . }} \ + --bootstrap-public-url {{ include "helm-toolkit.endpoint_keystone_internal" . }} \ + --bootstrap-internal-url {{ include "helm-toolkit.endpoint_keystone_internal" . }} \ --bootstrap-region-id {{ .Values.keystone.admin_region_name }} diff --git a/keystone/templates/bin/_init.sh.tpl b/keystone/templates/bin/_init.sh.tpl index f48157a2ce..48881ad666 100644 --- a/keystone/templates/bin/_init.sh.tpl +++ b/keystone/templates/bin/_init.sh.tpl @@ -3,14 +3,14 @@ set -ex export HOME=/tmp ansible localhost -vvv \ - -m mysql_db -a "login_host='{{ include "keystone_db_host" . }}' \ + -m mysql_db -a "login_host='{{ include "helm-toolkit.mariadb_host" . }}' \ login_port='{{ .Values.database.port }}' \ login_user='{{ .Values.database.root_user }}' \ login_password='{{ .Values.database.root_password }}' \ name='{{ .Values.database.keystone_database_name }}'" ansible localhost -vvv \ - -m mysql_user -a "login_host='{{ include "keystone_db_host" . }}' \ + -m mysql_user -a "login_host='{{ include "helm-toolkit.mariadb_host" . }}' \ login_port='{{ .Values.database.port }}' \ login_user='{{ .Values.database.root_user }}' \ login_password='{{ .Values.database.root_password }}' \ diff --git a/keystone/templates/configmap-bin.yaml b/keystone/templates/configmap-bin.yaml index 76e0f7cf14..a8b51f59f9 100644 --- a/keystone/templates/configmap-bin.yaml +++ b/keystone/templates/configmap-bin.yaml @@ -4,8 +4,8 @@ metadata: name: keystone-bin data: db-sync.sh: | -{{ tuple "bin/_db-sync.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_db-sync.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} init.sh: | -{{ tuple "bin/_init.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_init.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} start.sh: | -{{ tuple "bin/_start.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_start.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} diff --git a/keystone/templates/configmap-etc.yaml b/keystone/templates/configmap-etc.yaml index 3ad7dc8293..484e151cea 100644 --- a/keystone/templates/configmap-etc.yaml +++ b/keystone/templates/configmap-etc.yaml @@ -4,14 +4,14 @@ metadata: name: keystone-etc data: keystone.conf: |+ -{{ tuple "etc/_keystone.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_keystone.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} mpm_event.conf: |+ -{{ tuple "etc/_mpm_event.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_mpm_event.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} wsgi-keystone.conf: |+ -{{ tuple "etc/_wsgi-keystone.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_wsgi-keystone.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} policy.json: |+ -{{ tuple "etc/_policy.json.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.template" | indent 4 }} keystone-paste.ini: |+ -{{ tuple "etc/_keystone-paste.ini.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_keystone-paste.ini.tpl" . | include "helm-toolkit.template" | indent 4 }} sso_callback_template.html: |+ -{{ tuple "etc/_sso_callback_template.html.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_sso_callback_template.html.tpl" . | include "helm-toolkit.template" | indent 4 }} diff --git a/keystone/templates/deployment.yaml b/keystone/templates/deployment.yaml index 9b1c58b2f5..210ef922cf 100644 --- a/keystone/templates/deployment.yaml +++ b/keystone/templates/deployment.yaml @@ -19,10 +19,10 @@ spec: labels: app: keystone-api annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependecies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependecies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/keystone/templates/etc/_keystone.conf.tpl b/keystone/templates/etc/_keystone.conf.tpl index 573eba9e0e..5be96e4d59 100644 --- a/keystone/templates/etc/_keystone.conf.tpl +++ b/keystone/templates/etc/_keystone.conf.tpl @@ -4,18 +4,18 @@ use_syslog = False use_stderr = True [database] -connection = mysql+pymysql://{{ .Values.database.keystone_user }}:{{ .Values.database.keystone_password }}@{{ include "keystone_db_host" . }}/{{ .Values.database.keystone_database_name }} +connection = mysql+pymysql://{{ .Values.database.keystone_user }}:{{ .Values.database.keystone_password }}@{{ include "helm-toolkit.mariadb_host" . }}/{{ .Values.database.keystone_database_name }} max_retries = -1 [memcache] -servers = {{ include "memcached_host" . }}:11211 +servers = {{ include "helm-toolkit.rabbitmq_host" . }}:11211 [token] provider = {{ .Values.api.token.provider }} [cache] backend = dogpile.cache.memcached -memcache_servers = {{ include "memcached_host" . }}:11211 +memcache_servers = {{ include "helm-toolkit.rabbitmq_host" . }}:11211 config_prefix = cache.keystone enabled = True diff --git a/keystone/templates/job-db-init.yaml b/keystone/templates/job-db-init.yaml index 332ed2e1b6..9a9fb0e658 100644 --- a/keystone/templates/job-db-init.yaml +++ b/keystone/templates/job-db-init.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure diff --git a/keystone/templates/job-db-sync.yaml b/keystone/templates/job-db-sync.yaml index 0b98976172..bc02a98725 100644 --- a/keystone/templates/job-db-sync.yaml +++ b/keystone/templates/job-db-sync.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependecies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependecies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure diff --git a/maas/requirements.yaml b/maas/requirements.yaml index 2350b1facb..4b15632039 100644 --- a/maas/requirements.yaml +++ b/maas/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - - name: common + - name: helm-toolkit repository: http://localhost:8879/charts version: 0.1.0 diff --git a/maas/templates/configmap-bin.yaml b/maas/templates/configmap-bin.yaml index ef95068fb5..f2a9462626 100644 --- a/maas/templates/configmap-bin.yaml +++ b/maas/templates/configmap-bin.yaml @@ -4,12 +4,12 @@ metadata: name: maas-bin data: start.sh: | -{{ tuple "bin/_start.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_start.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} maas-region-controller.postinst: | -{{ tuple "bin/_maas-region-controller.postinst.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_maas-region-controller.postinst.tpl" . | include "helm_toolkit.template" | indent 4 }} import-boot-resources.sh: | -{{ tuple "bin/_import-boot-resources.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_import-boot-resources.sh.tpl" . | include "helm_toolkit.template" | indent 4 }} job-readiness.sh: | -{{ tuple "bin/_job-readiness.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_job-readiness.sh.tpl" . | include "helm_toolkit.template" | indent 4 }} register-rack-controller.sh: | -{{ tuple "bin/_register-rack-controller.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_register-rack-controller.sh.tpl" . | include "helm_toolkit.template" | indent 4 }} diff --git a/maas/templates/configmap-etc.yaml b/maas/templates/configmap-etc.yaml index 5dae1fb15b..37e99010b8 100644 --- a/maas/templates/configmap-etc.yaml +++ b/maas/templates/configmap-etc.yaml @@ -4,8 +4,8 @@ metadata: name: maas-etc data: named.conf.options: |+ -{{ tuple "etc/_region-dns-config.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_region-dns-config.tpl" . | include "helm-toolkit.template" | indent 4 }} secret: | -{{ tuple "etc/_secret.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_secret.tpl" . | include "helm_toolkit.template" | indent 4 }} maas-region-controller.conf: | -{{ tuple "etc/_postgresql-config.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_postgresql-config.tpl" . | include "helm_toolkit.template" | indent 4 }} diff --git a/mariadb/requirements.yaml b/mariadb/requirements.yaml index 65cf88221f..53782e69b2 100644 --- a/mariadb/requirements.yaml +++ b/mariadb/requirements.yaml @@ -13,6 +13,6 @@ # limitations under the License. dependencies: - - name: common + - name: helm-toolkit repository: http://localhost:8879/charts version: 0.1.0 diff --git a/mariadb/templates/configmap-bin.yaml b/mariadb/templates/configmap-bin.yaml index 7c459790e0..8c5ecbf29e 100644 --- a/mariadb/templates/configmap-bin.yaml +++ b/mariadb/templates/configmap-bin.yaml @@ -18,12 +18,12 @@ metadata: name: mariadb-bin data: start.sh: | -{{ tuple "bin/_start.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_start.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} peer-finder.py: | -{{ tuple "bin/_peer-finder.py.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_peer-finder.py.tpl" . | include "helm-toolkit.template" | indent 4 }} readiness.py: | -{{ tuple "bin/_readiness.py.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_readiness.py.tpl" . | include "helm-toolkit.template" | indent 4 }} bootstrap-db.sh: | -{{ tuple "bin/_bootstrap-db.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_bootstrap-db.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} seed.sh: | -{{ tuple "bin/_seed.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_seed.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} diff --git a/mariadb/templates/configmap-etc.yaml b/mariadb/templates/configmap-etc.yaml index 006357b6d7..c378787dd9 100644 --- a/mariadb/templates/configmap-etc.yaml +++ b/mariadb/templates/configmap-etc.yaml @@ -18,18 +18,18 @@ metadata: name: mariadb-etc data: charsets.cnf: | -{{ tuple "etc/_charsets.cnf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_charsets.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }} engine.cnf: | -{{ tuple "etc/_engine.cnf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_engine.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }} my.cnf: | -{{ tuple "etc/_galera-my.cnf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_galera-my.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }} log.cnf: | -{{ tuple "etc/_log.cnf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_log.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }} pid.cnf: | -{{ tuple "etc/_pid.cnf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_pid.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }} tuning.cnf: | -{{ tuple "etc/_tuning.cnf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_tuning.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }} networking.cnf: | -{{ tuple "etc/_networking.cnf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_networking.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }} wsrep.cnf: | -{{ tuple "etc/_wsrep.cnf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_wsrep.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }} diff --git a/memcached/requirements.yaml b/memcached/requirements.yaml index 2350b1facb..4b15632039 100644 --- a/memcached/requirements.yaml +++ b/memcached/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - - name: common + - name: helm-toolkit repository: http://localhost:8879/charts version: 0.1.0 diff --git a/neutron/requirements.yaml b/neutron/requirements.yaml index 2350b1facb..4b15632039 100644 --- a/neutron/requirements.yaml +++ b/neutron/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - - name: common + - name: helm-toolkit repository: http://localhost:8879/charts version: 0.1.0 diff --git a/neutron/templates/bin/_init.sh.tpl b/neutron/templates/bin/_init.sh.tpl index 1498bbc233..2520d8e53a 100644 --- a/neutron/templates/bin/_init.sh.tpl +++ b/neutron/templates/bin/_init.sh.tpl @@ -2,13 +2,13 @@ set -ex export HOME=/tmp -ansible localhost -vvv -m mysql_db -a "login_host='{{ include "neutron_db_host" . }}' \ +ansible localhost -vvv -m mysql_db -a "login_host='{{ include "helm-toolkit.mariadb_host" . }}' \ login_port='{{ .Values.database.port }}' \ login_user='{{ .Values.database.root_user }}' \ login_password='{{ .Values.database.root_password }}' \ name='{{ .Values.database.neutron_database_name }}'" -ansible localhost -vvv -m mysql_user -a "login_host='{{ include "neutron_db_host" . }}' \ +ansible localhost -vvv -m mysql_user -a "login_host='{{ include "helm-toolkit.mariadb_host" . }}' \ login_port='{{ .Values.database.port }}' \ login_user='{{ .Values.database.root_user }}' \ login_password='{{ .Values.database.root_password }}' \ diff --git a/neutron/templates/bin/_post.sh.tpl b/neutron/templates/bin/_post.sh.tpl index 77c818121d..d779733b6d 100644 --- a/neutron/templates/bin/_post.sh.tpl +++ b/neutron/templates/bin/_post.sh.tpl @@ -6,36 +6,36 @@ ansible localhost -vvv -m kolla_keystone_service -a "service_name=neutron \ service_type=network \ description='Openstack Networking' \ endpoint_region={{ .Values.keystone.neutron_region_name }} \ -url='{{ include "endpoint_neutron_api_internal" . }}' \ +url='{{ include "helm-toolkit.endpoint_neutron_api_internal" . }}' \ interface=admin \ region_name={{ .Values.keystone.admin_region_name }} \ -auth='{{ include "keystone_auth" .}}'" \ --e "{'openstack_neutron_auth':{{ include "keystone_auth" .}}}" +auth='{{ include "helm-toolkit.keystone_auth" .}}'" \ +-e "{'openstack_neutron_auth':{{ include "helm-toolkit.keystone_auth" .}}}" ansible localhost -vvv -m kolla_keystone_service -a "service_name=neutron \ service_type=network \ description='Openstack Networking' \ endpoint_region={{ .Values.keystone.neutron_region_name }} \ -url='{{ include "endpoint_neutron_api_internal" . }}' \ +url='{{ include "helm-toolkit.endpoint_neutron_api_internal" . }}' \ interface=internal \ region_name={{ .Values.keystone.admin_region_name }} \ -auth='{{ include "keystone_auth" .}}'" \ --e "{'openstack_neutron_auth':{{ include "keystone_auth" .}}}" +auth='{{ include "helm-toolkit.keystone_auth" .}}'" \ +-e "{'openstack_neutron_auth':{{ include "helm-toolkit.keystone_auth" .}}}" ansible localhost -vvv -m kolla_keystone_service -a "service_name=neutron \ service_type=network \ description='Openstack Networking' \ endpoint_region={{ .Values.keystone.neutron_region_name }} \ -url='{{ include "endpoint_neutron_api_internal" . }}' \ +url='{{ include "helm-toolkit.endpoint_neutron_api_internal" . }}' \ interface=public \ region_name={{ .Values.keystone.admin_region_name }} \ -auth='{{ include "keystone_auth" .}}'" \ --e "{'openstack_neutron_auth':{{ include "keystone_auth" .}}}" +auth='{{ include "helm-toolkit.keystone_auth" .}}'" \ +-e "{'openstack_neutron_auth':{{ include "helm-toolkit.keystone_auth" .}}}" ansible localhost -vvv -m kolla_keystone_user -a "project=service \ user={{ .Values.keystone.neutron_user }} \ password={{ .Values.keystone.neutron_password }} \ role=admin \ region_name={{ .Values.keystone.neutron_region_name }} \ -auth='{{ include "keystone_auth" .}}'" \ --e "{'openstack_neutron_auth':{{ include "keystone_auth" .}}}" +auth='{{ include "helm-toolkit.keystone_auth" .}}'" \ +-e "{'openstack_neutron_auth':{{ include "helm-toolkit.keystone_auth" .}}}" diff --git a/neutron/templates/configmap-bin.yaml b/neutron/templates/configmap-bin.yaml index c74d116902..7b44ceba8b 100644 --- a/neutron/templates/configmap-bin.yaml +++ b/neutron/templates/configmap-bin.yaml @@ -4,14 +4,14 @@ metadata: name: neutron-bin data: init.sh: | -{{ tuple "bin/_init.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_init.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} neutron-openvswitch-agent.sh: | -{{ tuple "bin/_neutron-openvswitch-agent.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_neutron-openvswitch-agent.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} openvswitch-db-server.sh: | -{{ tuple "bin/_openvswitch-db-server.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_openvswitch-db-server.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} openvswitch-ensure-configured.sh: | -{{ tuple "bin/_openvswitch-ensure-configured.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_openvswitch-ensure-configured.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} openvswitch-vswitchd.sh: | -{{ tuple "bin/_openvswitch-vswitchd.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_openvswitch-vswitchd.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} post.sh: | -{{ tuple "bin/_post.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_post.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} diff --git a/neutron/templates/configmap-etc.yaml b/neutron/templates/configmap-etc.yaml index 7019200e0c..2b98170ba3 100644 --- a/neutron/templates/configmap-etc.yaml +++ b/neutron/templates/configmap-etc.yaml @@ -4,16 +4,16 @@ metadata: name: neutron-etc data: dhcp-agent.ini: | -{{ tuple "etc/_dhcp-agent.ini.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_dhcp-agent.ini.tpl" . | include "helm-toolkit.template" | indent 4 }} l3-agent.ini: | -{{ tuple "etc/_l3-agent.ini.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_l3-agent.ini.tpl" . | include "helm-toolkit.template" | indent 4 }} metadata-agent.ini: | -{{ tuple "etc/_metadata-agent.ini.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_metadata-agent.ini.tpl" . | include "helm-toolkit.template" | indent 4 }} ml2-conf.ini: | -{{ tuple "etc/_ml2-conf.ini.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_ml2-conf.ini.tpl" . | include "helm-toolkit.template" | indent 4 }} neutron.conf: | -{{ tuple "etc/_neutron.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_neutron.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} resolv.conf: | -{{ tuple "etc/_resolv.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_resolv.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} dnsmasq.conf: "" \ No newline at end of file diff --git a/neutron/templates/daemonset-dhcp-agent.yaml b/neutron/templates/daemonset-dhcp-agent.yaml index 452d7ab76d..6a6cef1ead 100644 --- a/neutron/templates/daemonset-dhcp-agent.yaml +++ b/neutron/templates/daemonset-dhcp-agent.yaml @@ -10,10 +10,10 @@ spec: labels: app: neutron-dhcp-agent annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/neutron/templates/daemonset-l3-agent.yaml b/neutron/templates/daemonset-l3-agent.yaml index 32779333b0..61ac331d6d 100644 --- a/neutron/templates/daemonset-l3-agent.yaml +++ b/neutron/templates/daemonset-l3-agent.yaml @@ -10,10 +10,10 @@ spec: labels: app: neutron-l3-agent annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/neutron/templates/daemonset-metadata-agent.yaml b/neutron/templates/daemonset-metadata-agent.yaml index 3a0474a9ee..76d37be13d 100644 --- a/neutron/templates/daemonset-metadata-agent.yaml +++ b/neutron/templates/daemonset-metadata-agent.yaml @@ -10,10 +10,10 @@ spec: labels: app: neutron-metadata-agent annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/neutron/templates/daemonset-ovs-agent.yaml b/neutron/templates/daemonset-ovs-agent.yaml index 0d21319504..756b71145d 100644 --- a/neutron/templates/daemonset-ovs-agent.yaml +++ b/neutron/templates/daemonset-ovs-agent.yaml @@ -10,10 +10,10 @@ spec: labels: app: ovs-agent annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/neutron/templates/daemonset-ovs-db.yaml b/neutron/templates/daemonset-ovs-db.yaml index a65af8813b..6e0f3d427c 100644 --- a/neutron/templates/daemonset-ovs-db.yaml +++ b/neutron/templates/daemonset-ovs-db.yaml @@ -8,8 +8,8 @@ spec: labels: app: ovs-db annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} spec: nodeSelector: {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }} diff --git a/neutron/templates/daemonset-ovs-vswitchd.yaml b/neutron/templates/daemonset-ovs-vswitchd.yaml index 3ab6f550f1..37b1794b76 100644 --- a/neutron/templates/daemonset-ovs-vswitchd.yaml +++ b/neutron/templates/daemonset-ovs-vswitchd.yaml @@ -8,8 +8,8 @@ spec: labels: app: ovs-vswitchd annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} spec: nodeSelector: {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }} diff --git a/neutron/templates/deployment-server.yaml b/neutron/templates/deployment-server.yaml index 81ae81313c..a7f969d4e1 100644 --- a/neutron/templates/deployment-server.yaml +++ b/neutron/templates/deployment-server.yaml @@ -19,10 +19,10 @@ spec: labels: app: neutron-server annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/neutron/templates/etc/_metadata-agent.ini.tpl b/neutron/templates/etc/_metadata-agent.ini.tpl index f6cd65e6d7..7fa4ae81c8 100644 --- a/neutron/templates/etc/_metadata-agent.ini.tpl +++ b/neutron/templates/etc/_metadata-agent.ini.tpl @@ -3,8 +3,8 @@ debug = {{ .Values.metadata_agent.default.debug }} # Neutron credentials for API access auth_plugin = password -auth_url = {{ include "endpoint_keystone_admin" . }} -auth_uri = {{ include "endpoint_keystone_internal" . }} +auth_url = {{ include "helm-toolkit.endpoint_keystone_admin" . }} +auth_uri = {{ include "helm-toolkit.endpoint_keystone_internal" . }} auth_region = {{ .Values.keystone.neutron_region_name }} admin_tenant_name = service project_domain_id = default @@ -15,7 +15,7 @@ password = {{ .Values.keystone.admin_password }} endpoint_type = adminURL # Nova metadata service IP and port -nova_metadata_ip = {{ include "nova_metadata_host" . }} +nova_metadata_ip = {{ include "helm-toolkit.nova_metadata_host" . }} nova_metadata_port = {{ .Values.network.port.metadata }} nova_metadata_protocol = http diff --git a/neutron/templates/etc/_ml2-conf.ini.tpl b/neutron/templates/etc/_ml2-conf.ini.tpl index 7219aa7f29..dfc16d1430 100644 --- a/neutron/templates/etc/_ml2-conf.ini.tpl +++ b/neutron/templates/etc/_ml2-conf.ini.tpl @@ -1,11 +1,11 @@ [ml2] # Changing type_drivers after bootstrap can lead to database inconsistencies -type_drivers = {{ include "joinListWithComma" .Values.ml2.type_drivers }} +type_drivers = {{ include "helm-toolkit.joinListWithComma" .Values.ml2.type_drivers }} tenant_network_types = {{ .Values.ml2.tenant_network_types }} -mechanism_drivers = {{ include "joinListWithComma" .Values.ml2.mechanism_drivers }} +mechanism_drivers = {{ include "helm-toolkit.joinListWithComma" .Values.ml2.mechanism_drivers }} [ml2_type_flat] -flat_networks = {{ include "joinListWithComma" .Values.ml2.ml2_type_flat.flat_networks }} +flat_networks = {{ include "helm-toolkit.joinListWithComma" .Values.ml2.ml2_type_flat.flat_networks }} [ml2_type_gre] # (ListOpt) Comma-separated list of : tuples enumerating ranges @@ -35,7 +35,7 @@ arp_responder = false {{- end }} [ovs] -bridge_mappings = {{ include "joinListWithComma" .Values.ml2.ovs.bridge_mappings }} +bridge_mappings = {{ include "helm-toolkit.joinListWithComma" .Values.ml2.ovs.bridge_mappings }} tenant_network_type = {{ .Values.ml2.agent.tunnel_types }} [vxlan] diff --git a/neutron/templates/etc/_neutron.conf.tpl b/neutron/templates/etc/_neutron.conf.tpl index 60849d21d2..0a6eee5241 100644 --- a/neutron/templates/etc/_neutron.conf.tpl +++ b/neutron/templates/etc/_neutron.conf.tpl @@ -33,7 +33,7 @@ router_auto_schedule = True transport_url = rabbit://{{ .Values.rabbitmq.admin_user }}:{{ .Values.rabbitmq.admin_password }}@{{ .Values.rabbitmq.address }}:{{ .Values.rabbitmq.port }} [nova] -auth_url = {{ include "endpoint_keystone_internal" . }} +auth_url = {{ include "helm-toolkit.endpoint_keystone_internal" . }} auth_plugin = password project_domain_id = default user_domain_id = default @@ -55,11 +55,11 @@ l2_population = true arp_responder = true [database] -connection = mysql+pymysql://{{ .Values.database.neutron_user }}:{{ .Values.database.neutron_password }}@{{ include "neutron_db_host" . }}/{{ .Values.database.neutron_database_name }} +connection = mysql+pymysql://{{ .Values.database.neutron_user }}:{{ .Values.database.neutron_password }}@{{ include "helm-toolkit.mariadb_host" . }}/{{ .Values.database.neutron_database_name }} max_retries = -1 [keystone_authtoken] -auth_url = {{ include "endpoint_keystone_internal" . }} +auth_url = {{ include "helm-toolkit.endpoint_keystone_internal" . }} auth_type = password project_domain_id = default user_domain_id = default diff --git a/neutron/templates/job-db-init.yaml b/neutron/templates/job-db-init.yaml index b04d7c6338..2b065c6715 100644 --- a/neutron/templates/job-db-init.yaml +++ b/neutron/templates/job-db-init.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure diff --git a/neutron/templates/job-db-sync.yaml b/neutron/templates/job-db-sync.yaml index ea9d30bc99..e634193feb 100644 --- a/neutron/templates/job-db-sync.yaml +++ b/neutron/templates/job-db-sync.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure diff --git a/neutron/templates/job-post.yaml b/neutron/templates/job-post.yaml index 9901e57e42..2d9b012b91 100644 --- a/neutron/templates/job-post.yaml +++ b/neutron/templates/job-post.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure diff --git a/nova/requirements.yaml b/nova/requirements.yaml index 2350b1facb..4b15632039 100644 --- a/nova/requirements.yaml +++ b/nova/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - - name: common + - name: helm-toolkit repository: http://localhost:8879/charts version: 0.1.0 diff --git a/nova/templates/bin/_init.sh.tpl b/nova/templates/bin/_init.sh.tpl index b175ca7d5a..b6db84117a 100644 --- a/nova/templates/bin/_init.sh.tpl +++ b/nova/templates/bin/_init.sh.tpl @@ -5,13 +5,13 @@ echo "Hello World" set -ex export HOME=/tmp -ansible localhost -vvv -m mysql_db -a "login_host='{{ include "keystone_db_host" . }}' \ +ansible localhost -vvv -m mysql_db -a "login_host='{{ include "helm-toolkit.mariadb_host" . }}' \ login_port='{{ .Values.database.port }}' \ login_user='{{ .Values.database.root_user }}' \ login_password='{{ .Values.database.root_password }}' \ name='{{ .Values.database.nova_database_name }}'" -ansible localhost -vvv -m mysql_user -a "login_host='{{ include "keystone_db_host" . }}' \ +ansible localhost -vvv -m mysql_user -a "login_host='{{ include "helm-toolkit.mariadb_host" . }}' \ login_port='{{ .Values.database.port }}' \ login_user='{{ .Values.database.root_user }}' \ login_password='{{ .Values.database.root_password }}' \ @@ -20,13 +20,13 @@ password='{{ .Values.database.nova_password }}' \ host='%' \ priv='{{ .Values.database.nova_database_name }}.*:ALL' append_privs='yes'" -ansible localhost -vvv -m mysql_db -a "login_host='{{ include "keystone_db_host" . }}' \ +ansible localhost -vvv -m mysql_db -a "login_host='{{ include "helm-toolkit.mariadb_host" . }}' \ login_port='{{ .Values.database.port }}' \ login_user='{{ .Values.database.root_user }}' \ login_password='{{ .Values.database.root_password }}' \ name='{{ .Values.database.nova_api_database_name }}'" -ansible localhost -vvv -m mysql_user -a "login_host='{{ include "keystone_db_host" . }}' \ +ansible localhost -vvv -m mysql_user -a "login_host='{{ include "helm-toolkit.mariadb_host" . }}' \ login_port='{{ .Values.database.port }}' \ login_user='{{ .Values.database.root_user }}' \ login_password='{{ .Values.database.root_password }}' \ diff --git a/nova/templates/bin/_post.sh.tpl b/nova/templates/bin/_post.sh.tpl index 6792568029..46bc55bff9 100644 --- a/nova/templates/bin/_post.sh.tpl +++ b/nova/templates/bin/_post.sh.tpl @@ -6,39 +6,39 @@ ansible localhost -vvv -m kolla_keystone_service -a "service_name=nova \ service_type=compute \ description='Openstack Compute' \ endpoint_region={{ .Values.keystone.nova_region_name }} \ -url='{{ include "endpoint_nova_api_internal" . }}' \ +url='{{ include "helm-toolkit.endpoint_nova_api_internal" . }}' \ interface=admin \ region_name={{ .Values.keystone.admin_region_name }} \ -auth='{{ include "keystone_auth" .}}'" \ --e "{'openstack_nova_auth':{{ include "keystone_auth" .}}}" +auth='{{ include "helm-toolkit.keystone_auth" .}}'" \ +-e "{'openstack_nova_auth':{{ include "helm-toolkit.keystone_auth" .}}}" ansible localhost -vvv -m kolla_keystone_service -a "service_name=nova \ service_type=compute \ description='Openstack Compute' \ endpoint_region={{ .Values.keystone.nova_region_name }} \ -url='{{ include "endpoint_nova_api_internal" . }}' \ +url='{{ include "helm-toolkit.endpoint_nova_api_internal" . }}' \ interface=internal \ region_name={{ .Values.keystone.admin_region_name }} \ -auth='{{ include "keystone_auth" .}}'" \ --e "{'openstack_nova_auth':{{ include "keystone_auth" .}}}" +auth='{{ include "helm-toolkit.keystone_auth" .}}'" \ +-e "{'openstack_nova_auth':{{ include "helm-toolkit.keystone_auth" .}}}" ansible localhost -vvv -m kolla_keystone_service -a "service_name=nova \ service_type=compute \ description='Openstack Compute' \ endpoint_region={{ .Values.keystone.nova_region_name }} \ -url='{{ include "endpoint_nova_api_internal" . }}' \ +url='{{ include "helm-toolkit.endpoint_nova_api_internal" . }}' \ interface=public \ region_name={{ .Values.keystone.admin_region_name }} \ -auth='{{ include "keystone_auth" .}}'" \ --e "{'openstack_nova_auth':{{ include "keystone_auth" .}}}" +auth='{{ include "helm-toolkit.keystone_auth" .}}'" \ +-e "{'openstack_nova_auth':{{ include "helm-toolkit.keystone_auth" .}}}" ansible localhost -vvv -m kolla_keystone_user -a "project=service \ user={{ .Values.keystone.nova_user }} \ password={{ .Values.keystone.nova_password }} \ role=admin \ region_name={{ .Values.keystone.nova_region_name }} \ -auth='{{ include "keystone_auth" .}}'" \ --e "{'openstack_nova_auth':{{ include "keystone_auth" .}}}" +auth='{{ include "helm-toolkit.keystone_auth" .}}'" \ +-e "{'openstack_nova_auth':{{ include "helm-toolkit.keystone_auth" .}}}" cat </tmp/openrc export OS_USERNAME={{.Values.keystone.admin_user}} @@ -46,7 +46,7 @@ export OS_PASSWORD={{.Values.keystone.admin_password}} export OS_PROJECT_DOMAIN_NAME={{.Values.keystone.domain_name}} export OS_USER_DOMAIN_NAME={{.Values.keystone.domain_name}} export OS_PROJECT_NAME={{.Values.keystone.admin_project_name}} -export OS_AUTH_URL={{include "endpoint_keystone_internal" .}} +export OS_AUTH_URL={{include "helm-toolkit.endpoint_keystone_internal" .}} export OS_AUTH_STRATEGY=keystone export OS_REGION_NAME={{.Values.keystone.admin_region_name}} export OS_INSECURE=1 diff --git a/nova/templates/configmap-bin.yaml b/nova/templates/configmap-bin.yaml index 78573783b5..711441f0dd 100644 --- a/nova/templates/configmap-bin.yaml +++ b/nova/templates/configmap-bin.yaml @@ -4,10 +4,10 @@ metadata: name: nova-bin data: db-sync.sh: | -{{ tuple "bin/_db-sync.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_db-sync.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} init.sh: | -{{ tuple "bin/_init.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_init.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} post.sh: | -{{ tuple "bin/_post.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_post.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} libvirt.sh: | -{{ tuple "bin/_libvirt.sh.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_libvirt.sh.tpl" . | include "helm-toolkit.template" | indent 4 }} diff --git a/nova/templates/configmap-etc.yaml b/nova/templates/configmap-etc.yaml index f96fbcefea..46f3fda14d 100644 --- a/nova/templates/configmap-etc.yaml +++ b/nova/templates/configmap-etc.yaml @@ -4,10 +4,10 @@ metadata: name: nova-etc data: nova.conf: |+ -{{ tuple "etc/_nova.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_nova.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} ceph.client.cinder.keyring.yaml: |+ -{{ tuple "etc/_ceph.client.cinder.keyring.yaml.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_ceph.client.cinder.keyring.yaml.tpl" . | include "helm-toolkit.template" | indent 4 }} resolv.conf: |+ -{{ tuple "etc/_resolv.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_resolv.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} libvirtd.conf: |+ -{{ tuple "etc/_libvirtd.conf.tpl" . | include "template" | indent 4 }} +{{ tuple "etc/_libvirtd.conf.tpl" . | include "helm-toolkit.template" | indent 4 }} diff --git a/nova/templates/daemonset-compute.yaml b/nova/templates/daemonset-compute.yaml index 2553c79406..231b5f7fab 100644 --- a/nova/templates/daemonset-compute.yaml +++ b/nova/templates/daemonset-compute.yaml @@ -10,10 +10,10 @@ spec: labels: app: nova-compute annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/nova/templates/daemonset-libvirt.yaml b/nova/templates/daemonset-libvirt.yaml index bc104e7144..63321ea708 100644 --- a/nova/templates/daemonset-libvirt.yaml +++ b/nova/templates/daemonset-libvirt.yaml @@ -10,10 +10,10 @@ spec: labels: app: nova-libvirt annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/nova/templates/deployment-api-metadata.yaml b/nova/templates/deployment-api-metadata.yaml index 1b93605837..7c41ed01bd 100644 --- a/nova/templates/deployment-api-metadata.yaml +++ b/nova/templates/deployment-api-metadata.yaml @@ -19,10 +19,10 @@ spec: labels: app: nova-api-metadata annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/nova/templates/deployment-api-osapi.yaml b/nova/templates/deployment-api-osapi.yaml index 52b6a13ec2..e1ed47a76a 100644 --- a/nova/templates/deployment-api-osapi.yaml +++ b/nova/templates/deployment-api-osapi.yaml @@ -19,10 +19,10 @@ spec: labels: app: nova-osapi annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/nova/templates/deployment-conductor.yaml b/nova/templates/deployment-conductor.yaml index 7e9fe02b6e..4c505c67ae 100644 --- a/nova/templates/deployment-conductor.yaml +++ b/nova/templates/deployment-conductor.yaml @@ -19,10 +19,10 @@ spec: labels: app: nova-conductor annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/nova/templates/deployment-consoleauth.yaml b/nova/templates/deployment-consoleauth.yaml index fa96113129..499f6274a1 100644 --- a/nova/templates/deployment-consoleauth.yaml +++ b/nova/templates/deployment-consoleauth.yaml @@ -19,10 +19,10 @@ spec: labels: app: nova-consoleauth annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/nova/templates/deployment-scheduler.yaml b/nova/templates/deployment-scheduler.yaml index 9ace4262bf..71c7817171 100644 --- a/nova/templates/deployment-scheduler.yaml +++ b/nova/templates/deployment-scheduler.yaml @@ -19,10 +19,10 @@ spec: labels: app: nova-scheduler annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }} pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: diff --git a/nova/templates/etc/_nova.conf.tpl b/nova/templates/etc/_nova.conf.tpl index 900e341ae1..d988c78811 100644 --- a/nova/templates/etc/_nova.conf.tpl +++ b/nova/templates/etc/_nova.conf.tpl @@ -43,19 +43,19 @@ lock_path = /var/lib/nova/tmp workers = {{ .Values.nova.default.conductor_workers }} [glance] -api_servers = {{ include "endpoint_glance_api_internal" . }} +api_servers = {{ include "helm-toolkit.endpoint_glance_api_internal" . }} num_retries = 3 [cinder] catalog_info = volume:cinder:internalURL [neutron] -url = {{ include "endpoint_neutron_api_internal" . }} +url = {{ include "helm-toolkit.endpoint_neutron_api_internal" . }} metadata_proxy_shared_secret = {{ .Values.neutron.metadata_secret }} service_metadata_proxy = True -auth_url = {{ include "endpoint_keystone_admin" . }} +auth_url = {{ include "helm-toolkit.endpoint_keystone_admin" . }} auth_type = password project_domain_name = default user_domain_id = default @@ -72,8 +72,8 @@ connection = mysql+pymysql://{{ .Values.database.nova_user }}:{{ .Values.databas max_retries = -1 [keystone_authtoken] -auth_uri = {{ include "endpoint_keystone_internal" . }} -auth_url = {{ include "endpoint_keystone_admin" . }} +auth_uri = {{ include "helm-toolkit.endpoint_keystone_internal" . }} +auth_url = {{ include "helm-toolkit.endpoint_keystone_admin" . }} auth_type = password project_domain_id = default user_domain_id = default diff --git a/nova/templates/job-db-init.yaml b/nova/templates/job-db-init.yaml index e43982359a..759f98e820 100644 --- a/nova/templates/job-db-init.yaml +++ b/nova/templates/job-db-init.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure diff --git a/nova/templates/job-db-sync.yaml b/nova/templates/job-db-sync.yaml index 81bff35b94..b8642c9081 100644 --- a/nova/templates/job-db-sync.yaml +++ b/nova/templates/job-db-sync.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure diff --git a/nova/templates/job-post.yaml b/nova/templates/job-post.yaml index 7fddbaf6a7..6cf97b9098 100644 --- a/nova/templates/job-post.yaml +++ b/nova/templates/job-post.yaml @@ -9,7 +9,7 @@ spec: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} +{{ tuple $envAll $dependencies | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: restartPolicy: OnFailure diff --git a/openstack/requirements.yaml b/openstack/requirements.yaml index d8e0ba454e..1707fc4105 100644 --- a/openstack/requirements.yaml +++ b/openstack/requirements.yaml @@ -1,5 +1,5 @@ dependencies: - - name: common + - name: helm-toolkit version: 0.1.0 repository: http://localhost:8879/charts - name: memcached diff --git a/postgresql/requirements.yaml b/postgresql/requirements.yaml index 2350b1facb..53782e69b2 100644 --- a/postgresql/requirements.yaml +++ b/postgresql/requirements.yaml @@ -1,4 +1,18 @@ +# Copyright 2017 The Openstack-Helm Authors. +# +# 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. + dependencies: - - name: common + - name: helm-toolkit repository: http://localhost:8879/charts version: 0.1.0 diff --git a/rabbitmq/requirements.yaml b/rabbitmq/requirements.yaml index 2350b1facb..4b15632039 100644 --- a/rabbitmq/requirements.yaml +++ b/rabbitmq/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - - name: common + - name: helm-toolkit repository: http://localhost:8879/charts version: 0.1.0 diff --git a/rabbitmq/templates/configmap-bin.yaml b/rabbitmq/templates/configmap-bin.yaml index a14fcecc31..d27624712b 100644 --- a/rabbitmq/templates/configmap-bin.yaml +++ b/rabbitmq/templates/configmap-bin.yaml @@ -8,4 +8,4 @@ metadata: component: messaging data: start_rabbitmq.sh: | -{{ tuple "bin/_start_rabbit.tpl" . | include "template" | indent 4 }} +{{ tuple "bin/_start_rabbit.tpl" . | include "helm-toolkit.template" | indent 4 }} diff --git a/rabbitmq/templates/deployment.yaml b/rabbitmq/templates/deployment.yaml index bd8815fda3..8221fb5d81 100644 --- a/rabbitmq/templates/deployment.yaml +++ b/rabbitmq/templates/deployment.yaml @@ -17,7 +17,7 @@ spec: labels: app: rabbitmq annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }} spec: nodeSelector: {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}