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
This commit is contained in:
Pete Birley 2017-02-15 00:52:38 +00:00 committed by Alan Meadows
parent 6e0cda0f52
commit 116931bb51
125 changed files with 357 additions and 346 deletions

View File

@ -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_DIRS := helm-toolkit/secrets
B64_EXCLUDE := $(wildcard common/secrets/*.b64) B64_EXCLUDE := $(wildcard helm-toolkit/secrets/*.b64)
CHARTS := ceph mariadb postgresql rabbitmq memcached keystone glance horizon neutron nova cinder heat maas openstack 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: nolint-build-ceph
ceph: build-ceph ceph: build-ceph
@ -42,7 +42,7 @@ memcached: build-memcached
openstack: build-openstack openstack: build-openstack
clean: clean:
$(shell rm -rf common/secrets/*.b64) $(shell rm -rf helm-toolkit/secrets/*.b64)
$(shell rm -rf */templates/_partials.tpl) $(shell rm -rf */templates/_partials.tpl)
$(shell rm -rf */templates/_globals.tpl) $(shell rm -rf */templates/_globals.tpl)
echo "Removed all .b64, _partials.tpl, and _globals.tpl files" echo "Removed all .b64, _partials.tpl, and _globals.tpl files"

View File

@ -1,4 +1,18 @@
dependencies: # Copyright 2017 The Openstack-Helm Authors.
- name: common #
repository: http://localhost:8879/charts # Licensed under the Apache License, Version 2.0 (the "License");
version: 0.1.0 # 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

View File

@ -13,6 +13,6 @@
# limitations under the License. # limitations under the License.
dependencies: dependencies:
- name: common - name: helm-toolkit
repository: http://localhost:8879/charts repository: http://localhost:8879/charts
version: 0.1.0 version: 0.1.0

View File

@ -1,4 +1,4 @@
dependencies: dependencies:
- name: common - name: helm-toolkit
repository: http://localhost:8879/charts repository: http://localhost:8879/charts
version: 0.1.0 version: 0.1.0

View File

@ -4,10 +4,10 @@
# this function returns the endpoint uri for a service, it takes an tuple # this function returns the endpoint uri for a service, it takes an tuple
# input in the form: service-type, endpoint-class, port-name. eg: # 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. # 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 -}} {{- $type := index . 0 -}}
{{- $endpoint := index . 1 -}} {{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}} {{- $port := index . 2 -}}

View File

@ -4,10 +4,10 @@ metadata:
name: cinder-bin name: cinder-bin
data: data:
db-init.sh: |+ 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: |+ ks-service.sh: |+
{{- include "common_keystone_service" . | indent 4 }} {{- include "helm-toolkit.keystone_service" . | indent 4 }}
ks-endpoints.sh: |+ ks-endpoints.sh: |+
{{- include "common_keystone_endpoints" . | indent 4 }} {{- include "helm-toolkit.keystone_endpoints" . | indent 4 }}
ks-user.sh: |+ ks-user.sh: |+
{{- include "common_keystone_user" . | indent 4 }} {{- include "helm-toolkit.keystone_user" . | indent 4 }}

View File

@ -4,12 +4,12 @@ metadata:
name: cinder-etc name: cinder-etc
data: data:
cinder.conf: |+ 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: |+ 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: |+ policy.json: |+
{{ tuple "etc/_policy.json.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.template" | indent 4 }}
ceph.conf: |+ 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: |+ 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 }}

View File

@ -19,10 +19,10 @@ spec:
labels: labels:
app: cinder-api app: cinder-api
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -19,10 +19,10 @@ spec:
labels: labels:
app: cinder-scheduler app: cinder-scheduler
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -19,10 +19,10 @@ spec:
labels: labels:
app: cinder-volume app: cinder-volume
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -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_servers = "{{ .Values.glance.proto }}://{{ .Values.glance.host }}:{{ .Values.glance.port }}"
glance_api_version = {{ .Values.glance.version }} 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 auth_strategy = keystone
os_region_name = {{ .Values.keystone.cinder_region_name }} os_region_name = {{ .Values.keystone.cinder_region_name }}

View File

@ -9,7 +9,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
restartPolicy: OnFailure restartPolicy: OnFailure

View File

@ -9,7 +9,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
restartPolicy: OnFailure restartPolicy: OnFailure

View File

@ -10,7 +10,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
restartPolicy: OnFailure restartPolicy: OnFailure
@ -41,7 +41,7 @@ spec:
readOnly: true readOnly: true
env: env:
{{- with $env := dict "ksUserSecret" $ksAdminSecret }} {{- with $env := dict "ksUserSecret" $ksAdminSecret }}
{{- include "env_ks_openrc_tpl" $env | indent 12 }} {{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }} {{- end }}
- name: OS_SVC_ENDPOINT - name: OS_SVC_ENDPOINT
value: {{ $osServiceEndPoint }} value: {{ $osServiceEndPoint }}
@ -50,7 +50,7 @@ spec:
- name: OS_SERVICE_TYPE - name: OS_SERVICE_TYPE
value: {{ $osServiceType }} value: {{ $osServiceType }}
- name: OS_SERVICE_ENDPOINT - 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 }}
{{- end }} {{- end }}
volumes: volumes:

View File

@ -10,7 +10,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
restartPolicy: OnFailure restartPolicy: OnFailure
@ -40,7 +40,7 @@ spec:
readOnly: true readOnly: true
env: env:
{{- with $env := dict "ksUserSecret" $ksAdminSecret }} {{- with $env := dict "ksUserSecret" $ksAdminSecret }}
{{- include "env_ks_openrc_tpl" $env | indent 12 }} {{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }} {{- end }}
- name: OS_SERVICE_NAME - name: OS_SERVICE_NAME
value: {{ tuple $osServiceType $envAll | include "endpoint_name_lookup" }} value: {{ tuple $osServiceType $envAll | include "endpoint_name_lookup" }}

