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_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"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

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:
- name: common
- name: helm-toolkit
repository: http://localhost:8879/charts
version: 0.1.0

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
apiVersion: v1
description: A base chart for all openstack charts
name: common
name: helm-toolkit
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)") )
templates/_secrets.tpl: Makefile $(SECRETS)

View File

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

View File

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

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
# Copyright 2017 Pete Birley

View File

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

View File

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

View File

@ -1,4 +1,4 @@
{{- define "common_keystone_user" }}
{{- define "helm-toolkit.keystone_user" }}
#!/bin/bash
# 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 -}}
{{- $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",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
dependencies:
- name: common
- name: helm-toolkit
repository: http://localhost:8879/charts
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-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 }}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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: ""

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 <tun_min>:<tun_max> 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]

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