View File

@ -11,7 +11,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
restartPolicy: OnFailure restartPolicy: OnFailure
@ -40,12 +40,12 @@ spec:
readOnly: true readOnly: true
env: env:
{{- with $env := dict "ksUserSecret" $ksAdminSecret }} {{- with $env := dict "ksUserSecret" $ksAdminSecret }}
{{- include "env_ks_openrc_tpl" $env | indent 12 }} {{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }} {{- end }}
- name: SERVICE_OS_SERVICE_NAME - name: SERVICE_OS_SERVICE_NAME
value: "cinder" value: "cinder"
{{- with $env := dict "ksUserSecret" $ksUserSecret }} {{- 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 }} {{- end }}
- name: SERVICE_OS_ROLE - name: SERVICE_OS_ROLE
value: {{ .Values.keystone.cinder_user_role | quote }} value: {{ .Values.keystone.cinder_user_role | quote }}

View File

@ -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}}

View File

@ -1,4 +1,4 @@
dependencies: dependencies:
- name: common - name: helm-toolkit
repository: http://localhost:8879/charts repository: http://localhost:8879/charts
version: 0.1.0 version: 0.1.0

View File

@ -1,42 +1,41 @@
#!/bin/bash #!/bin/bash
set -ex set -ex
export HOME=/tmp export HOME=/tmp
ansible localhost -vvv -m kolla_keystone_service -a "service_name=glance \ ansible localhost -vvv -m kolla_keystone_service -a "service_name=glance \
service_type=image \ service_type=image \
description='Openstack Image' \ description='Openstack Image' \
endpoint_region='{{ .Values.keystone.glance_region_name }}' \ endpoint_region='{{ .Values.keystone.glance_region_name }}' \
url='{{ include "endpoint_glance_api_internal" . }}' \ url='{{ include "helm-toolkit.endpoint_glance_api_internal" . }}' \
interface=admin \ interface=admin \
region_name='{{ .Values.keystone.admin_region_name }}' \ region_name='{{ .Values.keystone.admin_region_name }}' \
auth='{{ include "keystone_auth" . }}'" \ auth='{{ include "helm-toolkit.keystone_auth" . }}'" \
-e "{'openstack_glance_auth': {{ include "keystone_auth" . }}}" -e "{'openstack_glance_auth': {{ include "helm-toolkit.keystone_auth" . }}}"
ansible localhost -vvv -m kolla_keystone_service -a "service_name=glance \ ansible localhost -vvv -m kolla_keystone_service -a "service_name=glance \
service_type=image \ service_type=image \
description='Openstack Image' \ description='Openstack Image' \
endpoint_region='{{ .Values.keystone.glance_region_name }}' \ endpoint_region='{{ .Values.keystone.glance_region_name }}' \
url='{{ include "endpoint_glance_api_internal" . }}' \ url='{{ include "helm-toolkit.endpoint_glance_api_internal" . }}' \
interface=internal \ interface=internal \
region_name='{{ .Values.keystone.admin_region_name }}' \ region_name='{{ .Values.keystone.admin_region_name }}' \
auth='{{ include "keystone_auth" . }}'" \ auth='{{ include "helm-toolkit.keystone_auth" . }}'" \
-e "{ 'openstack_glance_auth': {{ include "keystone_auth" . }} }" -e "{ 'openstack_glance_auth': {{ include "helm-toolkit.keystone_auth" . }} }"
ansible localhost -vvv -m kolla_keystone_service -a "service_name=glance \ ansible localhost -vvv -m kolla_keystone_service -a "service_name=glance \
service_type=image \ service_type=image \
description='Openstack Image' \ description='Openstack Image' \
endpoint_region='{{ .Values.keystone.glance_region_name }}' \ endpoint_region='{{ .Values.keystone.glance_region_name }}' \
url='{{ include "endpoint_glance_api_internal" . }}' \ url='{{ include "helm-toolkit.endpoint_glance_api_internal" . }}' \
interface=public \ interface=public \
region_name='{{ .Values.keystone.admin_region_name }}' \ region_name='{{ .Values.keystone.admin_region_name }}' \
auth='{{ include "keystone_auth" . }}'" \ auth='{{ include "helm-toolkit.keystone_auth" . }}'" \
-e "{ 'openstack_glance_auth': {{ include "keystone_auth" . }} }" -e "{ 'openstack_glance_auth': {{ include "helm-toolkit.keystone_auth" . }} }"
ansible localhost -vvv -m kolla_keystone_user -a "project=service \ ansible localhost -vvv -m kolla_keystone_user -a "project=service \
user={{ .Values.keystone.glance_user }} \ user={{ .Values.keystone.glance_user }} \
password={{ .Values.keystone.glance_password }} \ password={{ .Values.keystone.glance_password }} \
role=admin \ role=admin \
region_name={{ .Values.keystone.admin_region_name }} \ region_name={{ .Values.keystone.admin_region_name }} \
auth='{{ include "keystone_auth" . }}'" \ auth='{{ include "helm-toolkit.keystone_auth" . }}'" \
-e "{ 'openstack_glance_auth': {{ include "keystone_auth" . }} }" -e "{ 'openstack_glance_auth': {{ include "helm-toolkit.keystone_auth" . }} }"

View File

@ -4,6 +4,6 @@ metadata:
name: glance-bin name: glance-bin
data: data:
init.sh: |+ init.sh: |+
{{ tuple "bin/_init.sh.tpl" . | include "template" | indent 4 }} {{ tuple "bin/_init.sh.tpl" . | include "helm-toolkit.template" | indent 4 }}
post.sh: |+ post.sh: |+
{{ tuple "bin/_post.sh.tpl" . | include "template" | indent 4 }} {{ tuple "bin/_post.sh.tpl" . | include "helm-toolkit.template" | indent 4 }}

View File

@ -4,16 +4,16 @@ metadata:
name: glance-etc name: glance-etc
data: data:
ceph.conf: |+ 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: |+ 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: |+ 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: |+ 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: |+ 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: |+ 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: |+ policy.json: |+
{{ tuple "etc/_policy.json.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.template" | indent 4 }}

View File

@ -23,10 +23,10 @@ spec:
labels: labels:
app: glance-api app: glance-api
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -15,10 +15,10 @@ spec:
labels: labels:
app: glance-registry app: glance-registry
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -9,7 +9,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
restartPolicy: OnFailure restartPolicy: OnFailure

View File

@ -9,7 +9,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
restartPolicy: OnFailure restartPolicy: OnFailure

View File

@ -9,7 +9,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -1,4 +1,4 @@
dependencies: dependencies:
- name: common - name: helm-toolkit
repository: http://localhost:8879/charts repository: http://localhost:8879/charts
version: 0.1.0 version: 0.1.0

View File

@ -4,12 +4,12 @@ metadata:
name: heat-bin name: heat-bin
data: data:
db-init.sh: |+ 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: |+ ks-service.sh: |+
{{- include "common_keystone_service" . | indent 4 }} {{- include "helm-toolkit.keystone_service" . | indent 4 }}
ks-endpoints.sh: |+ ks-endpoints.sh: |+
{{- include "common_keystone_endpoints" . | indent 4 }} {{- include "helm-toolkit.keystone_endpoints" . | indent 4 }}
ks-user.sh: |+ ks-user.sh: |+
{{- include "common_keystone_user" . | indent 4 }} {{- include "helm-toolkit.keystone_user" . | indent 4 }}
ks-domain-user.sh: |+ ks-domain-user.sh: |+
{{- include "common_keystone_domain_user" . | indent 4 }} {{- include "helm-toolkit.keystone_domain_user" . | indent 4 }}

View File

@ -4,8 +4,8 @@ metadata:
name: heat-etc name: heat-etc
data: data:
heat.conf: |+ 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: |+ 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: |+ policy.json: |+
{{ tuple "etc/_heat-policy.json.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_heat-policy.json.tpl" . | include "helm-toolkit.template" | indent 4 }}

View File

@ -12,7 +12,7 @@ spec:
app: heat-api app: heat-api
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -12,7 +12,7 @@ spec:
app: heat-cfn app: heat-cfn
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -12,7 +12,7 @@ spec:
app: heat-cloudwatch app: heat-cloudwatch
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -33,7 +33,7 @@ max_retries = -1
signing_dir = "/var/cache/heat" signing_dir = "/var/cache/heat"
memcached_servers = "{{ .Values.memcached.host }}:{{ .Values.memcached.port }}" memcached_servers = "{{ .Values.memcached.host }}:{{ .Values.memcached.port }}"
auth_version = v3 auth_version = v3
auth_url = {{ include "endpoint_keystone_internal" . }} auth_url = {{ include "helm-toolkit.endpoint_keystone_internal" . }}
auth_type = password auth_type = password
region_name = {{ .Values.keystone.heat_region_name }} region_name = {{ .Values.keystone.heat_region_name }}
project_domain_name = {{ .Values.keystone.heat_project_domain }} project_domain_name = {{ .Values.keystone.heat_project_domain }}
@ -74,7 +74,7 @@ auth_section = "trustee_keystone"
signing_dir = "/var/cache/heat" signing_dir = "/var/cache/heat"
memcached_servers = "{{ .Values.memcached.host }}:{{ .Values.memcached.port }}" memcached_servers = "{{ .Values.memcached.host }}:{{ .Values.memcached.port }}"
auth_version = v3 auth_version = v3
auth_url = {{ include "endpoint_keystone_internal" . }} auth_url = {{ include "helm-toolkit.endpoint_keystone_internal" . }}
auth_type = password auth_type = password
region_name = {{ .Values.keystone.heat_trustee_region_name }} region_name = {{ .Values.keystone.heat_trustee_region_name }}
user_domain_name = {{ .Values.keystone.heat_trustee_user_domain }} user_domain_name = {{ .Values.keystone.heat_trustee_user_domain }}
@ -87,4 +87,4 @@ endpoint_type = internalURL
[clients_keystone] [clients_keystone]
endpoint_type = internalURL endpoint_type = internalURL
auth_uri = {{ include "endpoint_keystone_internal" . }} auth_uri = {{ include "helm-toolkit.endpoint_keystone_internal" . }}

View File

@ -9,7 +9,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
restartPolicy: OnFailure restartPolicy: OnFailure

View File

@ -9,7 +9,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
restartPolicy: OnFailure restartPolicy: OnFailure

View File

@ -10,7 +10,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
restartPolicy: OnFailure restartPolicy: OnFailure
@ -41,16 +41,16 @@ spec:
readOnly: true readOnly: true
env: env:
{{- with $env := dict "ksUserSecret" $ksAdminSecret }} {{- with $env := dict "ksUserSecret" $ksAdminSecret }}
{{- include "env_ks_openrc_tpl" $env | indent 12 }} {{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }} {{- end }}
- name: OS_SVC_ENDPOINT - name: OS_SVC_ENDPOINT
value: {{ $osServiceEndPoint }} value: {{ $osServiceEndPoint }}
- name: OS_SERVICE_NAME - name: OS_SERVICE_NAME
value: {{ $osServiceName }} value: {{ $osServiceName }}
- name: OS_SERVICE_TYPE - 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 - 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 }}
{{- end }} {{- end }}
volumes: volumes:

View File

@ -10,7 +10,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
restartPolicy: OnFailure restartPolicy: OnFailure
@ -40,12 +40,12 @@ spec:
readOnly: true readOnly: true
env: env:
{{- with $env := dict "ksUserSecret" $ksAdminSecret }} {{- with $env := dict "ksUserSecret" $ksAdminSecret }}
{{- include "env_ks_openrc_tpl" $env | indent 12 }} {{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }} {{- end }}
- name: OS_SERVICE_NAME - name: OS_SERVICE_NAME
value: {{ $osServiceName }} value: {{ $osServiceName }}
- name: OS_SERVICE_TYPE - name: OS_SERVICE_TYPE
value: {{ tuple $osServiceName $envAll | include "endpoint_type_lookup" }} value: {{ tuple $osServiceName $envAll | include "helm-toolkit.endpoint_type_lookup" }}
{{- end }} {{- end }}
volumes: volumes:

View File

@ -14,7 +14,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
restartPolicy: OnFailure restartPolicy: OnFailure
@ -43,12 +43,12 @@ spec:
readOnly: true readOnly: true
env: env:
{{- with $env := dict "ksUserSecret" $ksAdminSecret }} {{- with $env := dict "ksUserSecret" $ksAdminSecret }}
{{- include "env_ks_openrc_tpl" $env | indent 12 }} {{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }} {{- end }}
- name: SERVICE_OS_SERVICE_NAME - name: SERVICE_OS_SERVICE_NAME
value: "heat" value: "heat"
{{- with $env := dict "ksUserSecret" $ksUserSecret }} {{- 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 }} {{- end }}
- name: SERVICE_OS_ROLE - name: SERVICE_OS_ROLE
value: {{ .Values.keystone.heat_user_role | quote }} value: {{ .Values.keystone.heat_user_role | quote }}
@ -65,12 +65,12 @@ spec:
readOnly: true readOnly: true
env: env:
{{- with $env := dict "ksUserSecret" $ksAdminSecret }} {{- with $env := dict "ksUserSecret" $ksAdminSecret }}
{{- include "env_ks_openrc_tpl" $env | indent 12 }} {{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }} {{- end }}
- name: SERVICE_OS_SERVICE_NAME - name: SERVICE_OS_SERVICE_NAME
value: "heat" value: "heat"
{{- with $env := dict "ksUserSecret" $ksTrusteeUserSecret }} {{- 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 }} {{- end }}
- name: SERVICE_OS_ROLE - name: SERVICE_OS_ROLE
value: {{ .Values.keystone.heat_trustee_role | quote }} value: {{ .Values.keystone.heat_trustee_role | quote }}
@ -87,7 +87,7 @@ spec:
readOnly: true readOnly: true
env: env:
{{- with $env := dict "ksUserSecret" $ksAdminSecret }} {{- with $env := dict "ksUserSecret" $ksAdminSecret }}
{{- include "env_ks_openrc_tpl" $env | indent 12 }} {{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }} {{- end }}
- name: SERVICE_OS_SERVICE_NAME - name: SERVICE_OS_SERVICE_NAME
value: "heat" value: "heat"

View File

@ -13,7 +13,7 @@ spec:
app: heat-engine app: heat-engine
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1
description: A base chart for all openstack charts description: A base chart for all openstack charts
name: common name: helm-toolkit
version: 0.1.0 version: 0.1.0

View File

@ -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)") ) SECRETS := $(shell find secrets -type f $(foreach e,$(EXCLUDE), -not -path "$(e)") )
templates/_secrets.tpl: Makefile $(SECRETS) templates/_secrets.tpl: Makefile $(SECRETS)

View File

@ -7,7 +7,7 @@
# however, constructing this appears to be a # however, constructing this appears to be a
# herculean effort in gotpl # herculean effort in gotpl
{{- define "endpoint_keystone_internal" -}} {{- define "helm-toolkit.endpoint_keystone_internal" -}}
{{- $fqdn := .Release.Namespace -}} {{- $fqdn := .Release.Namespace -}}
{{- if .Values.endpoints.fqdn -}} {{- if .Values.endpoints.fqdn -}}
{{- $fqdn := .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}}
@ -17,7 +17,7 @@
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- define "endpoint_keystone_admin" -}} {{- define "helm-toolkit.endpoint_keystone_admin" -}}
{{- $fqdn := .Release.Namespace -}} {{- $fqdn := .Release.Namespace -}}
{{- if .Values.endpoints.fqdn -}} {{- if .Values.endpoints.fqdn -}}
{{- $fqdn := .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}}
@ -27,7 +27,7 @@
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- define "endpoint_nova_api_internal" -}} {{- define "helm-toolkit.endpoint_nova_api_internal" -}}
{{- $fqdn := .Release.Namespace -}} {{- $fqdn := .Release.Namespace -}}
{{- if .Values.endpoints.fqdn -}} {{- if .Values.endpoints.fqdn -}}
{{- $fqdn := .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}}
@ -37,7 +37,7 @@
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- define "endpoint_nova_metadata_internal" -}} {{- define "helm-toolkit.endpoint_nova_metadata_internal" -}}
{{- $fqdn := .Release.Namespace -}} {{- $fqdn := .Release.Namespace -}}
{{- if .Values.endpoints.fqdn -}} {{- if .Values.endpoints.fqdn -}}
{{- $fqdn := .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}}
@ -47,7 +47,7 @@
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- define "endpoint_nova_novncproxy_internal" -}} {{- define "helm-toolkit.endpoint_nova_novncproxy_internal" -}}
{{- $fqdn := .Release.Namespace -}} {{- $fqdn := .Release.Namespace -}}
{{- if .Values.endpoints.fqdn -}} {{- if .Values.endpoints.fqdn -}}
{{- $fqdn := .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}}
@ -57,7 +57,7 @@
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- define "endpoint_glance_api_internal" -}} {{- define "helm-toolkit.endpoint_glance_api_internal" -}}
{{- $fqdn := .Release.Namespace -}} {{- $fqdn := .Release.Namespace -}}
{{- if .Values.endpoints.fqdn -}} {{- if .Values.endpoints.fqdn -}}
{{- $fqdn := .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}}
@ -67,7 +67,7 @@
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- define "endpoint_glance_registry_internal" -}} {{- define "helm-toolkit.endpoint_glance_registry_internal" -}}
{{- $fqdn := .Release.Namespace -}} {{- $fqdn := .Release.Namespace -}}
{{- if .Values.endpoints.fqdn -}} {{- if .Values.endpoints.fqdn -}}
{{- $fqdn := .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}}
@ -77,7 +77,7 @@
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- define "endpoint_neutron_api_internal" -}} {{- define "helm-toolkit.endpoint_neutron_api_internal" -}}
{{- $fqdn := .Release.Namespace -}} {{- $fqdn := .Release.Namespace -}}
{{- if .Values.endpoints.fqdn -}} {{- if .Values.endpoints.fqdn -}}
{{- $fqdn := .Values.endpoints.fqdn -}} {{- $fqdn := .Values.endpoints.fqdn -}}
@ -89,10 +89,10 @@
# this function returns the endpoint uri for a service, it takes an tuple # this function returns the endpoint uri for a service, it takes an tuple
# input in the form: service-name, endpoint-class, port-name. eg: # 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. # 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 -}} {{- $name := index . 0 -}}
{{- $endpoint := index . 1 -}} {{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}} {{- $port := index . 2 -}}
@ -122,7 +122,7 @@
# { tuple heat . | include "ks_endpoint_type" } # { tuple heat . | include "ks_endpoint_type" }
# will return "orchestration" # will return "orchestration"
{{- define "endpoint_type_lookup" -}} {{- define "helm-toolkit.endpoint_type_lookup" -}}
{{- $name := index . 0 -}} {{- $name := index . 0 -}}
{{- $context := index . 1 -}} {{- $context := index . 1 -}}
{{- $nameNorm := $name | replace "-" "_" }} {{- $nameNorm := $name | replace "-" "_" }}
@ -134,4 +134,4 @@
#------------------------------- #-------------------------------
# kolla helpers # 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}}

View File

@ -1,8 +1,8 @@
{{- define "joinListWithComma" -}} {{- define "helm-toolkit.joinListWithComma" -}}
{{ range $k, $v := . }}{{ if $k }},{{ end }}{{ $v }}{{ end }} {{ range $k, $v := . }}{{ if $k }},{{ end }}{{ $v }}{{ end }}
{{- end -}} {{- end -}}
{{- define "template" -}} {{- define "helm-toolkit.template" -}}
{{- $name := index . 0 -}} {{- $name := index . 0 -}}
{{- $context := index . 1 -}} {{- $context := index . 1 -}}
{{- $v:= $context.Template.Name | split "/" -}} {{- $v:= $context.Template.Name | split "/" -}}
@ -12,7 +12,7 @@
{{ include $wtf $context }} {{ include $wtf $context }}
{{- end -}} {{- end -}}
{{- define "hash" -}} {{- define "helm-toolkit.hash" -}}
{{- $name := index . 0 -}} {{- $name := index . 0 -}}
{{- $context := index . 1 -}} {{- $context := index . 1 -}}
{{- $v:= $context.Template.Name | split "/" -}} {{- $v:= $context.Template.Name | split "/" -}}

View File

@ -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}}

View File

@ -1,4 +1,4 @@
{{- define "common_keystone_domain_user" }} {{- define "helm-toolkit.keystone_domain_user" }}
#!/bin/bash #!/bin/bash
# Copyright 2017 Pete Birley # Copyright 2017 Pete Birley

View File

@ -1,4 +1,4 @@
{{- define "common_keystone_endpoints" }} {{- define "helm-toolkit.keystone_endpoints" }}
#!/bin/bash #!/bin/bash
# Copyright 2017 Pete Birley # Copyright 2017 Pete Birley

View File

@ -1,4 +1,4 @@
{{- define "common_keystone_service" }} {{- define "helm-toolkit.keystone_service" }}
#!/bin/bash #!/bin/bash
# Copyright 2017 Pete Birley # Copyright 2017 Pete Birley

View File

@ -1,4 +1,4 @@
{{- define "common_keystone_user" }} {{- define "helm-toolkit.keystone_user" }}
#!/bin/bash #!/bin/bash
# Copyright 2017 Pete Birley # Copyright 2017 Pete Birley

View File

@ -1,4 +1,4 @@
{{- define "dep_check_init_cont" -}} {{- define "helm-toolkit.kubernetes_entrypoint_init_container" -}}
{{- $envAll := index . 0 -}} {{- $envAll := index . 0 -}}
{{- $deps := index . 1 -}} {{- $deps := index . 1 -}}
{ {
@ -34,19 +34,19 @@
}, },
{ {
"name": "DEPENDENCY_SERVICE", "name": "DEPENDENCY_SERVICE",
"value": "{{ include "joinListWithComma" $deps.service }}" "value": "{{ include "helm-toolkit.joinListWithComma" $deps.service }}"
}, },
{ {
"name": "DEPENDENCY_JOBS", "name": "DEPENDENCY_JOBS",
"value": "{{ include "joinListWithComma" $deps.jobs }}" "value": "{{ include "helm-toolkit.joinListWithComma" $deps.jobs }}"
}, },
{ {
"name": "DEPENDENCY_DAEMONSET", "name": "DEPENDENCY_DAEMONSET",
"value": "{{ include "joinListWithComma" $deps.daemonset }}" "value": "{{ include "helm-toolkit.joinListWithComma" $deps.daemonset }}"
}, },
{ {
"name": "DEPENDENCY_CONTAINER", "name": "DEPENDENCY_CONTAINER",
"value": "{{ include "joinListWithComma" $deps.container }}" "value": "{{ include "helm-toolkit.joinListWithComma" $deps.container }}"
}, },
{ {
"name": "COMMAND", "name": "COMMAND",

View File

@ -1,4 +1,4 @@
{{- define "env_ks_openrc_tpl" }} {{- define "helm-toolkit.keystone_openrc_env_vars" }}
{{- $ksUserSecret := .ksUserSecret }} {{- $ksUserSecret := .ksUserSecret }}
- name: OS_IDENTITY_API_VERSION - name: OS_IDENTITY_API_VERSION
value: "3" value: "3"

View File

@ -1,4 +1,4 @@
{{- define "env_ks_user_create_openrc_tpl" }} {{- define "helm-toolkit.keystone_user_create_env_vars" }}
{{- $ksUserSecret := .ksUserSecret }} {{- $ksUserSecret := .ksUserSecret }}
- name: SERVICE_OS_REGION_NAME - name: SERVICE_OS_REGION_NAME
valueFrom: valueFrom:

View File

@ -1,4 +1,4 @@
dependencies: dependencies:
- name: common - name: helm-toolkit
repository: http://localhost:8879/charts repository: http://localhost:8879/charts
version: 0.1.0 version: 0.1.0

View File

@ -4,4 +4,4 @@ metadata:
name: horizon-bin name: horizon-bin
data: data:
start.sh: | start.sh: |
{{ tuple "bin/_start.sh.tpl" . | include "template" | indent 4 }} {{ tuple "bin/_start.sh.tpl" . | include "helm-toolkit.template" | indent 4 }}

View File

@ -4,6 +4,6 @@ metadata:
name: horizon-etc name: horizon-etc
data: data:
horizon.conf: | horizon.conf: |
{{ tuple "etc/_horizon.conf.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_horizon.conf.tpl" . | include "helm-toolkit.template" | indent 4 }}
local_settings: | local_settings: |
{{ tuple "etc/_local_settings.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_local_settings.tpl" . | include "helm-toolkit.template" | indent 4 }}

View File

@ -19,10 +19,10 @@ spec:
labels: labels:
app: horizon app: horizon
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -130,7 +130,7 @@ SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
CACHES = { CACHES = {
'default': { 'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', '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'), # ('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_" OPENSTACK_KEYSTONE_DEFAULT_ROLE = "_member_"
# Enables keystone web single-sign-on if set to True. # Enables keystone web single-sign-on if set to True.

View File

@ -1,4 +1,4 @@
dependencies: dependencies:
- name: common - name: helm-toolkit
repository: http://localhost:8879/charts repository: http://localhost:8879/charts
version: 0.1.0 version: 0.1.0

View File

@ -7,7 +7,7 @@ keystone-manage --config-file=/etc/keystone/keystone.conf bootstrap \
--bootstrap-username {{ .Values.keystone.admin_user }} \ --bootstrap-username {{ .Values.keystone.admin_user }} \
--bootstrap-password {{ .Values.keystone.admin_password }} \ --bootstrap-password {{ .Values.keystone.admin_password }} \
--bootstrap-project-name {{ .Values.keystone.admin_project_name }} \ --bootstrap-project-name {{ .Values.keystone.admin_project_name }} \
--bootstrap-admin-url {{ include "endpoint_keystone_admin" . }} \ --bootstrap-admin-url {{ include "helm-toolkit.endpoint_keystone_admin" . }} \
--bootstrap-public-url {{ include "endpoint_keystone_internal" . }} \ --bootstrap-public-url {{ include "helm-toolkit.endpoint_keystone_internal" . }} \
--bootstrap-internal-url {{ include "endpoint_keystone_internal" . }} \ --bootstrap-internal-url {{ include "helm-toolkit.endpoint_keystone_internal" . }} \
--bootstrap-region-id {{ .Values.keystone.admin_region_name }} --bootstrap-region-id {{ .Values.keystone.admin_region_name }}

View File

@ -3,14 +3,14 @@ set -ex
export HOME=/tmp export HOME=/tmp
ansible localhost -vvv \ 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_port='{{ .Values.database.port }}' \
login_user='{{ .Values.database.root_user }}' \ login_user='{{ .Values.database.root_user }}' \
login_password='{{ .Values.database.root_password }}' \ login_password='{{ .Values.database.root_password }}' \
name='{{ .Values.database.keystone_database_name }}'" name='{{ .Values.database.keystone_database_name }}'"
ansible localhost -vvv \ 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_port='{{ .Values.database.port }}' \
login_user='{{ .Values.database.root_user }}' \ login_user='{{ .Values.database.root_user }}' \
login_password='{{ .Values.database.root_password }}' \ login_password='{{ .Values.database.root_password }}' \

View File

@ -4,8 +4,8 @@ metadata:
name: keystone-bin name: keystone-bin
data: data:
db-sync.sh: | 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: | init.sh: |
{{ tuple "bin/_init.sh.tpl" . | include "template" | indent 4 }} {{ tuple "bin/_init.sh.tpl" . | include "helm-toolkit.template" | indent 4 }}
start.sh: | start.sh: |
{{ tuple "bin/_start.sh.tpl" . | include "template" | indent 4 }} {{ tuple "bin/_start.sh.tpl" . | include "helm-toolkit.template" | indent 4 }}

View File

@ -4,14 +4,14 @@ metadata:
name: keystone-etc name: keystone-etc
data: data:
keystone.conf: |+ 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: |+ 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: |+ 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: |+ 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: |+ 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: |+ 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 }}

View File

@ -19,10 +19,10 @@ spec:
labels: labels:
app: keystone-api app: keystone-api
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -4,18 +4,18 @@ use_syslog = False
use_stderr = True use_stderr = True
[database] [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 max_retries = -1
[memcache] [memcache]
servers = {{ include "memcached_host" . }}:11211 servers = {{ include "helm-toolkit.rabbitmq_host" . }}:11211
[token] [token]
provider = {{ .Values.api.token.provider }} provider = {{ .Values.api.token.provider }}
[cache] [cache]
backend = dogpile.cache.memcached backend = dogpile.cache.memcached
memcache_servers = {{ include "memcached_host" . }}:11211 memcache_servers = {{ include "helm-toolkit.rabbitmq_host" . }}:11211
config_prefix = cache.keystone config_prefix = cache.keystone
enabled = True enabled = True

View File

@ -9,7 +9,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
restartPolicy: OnFailure restartPolicy: OnFailure

View File

@ -9,7 +9,7 @@ spec:
metadata: metadata:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
restartPolicy: OnFailure restartPolicy: OnFailure

View File

@ -1,4 +1,4 @@
dependencies: dependencies:
- name: common - name: helm-toolkit
repository: http://localhost:8879/charts repository: http://localhost:8879/charts
version: 0.1.0 version: 0.1.0

View File

@ -4,12 +4,12 @@ metadata:
name: maas-bin name: maas-bin
data: data:
start.sh: | 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: | 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: | 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: | 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: | 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 }}

View File

@ -4,8 +4,8 @@ metadata:
name: maas-etc name: maas-etc
data: data:
named.conf.options: |+ 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: | secret: |
{{ tuple "etc/_secret.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_secret.tpl" . | include "helm_toolkit.template" | indent 4 }}
maas-region-controller.conf: | maas-region-controller.conf: |
{{ tuple "etc/_postgresql-config.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_postgresql-config.tpl" . | include "helm_toolkit.template" | indent 4 }}

View File

@ -13,6 +13,6 @@
# limitations under the License. # limitations under the License.
dependencies: dependencies:
- name: common - name: helm-toolkit
repository: http://localhost:8879/charts repository: http://localhost:8879/charts
version: 0.1.0 version: 0.1.0

View File

@ -18,12 +18,12 @@ metadata:
name: mariadb-bin name: mariadb-bin
data: data:
start.sh: | 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: | 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: | 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: | 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: | seed.sh: |
{{ tuple "bin/_seed.sh.tpl" . | include "template" | indent 4 }} {{ tuple "bin/_seed.sh.tpl" . | include "helm-toolkit.template" | indent 4 }}

View File

@ -18,18 +18,18 @@ metadata:
name: mariadb-etc name: mariadb-etc
data: data:
charsets.cnf: | charsets.cnf: |
{{ tuple "etc/_charsets.cnf.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_charsets.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }}
engine.cnf: | engine.cnf: |
{{ tuple "etc/_engine.cnf.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_engine.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }}
my.cnf: | 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: | log.cnf: |
{{ tuple "etc/_log.cnf.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_log.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }}
pid.cnf: | pid.cnf: |
{{ tuple "etc/_pid.cnf.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_pid.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }}
tuning.cnf: | tuning.cnf: |
{{ tuple "etc/_tuning.cnf.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_tuning.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }}
networking.cnf: | networking.cnf: |
{{ tuple "etc/_networking.cnf.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_networking.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }}
wsrep.cnf: | wsrep.cnf: |
{{ tuple "etc/_wsrep.cnf.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_wsrep.cnf.tpl" . | include "helm-toolkit.template" | indent 4 }}

View File

@ -1,4 +1,4 @@
dependencies: dependencies:
- name: common - name: helm-toolkit
repository: http://localhost:8879/charts repository: http://localhost:8879/charts
version: 0.1.0 version: 0.1.0

View File

@ -1,4 +1,4 @@
dependencies: dependencies:
- name: common - name: helm-toolkit
repository: http://localhost:8879/charts repository: http://localhost:8879/charts
version: 0.1.0 version: 0.1.0

View File

@ -2,13 +2,13 @@
set -ex set -ex
export HOME=/tmp 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_port='{{ .Values.database.port }}' \
login_user='{{ .Values.database.root_user }}' \ login_user='{{ .Values.database.root_user }}' \
login_password='{{ .Values.database.root_password }}' \ login_password='{{ .Values.database.root_password }}' \
name='{{ .Values.database.neutron_database_name }}'" 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_port='{{ .Values.database.port }}' \
login_user='{{ .Values.database.root_user }}' \ login_user='{{ .Values.database.root_user }}' \
login_password='{{ .Values.database.root_password }}' \ login_password='{{ .Values.database.root_password }}' \

View File

@ -6,36 +6,36 @@ ansible localhost -vvv -m kolla_keystone_service -a "service_name=neutron \
service_type=network \ service_type=network \
description='Openstack Networking' \ description='Openstack Networking' \
endpoint_region={{ .Values.keystone.neutron_region_name }} \ endpoint_region={{ .Values.keystone.neutron_region_name }} \
url='{{ include "endpoint_neutron_api_internal" . }}' \ url='{{ include "helm-toolkit.endpoint_neutron_api_internal" . }}' \
interface=admin \ interface=admin \
region_name={{ .Values.keystone.admin_region_name }} \ region_name={{ .Values.keystone.admin_region_name }} \
auth='{{ include "keystone_auth" .}}'" \ auth='{{ include "helm-toolkit.keystone_auth" .}}'" \
-e "{'openstack_neutron_auth':{{ include "keystone_auth" .}}}" -e "{'openstack_neutron_auth':{{ include "helm-toolkit.keystone_auth" .}}}"
ansible localhost -vvv -m kolla_keystone_service -a "service_name=neutron \ ansible localhost -vvv -m kolla_keystone_service -a "service_name=neutron \
service_type=network \ service_type=network \
description='Openstack Networking' \ description='Openstack Networking' \
endpoint_region={{ .Values.keystone.neutron_region_name }} \ endpoint_region={{ .Values.keystone.neutron_region_name }} \
url='{{ include "endpoint_neutron_api_internal" . }}' \ url='{{ include "helm-toolkit.endpoint_neutron_api_internal" . }}' \
interface=internal \ interface=internal \
region_name={{ .Values.keystone.admin_region_name }} \ region_name={{ .Values.keystone.admin_region_name }} \
auth='{{ include "keystone_auth" .}}'" \ auth='{{ include "helm-toolkit.keystone_auth" .}}'" \
-e "{'openstack_neutron_auth':{{ include "keystone_auth" .}}}" -e "{'openstack_neutron_auth':{{ include "helm-toolkit.keystone_auth" .}}}"
ansible localhost -vvv -m kolla_keystone_service -a "service_name=neutron \ ansible localhost -vvv -m kolla_keystone_service -a "service_name=neutron \
service_type=network \ service_type=network \
description='Openstack Networking' \ description='Openstack Networking' \
endpoint_region={{ .Values.keystone.neutron_region_name }} \ endpoint_region={{ .Values.keystone.neutron_region_name }} \
url='{{ include "endpoint_neutron_api_internal" . }}' \ url='{{ include "helm-toolkit.endpoint_neutron_api_internal" . }}' \
interface=public \ interface=public \
region_name={{ .Values.keystone.admin_region_name }} \ region_name={{ .Values.keystone.admin_region_name }} \
auth='{{ include "keystone_auth" .}}'" \ auth='{{ include "helm-toolkit.keystone_auth" .}}'" \
-e "{'openstack_neutron_auth':{{ include "keystone_auth" .}}}" -e "{'openstack_neutron_auth':{{ include "helm-toolkit.keystone_auth" .}}}"
ansible localhost -vvv -m kolla_keystone_user -a "project=service \ ansible localhost -vvv -m kolla_keystone_user -a "project=service \
user={{ .Values.keystone.neutron_user }} \ user={{ .Values.keystone.neutron_user }} \
password={{ .Values.keystone.neutron_password }} \ password={{ .Values.keystone.neutron_password }} \
role=admin \ role=admin \
region_name={{ .Values.keystone.neutron_region_name }} \ region_name={{ .Values.keystone.neutron_region_name }} \
auth='{{ include "keystone_auth" .}}'" \ auth='{{ include "helm-toolkit.keystone_auth" .}}'" \
-e "{'openstack_neutron_auth':{{ include "keystone_auth" .}}}" -e "{'openstack_neutron_auth':{{ include "helm-toolkit.keystone_auth" .}}}"

View File

@ -4,14 +4,14 @@ metadata:
name: neutron-bin name: neutron-bin
data: data:
init.sh: | 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: | 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: | 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: | 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: | 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: | post.sh: |
{{ tuple "bin/_post.sh.tpl" . | include "template" | indent 4 }} {{ tuple "bin/_post.sh.tpl" . | include "helm-toolkit.template" | indent 4 }}

View File

@ -4,16 +4,16 @@ metadata:
name: neutron-etc name: neutron-etc
data: data:
dhcp-agent.ini: | 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: | 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: | 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: | 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: | neutron.conf: |
{{ tuple "etc/_neutron.conf.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_neutron.conf.tpl" . | include "helm-toolkit.template" | indent 4 }}
resolv.conf: | resolv.conf: |
{{ tuple "etc/_resolv.conf.tpl" . | include "template" | indent 4 }} {{ tuple "etc/_resolv.conf.tpl" . | include "helm-toolkit.template" | indent 4 }}
dnsmasq.conf: "" dnsmasq.conf: ""

View File

@ -10,10 +10,10 @@ spec:
labels: labels:
app: neutron-dhcp-agent app: neutron-dhcp-agent
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -10,10 +10,10 @@ spec:
labels: labels:
app: neutron-l3-agent app: neutron-l3-agent
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -10,10 +10,10 @@ spec:
labels: labels:
app: neutron-metadata-agent app: neutron-metadata-agent
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -10,10 +10,10 @@ spec:
labels: labels:
app: ovs-agent app: ovs-agent
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -8,8 +8,8 @@ spec:
labels: labels:
app: ovs-db app: ovs-db
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
spec: spec:
nodeSelector: nodeSelector:
{{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }} {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}

View File

@ -8,8 +8,8 @@ spec:
labels: labels:
app: ovs-vswitchd app: ovs-vswitchd
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
spec: spec:
nodeSelector: nodeSelector:
{{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }} {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}

View File

@ -19,10 +19,10 @@ spec:
labels: labels:
app: neutron-server app: neutron-server
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
pod.beta.kubernetes.io/init-containers: '[ 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: spec:
nodeSelector: nodeSelector:

View File

@ -3,8 +3,8 @@ debug = {{ .Values.metadata_agent.default.debug }}
# Neutron credentials for API access # Neutron credentials for API access
auth_plugin = password auth_plugin = password
auth_url = {{ include "endpoint_keystone_admin" . }} auth_url = {{ include "helm-toolkit.endpoint_keystone_admin" . }}
auth_uri = {{ include "endpoint_keystone_internal" . }} auth_uri = {{ include "helm-toolkit.endpoint_keystone_internal" . }}
auth_region = {{ .Values.keystone.neutron_region_name }} auth_region = {{ .Values.keystone.neutron_region_name }}
admin_tenant_name = service admin_tenant_name = service
project_domain_id = default project_domain_id = default
@ -15,7 +15,7 @@ password = {{ .Values.keystone.admin_password }}
endpoint_type = adminURL endpoint_type = adminURL
# Nova metadata service IP and port # 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_port = {{ .Values.network.port.metadata }}
nova_metadata_protocol = http nova_metadata_protocol = http

View File

@ -1,11 +1,11 @@
[ml2] [ml2]
# Changing type_drivers after bootstrap can lead to database inconsistencies # 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 }} 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] [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] [ml2_type_gre]
# (ListOpt) Comma-separated list of <tun_min>:<tun_max> tuples enumerating ranges # (ListOpt) Comma-separated list of <tun_min>:<tun_max> tuples enumerating ranges
@ -35,7 +35,7 @@ arp_responder = false
{{- end }} {{- end }}
[ovs] [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 }} tenant_network_type = {{ .Values.ml2.agent.tunnel_types }}
[vxlan] [vxlan]

Some files were not shown because too many files have changed in this diff Show More