Merge "Telemetry: add ceilometer chart"
This commit is contained in:
commit
e6fff4b625
24
ceilometer/Chart.yaml
Normal file
24
ceilometer/Chart.yaml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
description: OpenStack-Helm Ceilometer
|
||||||
|
name: ceilometer
|
||||||
|
version: 0.1.0
|
||||||
|
home: https://docs.openstack.org/developer/ceilometer
|
||||||
|
sources:
|
||||||
|
- https://git.openstack.org/cgit/openstack/ceilometer
|
||||||
|
- https://git.openstack.org/cgit/openstack/openstack-helm
|
||||||
|
maintainers:
|
||||||
|
- name: OpenStack-Helm Authors
|
18
ceilometer/requirements.yaml
Normal file
18
ceilometer/requirements.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Copyright 2017 The Openstack-Helm Authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
- name: helm-toolkit
|
||||||
|
repository: http://localhost:8879/charts
|
||||||
|
version: 0.1.0
|
36
ceilometer/templates/bin/_ceilometer-api.sh.tpl
Normal file
36
ceilometer/templates/bin/_ceilometer-api.sh.tpl
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
COMMAND="${@:-start}"
|
||||||
|
|
||||||
|
function start () {
|
||||||
|
if [ -f /etc/apache2/envvars ]; then
|
||||||
|
# Loading Apache2 ENV variables
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Start Apache2
|
||||||
|
exec apache2 -DFOREGROUND
|
||||||
|
}
|
||||||
|
|
||||||
|
function stop () {
|
||||||
|
apachectl -k graceful-stop
|
||||||
|
}
|
||||||
|
|
||||||
|
$COMMAND
|
23
ceilometer/templates/bin/_ceilometer-central.sh.tpl
Normal file
23
ceilometer/templates/bin/_ceilometer-central.sh.tpl
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
exec ceilometer-polling \
|
||||||
|
--polling-namespaces central \
|
||||||
|
--config-file /etc/ceilometer/ceilometer.conf
|
22
ceilometer/templates/bin/_ceilometer-collector.sh.tpl
Normal file
22
ceilometer/templates/bin/_ceilometer-collector.sh.tpl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
exec ceilometer-collector \
|
||||||
|
--config-file /etc/ceilometer/ceilometer.conf
|
23
ceilometer/templates/bin/_ceilometer-compute.sh.tpl
Normal file
23
ceilometer/templates/bin/_ceilometer-compute.sh.tpl
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
exec ceilometer-polling \
|
||||||
|
--polling-namespaces compute \
|
||||||
|
--config-file /etc/ceilometer/ceilometer.conf
|
22
ceilometer/templates/bin/_ceilometer-notification.sh.tpl
Normal file
22
ceilometer/templates/bin/_ceilometer-notification.sh.tpl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
exec ceilometer-agent-notification \
|
||||||
|
--config-file /etc/ceilometer/ceilometer.conf
|
49
ceilometer/templates/bin/_db-init-mongodb.sh.tpl
Normal file
49
ceilometer/templates/bin/_db-init-mongodb.sh.tpl
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
MONGO_URL=$(echo $ROOT_DB_CONNECTION | awk -F '@' '{ print $NF }' | awk -F '/' '{ print $1 }')
|
||||||
|
MONGO_HOST=$(echo $MONGO_URL | awk -F ':' '{ print $1 }')
|
||||||
|
MONGO_PORT=$(echo $MONGO_URL | awk -F ':' '{ print $2 }')
|
||||||
|
|
||||||
|
MONGO_ADMIN_CREDS=$(echo $ROOT_DB_CONNECTION | awk -F '@' '{ print $1 }')
|
||||||
|
MONGO_ADMIN_USER=$(echo ${MONGO_ADMIN_CREDS#mongodb://} | awk -F ':' '{ print $1 }')
|
||||||
|
MONGO_ADMIN_PASS=$(echo ${MONGO_ADMIN_CREDS#mongodb://} | awk -F ':' '{ print $NF }')
|
||||||
|
|
||||||
|
MONGO_USER_CREDS=$(echo $USER_DB_CONNECTION | awk -F '@' '{ print $1 }')
|
||||||
|
MONGO_USER_USER=$(echo ${MONGO_USER_CREDS#mongodb://} | awk -F ':' '{ print $1 }')
|
||||||
|
MONGO_USER_PASS=$(echo ${MONGO_USER_CREDS#mongodb://} | awk -F ':' '{ print $NF }')
|
||||||
|
MONGO_USER_DB=$(echo $USER_DB_CONNECTION | awk -F '/' '{ print $NF }')
|
||||||
|
|
||||||
|
mongo admin \
|
||||||
|
--host "${MONGO_HOST}" \
|
||||||
|
--port "${MONGO_PORT}" \
|
||||||
|
--username "${MONGO_ADMIN_USER}" \
|
||||||
|
--password "${MONGO_ADMIN_PASS}" \
|
||||||
|
--eval "db = db.getSiblingDB(\"${MONGO_USER_DB}\"); \
|
||||||
|
db.changeUserPassword(\"${MONGO_USER_USER}\", \"${MONGO_USER_PASS}\")" || \
|
||||||
|
mongo admin \
|
||||||
|
--host "${MONGO_HOST}" \
|
||||||
|
--port "${MONGO_PORT}" \
|
||||||
|
--username "${MONGO_ADMIN_USER}" \
|
||||||
|
--password "${MONGO_ADMIN_PASS}" \
|
||||||
|
--eval "db = db.getSiblingDB(\"${MONGO_USER_DB}\");
|
||||||
|
db.createUser({user: \"${MONGO_USER_USER}\",
|
||||||
|
pwd: \"${MONGO_USER_PASS}\",
|
||||||
|
roles: [ \"readWrite\", \"dbAdmin\" ]})"
|
21
ceilometer/templates/bin/_db-sync.sh.tpl
Normal file
21
ceilometer/templates/bin/_db-sync.sh.tpl
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
exec ceilometer-dbsync
|
50
ceilometer/templates/configmap-bin.yaml
Normal file
50
ceilometer/templates/configmap-bin.yaml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.configmap_bin }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $rallyTests := .Values.conf.rally_tests }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: ceilometer-bin
|
||||||
|
data:
|
||||||
|
rally-test.sh: |
|
||||||
|
{{ tuple $rallyTests | include "helm-toolkit.scripts.rally_test" | indent 4 }}
|
||||||
|
db-init-mongodb.sh: |
|
||||||
|
{{ tuple "bin/_db-init-mongodb.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
db-init.py: |
|
||||||
|
{{- include "helm-toolkit.scripts.db_init" . | indent 4 }}
|
||||||
|
db-sync.sh: |
|
||||||
|
{{ tuple "bin/_db-sync.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
ks-service.sh: |+
|
||||||
|
{{- include "helm-toolkit.scripts.keystone_service" . | indent 4 }}
|
||||||
|
ks-endpoints.sh: |+
|
||||||
|
{{- include "helm-toolkit.scripts.keystone_endpoints" . | indent 4 }}
|
||||||
|
ks-user.sh: |+
|
||||||
|
{{- include "helm-toolkit.scripts.keystone_user" . | indent 4 }}
|
||||||
|
ceilometer-api.sh: |+
|
||||||
|
{{ tuple "bin/_ceilometer-api.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
ceilometer-central.sh: |+
|
||||||
|
{{ tuple "bin/_ceilometer-central.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
ceilometer-collector.sh: |+
|
||||||
|
{{ tuple "bin/_ceilometer-collector.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
ceilometer-compute.sh: |+
|
||||||
|
{{ tuple "bin/_ceilometer-compute.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
ceilometer-notification.sh: |+
|
||||||
|
{{ tuple "bin/_ceilometer-notification.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
{{- end }}
|
129
ceilometer/templates/configmap-etc.yaml
Normal file
129
ceilometer/templates/configmap-etc.yaml
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.configmap_etc }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.ceilometer.keystone_authtoken.auth_uri -}}
|
||||||
|
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ceilometer.keystone_authtoken "auth_uri" | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.ceilometer.keystone_authtoken.auth_url -}}
|
||||||
|
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ceilometer.keystone_authtoken "auth_url" | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.ceilometer.keystone_authtoken.memcached_servers -}}
|
||||||
|
{{- tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.ceilometer.keystone_authtoken "memcached_servers" | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.ceilometer.database.connection -}}
|
||||||
|
{{- tuple "oslo_db" "internal" "user" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup"| set .Values.conf.ceilometer.database "connection" | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.ceilometer.database.event_connection -}}
|
||||||
|
{{- tuple "mongodb" "internal" "user" "mongodb" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup"| set .Values.conf.ceilometer.database "event_connection" | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.ceilometer.database.metering_connection -}}
|
||||||
|
{{- tuple "mongodb" "internal" "user" "mongodb" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup"| set .Values.conf.ceilometer.database "metering_connection" | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.ceilometer.DEFAULT.transport_url -}}
|
||||||
|
{{- tuple "oslo_messaging" "internal" "user" "amqp" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.ceilometer.DEFAULT "transport_url" | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.ceilometer.oslo_messaging_notifications.transport_url -}}
|
||||||
|
{{- tuple "oslo_messaging" "internal" "user" "amqp" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.ceilometer.oslo_messaging_notifications "transport_url" | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.ceilometer.notification.messaging_urls -}}
|
||||||
|
{{- tuple "oslo_messaging" "internal" "user" "amqp" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.ceilometer.notification "messaging_urls" | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.ceilometer.keystone_authtoken.region_name -}}
|
||||||
|
{{- set .Values.conf.ceilometer.keystone_authtoken "region_name" .Values.endpoints.identity.auth.user.region_name | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.ceilometer.keystone_authtoken.project_name -}}
|
||||||
|
{{- set .Values.conf.ceilometer.keystone_authtoken "project_name" .Values.endpoints.identity.auth.user.project_name | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.ceilometer.keystone_authtoken.project_domain_name -}}
|
||||||
|
{{- set .Values.conf.ceilometer.keystone_authtoken "project_domain_name" .Values.endpoints.identity.auth.user.project_domain_name | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.ceilometer.keystone_authtoken.user_domain_name -}}
|
||||||
|
{{- set .Values.conf.ceilometer.keystone_authtoken "user_domain_name" .Values.endpoints.identity.auth.user.user_domain_name | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.ceilometer.keystone_authtoken.username -}}
|
||||||
|
{{- set .Values.conf.ceilometer.keystone_authtoken "username" .Values.endpoints.identity.auth.user.username | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.ceilometer.keystone_authtoken.password -}}
|
||||||
|
{{- set .Values.conf.ceilometer.keystone_authtoken "password" .Values.endpoints.identity.auth.user.password | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.ceilometer.service_credentials.auth_url -}}
|
||||||
|
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ceilometer.service_credentials "auth_url" | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.ceilometer.service_credentials.region_name -}}
|
||||||
|
{{- set .Values.conf.ceilometer.service_credentials "region_name" .Values.endpoints.identity.auth.user.region_name | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.ceilometer.service_credentials.project_name -}}
|
||||||
|
{{- set .Values.conf.ceilometer.service_credentials "project_name" .Values.endpoints.identity.auth.user.project_name | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.ceilometer.service_credentials.project_domain_name -}}
|
||||||
|
{{- set .Values.conf.ceilometer.service_credentials "project_domain_name" .Values.endpoints.identity.auth.user.project_domain_name | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.ceilometer.service_credentials.user_domain_name -}}
|
||||||
|
{{- set .Values.conf.ceilometer.service_credentials "user_domain_name" .Values.endpoints.identity.auth.user.user_domain_name | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.ceilometer.service_credentials.username -}}
|
||||||
|
{{- set .Values.conf.ceilometer.service_credentials "username" .Values.endpoints.identity.auth.user.username | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.ceilometer.service_credentials.password -}}
|
||||||
|
{{- set .Values.conf.ceilometer.service_credentials "password" .Values.endpoints.identity.auth.user.password | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.ceilometer.dispatcher_gnocchi.url -}}
|
||||||
|
{{- tuple "metric" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ceilometer.dispatcher_gnocchi "url" | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.ceilometer.api.aodh_url -}}
|
||||||
|
{{- tuple "alarming" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ceilometer.api "aodh_url" | quote | trunc 0 -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: ceilometer-etc
|
||||||
|
data:
|
||||||
|
rally_tests.yaml: |+
|
||||||
|
{{- tuple .Values.conf.rally_tests "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
|
||||||
|
ceilometer.conf: |+
|
||||||
|
{{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.ceilometer | indent 4 }}
|
||||||
|
api_paste.ini: |+
|
||||||
|
{{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | indent 4 }}
|
||||||
|
policy.json: |+
|
||||||
|
{{ toJson .Values.conf.policy | indent 4 }}
|
||||||
|
event_pipeline.yaml: |+
|
||||||
|
{{ toYaml .Values.conf.event_pipeline | indent 4 }}
|
||||||
|
pipeline.yaml: |+
|
||||||
|
{{ toYaml .Values.conf.pipeline | indent 4 }}
|
||||||
|
event_definitions.yaml: |+
|
||||||
|
{{ toYaml .Values.conf.event_definitions | indent 4 }}
|
||||||
|
gnocchi_resources.yaml: |+
|
||||||
|
{{ toYaml .Values.conf.gnocchi_resources | indent 4 }}
|
||||||
|
wsgi-ceilometer.conf: |+
|
||||||
|
{{- tuple .Values.conf.wsgi_ceilometer "etc/_wsgi-ceilometer.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
|
||||||
|
{{- end }}
|
117
ceilometer/templates/deployment-api.yaml
Normal file
117
ceilometer/templates/deployment-api.yaml
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.deployment_api }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $dependencies := .Values.dependencies.api }}
|
||||||
|
{{- $mounts_ceilometer_api := .Values.pod.mounts.ceilometer_api.ceilometer_api }}
|
||||||
|
{{- $mounts_ceilometer_api_init := .Values.pod.mounts.ceilometer_api.init_container }}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ceilometer-api
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.pod.replicas.api }}
|
||||||
|
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "ceilometer" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||||
|
annotations:
|
||||||
|
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
|
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
{{ tuple $envAll "ceilometer" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.api.node_selector_key }}: {{ .Values.labels.api.node_selector_value }}
|
||||||
|
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.api.timeout | default "30" }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll $dependencies $mounts_ceilometer_api_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: ceilometer-api
|
||||||
|
image: {{ .Values.images.api }}
|
||||||
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/ceilometer-api.sh
|
||||||
|
- start
|
||||||
|
lifecycle:
|
||||||
|
preStop:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /tmp/ceilometer-api.sh
|
||||||
|
- stop
|
||||||
|
ports:
|
||||||
|
- name: ce-api
|
||||||
|
containerPort: {{ .Values.network.api.port }}
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ .Values.network.api.port }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: pod-etc-ceilometer
|
||||||
|
mountPath: /etc/ceilometer
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/ceilometer.conf
|
||||||
|
subPath: ceilometer.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/api_paste.ini
|
||||||
|
subPath: api_paste.ini
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/policy.json
|
||||||
|
subPath: policy.json
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/event_definitions.yaml
|
||||||
|
subPath: event_definitions.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/event_pipeline.yaml
|
||||||
|
subPath: event_pipeline.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/pipeline.yaml
|
||||||
|
subPath: pipeline.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/gnocchi_resources.yaml
|
||||||
|
subPath: gnocchi_resources.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/apache2/conf-enabled/000-default.conf
|
||||||
|
subPath: wsgi-ceilometer.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-bin
|
||||||
|
mountPath: /tmp/ceilometer-api.sh
|
||||||
|
subPath: ceilometer-api.sh
|
||||||
|
readOnly: true
|
||||||
|
{{ if $mounts_ceilometer_api.volumeMounts }}{{ toYaml $mounts_ceilometer_api.volumeMounts | indent 12 }}{{ end }}
|
||||||
|
volumes:
|
||||||
|
- name: pod-etc-ceilometer
|
||||||
|
emptyDir: {}
|
||||||
|
- name: ceilometer-etc
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-etc
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: ceilometer-bin
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
{{ if $mounts_ceilometer_api.volumes }}{{ toYaml $mounts_ceilometer_api.volumes | indent 8 }}{{ end }}
|
||||||
|
{{- end }}
|
99
ceilometer/templates/deployment-central.yaml
Normal file
99
ceilometer/templates/deployment-central.yaml
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.deployment_central }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $dependencies := .Values.dependencies.central }}
|
||||||
|
{{- $mounts_ceilometer_central := .Values.pod.mounts.ceilometer_central.ceilometer_central }}
|
||||||
|
{{- $mounts_ceilometer_central_init := .Values.pod.mounts.ceilometer_central.init_container }}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ceilometer-central
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.pod.replicas.central }}
|
||||||
|
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "ceilometer" "central" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||||
|
annotations:
|
||||||
|
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
|
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
{{ tuple $envAll "ceilometer" "central" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.central.node_selector_key }}: {{ .Values.labels.central.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll $dependencies $mounts_ceilometer_central_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: ceilometer-central
|
||||||
|
image: {{ .Values.images.central }}
|
||||||
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.central | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/ceilometer-central.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: pod-etc-ceilometer
|
||||||
|
mountPath: /etc/ceilometer
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/ceilometer.conf
|
||||||
|
subPath: ceilometer.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/api_paste.ini
|
||||||
|
subPath: api_paste.ini
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/policy.json
|
||||||
|
subPath: policy.json
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/event_definitions.yaml
|
||||||
|
subPath: event_definitions.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/event_pipeline.yaml
|
||||||
|
subPath: event_pipeline.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/pipeline.yaml
|
||||||
|
subPath: pipeline.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/gnocchi_resources.yaml
|
||||||
|
subPath: gnocchi_resources.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-bin
|
||||||
|
mountPath: /tmp/ceilometer-central.sh
|
||||||
|
subPath: ceilometer-central.sh
|
||||||
|
readOnly: true
|
||||||
|
{{ if $mounts_ceilometer_central.volumeMounts }}{{ toYaml $mounts_ceilometer_central.volumeMounts | indent 12 }}{{ end }}
|
||||||
|
volumes:
|
||||||
|
- name: pod-etc-ceilometer
|
||||||
|
emptyDir: {}
|
||||||
|
- name: ceilometer-etc
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-etc
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: ceilometer-bin
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
{{ if $mounts_ceilometer_central.volumes }}{{ toYaml $mounts_ceilometer_central.volumes | indent 8 }}{{ end }}
|
||||||
|
{{- end }}
|
99
ceilometer/templates/deployment-collector.yaml
Normal file
99
ceilometer/templates/deployment-collector.yaml
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.deployment_collector }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $dependencies := .Values.dependencies.collector }}
|
||||||
|
{{- $mounts_ceilometer_collector := .Values.pod.mounts.ceilometer_collector.ceilometer_collector }}
|
||||||
|
{{- $mounts_ceilometer_collector_init := .Values.pod.mounts.ceilometer_collector.init_container }}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ceilometer-collector
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.pod.replicas.collector }}
|
||||||
|
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "ceilometer" "collector" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||||
|
annotations:
|
||||||
|
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
|
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
{{ tuple $envAll "ceilometer" "collector" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.collector.node_selector_key }}: {{ .Values.labels.collector.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll $dependencies $mounts_ceilometer_collector_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: ceilometer-collector
|
||||||
|
image: {{ .Values.images.collector }}
|
||||||
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.collector | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/ceilometer-collector.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: pod-etc-ceilometer
|
||||||
|
mountPath: /etc/ceilometer
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/ceilometer.conf
|
||||||
|
subPath: ceilometer.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/api_paste.ini
|
||||||
|
subPath: api_paste.ini
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/policy.json
|
||||||
|
subPath: policy.json
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/event_definitions.yaml
|
||||||
|
subPath: event_definitions.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/event_pipeline.yaml
|
||||||
|
subPath: event_pipeline.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/pipeline.yaml
|
||||||
|
subPath: pipeline.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/gnocchi_resources.yaml
|
||||||
|
subPath: gnocchi_resources.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-bin
|
||||||
|
mountPath: /tmp/ceilometer-collector.sh
|
||||||
|
subPath: ceilometer-collector.sh
|
||||||
|
readOnly: true
|
||||||
|
{{ if $mounts_ceilometer_collector.volumeMounts }}{{ toYaml $mounts_ceilometer_collector.volumeMounts | indent 12 }}{{ end }}
|
||||||
|
volumes:
|
||||||
|
- name: pod-etc-ceilometer
|
||||||
|
emptyDir: {}
|
||||||
|
- name: ceilometer-etc
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-etc
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: ceilometer-bin
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
{{ if $mounts_ceilometer_collector.volumes }}{{ toYaml $mounts_ceilometer_collector.volumes | indent 8 }}{{ end }}
|
||||||
|
{{- end }}
|
128
ceilometer/templates/deployment-compute.yaml
Normal file
128
ceilometer/templates/deployment-compute.yaml
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.deployment_compute }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $dependencies := .Values.dependencies.compute }}
|
||||||
|
{{- $mounts_ceilometer_compute := .Values.pod.mounts.ceilometer_compute.ceilometer_compute }}
|
||||||
|
{{- $mounts_ceilometer_compute_init := .Values.pod.mounts.ceilometer_compute.init_container }}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ceilometer-compute
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.pod.replicas.compute }}
|
||||||
|
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "ceilometer" "compute" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||||
|
annotations:
|
||||||
|
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
|
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
{{ tuple $envAll "ceilometer" "compute" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||||
|
hostNetwork: true
|
||||||
|
hostPID: true
|
||||||
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.compute.node_selector_key }}: {{ .Values.labels.compute.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll $dependencies $mounts_ceilometer_compute_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: ceilometer-compute
|
||||||
|
image: {{ .Values.images.compute }}
|
||||||
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.compute | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/ceilometer-compute.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: pod-etc-ceilometer
|
||||||
|
mountPath: /etc/ceilometer
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/ceilometer.conf
|
||||||
|
subPath: ceilometer.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/api_paste.ini
|
||||||
|
subPath: api_paste.ini
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/policy.json
|
||||||
|
subPath: policy.json
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/event_definitions.yaml
|
||||||
|
subPath: event_definitions.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/event_pipeline.yaml
|
||||||
|
subPath: event_pipeline.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/pipeline.yaml
|
||||||
|
subPath: pipeline.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/gnocchi_resources.yaml
|
||||||
|
subPath: gnocchi_resources.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-bin
|
||||||
|
mountPath: /tmp/ceilometer-compute.sh
|
||||||
|
subPath: ceilometer-compute.sh
|
||||||
|
readOnly: true
|
||||||
|
- name: varlibnova
|
||||||
|
mountPath: /var/lib/nova
|
||||||
|
- name: varliblibvirt
|
||||||
|
mountPath: /var/lib/libvirt
|
||||||
|
- name: run
|
||||||
|
mountPath: /run
|
||||||
|
- name: cgroup
|
||||||
|
mountPath: /sys/fs/cgroup
|
||||||
|
- name: machine-id
|
||||||
|
mountPath: /etc/machine-id
|
||||||
|
readOnly: true
|
||||||
|
{{ if $mounts_ceilometer_compute.volumeMounts }}{{ toYaml $mounts_ceilometer_compute.volumeMounts | indent 12 }}{{ end }}
|
||||||
|
volumes:
|
||||||
|
- name: pod-etc-ceilometer
|
||||||
|
emptyDir: {}
|
||||||
|
- name: ceilometer-etc
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-etc
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: ceilometer-bin
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
- name: varlibnova
|
||||||
|
hostPath:
|
||||||
|
path: /var/lib/nova
|
||||||
|
- name: varliblibvirt
|
||||||
|
hostPath:
|
||||||
|
path: /var/lib/libvirt
|
||||||
|
- name: run
|
||||||
|
hostPath:
|
||||||
|
path: /run
|
||||||
|
- name: cgroup
|
||||||
|
hostPath:
|
||||||
|
path: /sys/fs/cgroup
|
||||||
|
- name: machine-id
|
||||||
|
hostPath:
|
||||||
|
path: /etc/machine-id
|
||||||
|
{{ if $mounts_ceilometer_compute.volumes }}{{ toYaml $mounts_ceilometer_compute.volumes | indent 8 }}{{ end }}
|
||||||
|
{{- end }}
|
99
ceilometer/templates/deployment-notification.yaml
Normal file
99
ceilometer/templates/deployment-notification.yaml
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.deployment_notification }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $dependencies := .Values.dependencies.notification }}
|
||||||
|
{{- $mounts_ceilometer_notification := .Values.pod.mounts.ceilometer_notification.ceilometer_notification }}
|
||||||
|
{{- $mounts_ceilometer_notification_init := .Values.pod.mounts.ceilometer_notification.init_container }}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ceilometer-notification
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.pod.replicas.notification }}
|
||||||
|
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "ceilometer" "notification" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||||
|
annotations:
|
||||||
|
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
|
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
{{ tuple $envAll "ceilometer" "notification" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.notification.node_selector_key }}: {{ .Values.labels.notification.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll $dependencies $mounts_ceilometer_notification_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: ceilometer-notification
|
||||||
|
image: {{ .Values.images.notification }}
|
||||||
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.notification | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/ceilometer-notification.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: pod-etc-ceilometer
|
||||||
|
mountPath: /etc/ceilometer
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/ceilometer.conf
|
||||||
|
subPath: ceilometer.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/api_paste.ini
|
||||||
|
subPath: api_paste.ini
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/policy.json
|
||||||
|
subPath: policy.json
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/event_definitions.yaml
|
||||||
|
subPath: event_definitions.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/event_pipeline.yaml
|
||||||
|
subPath: event_pipeline.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/pipeline.yaml
|
||||||
|
subPath: pipeline.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/gnocchi_resources.yaml
|
||||||
|
subPath: gnocchi_resources.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-bin
|
||||||
|
mountPath: /tmp/ceilometer-notification.sh
|
||||||
|
subPath: ceilometer-notification.sh
|
||||||
|
readOnly: true
|
||||||
|
{{ if $mounts_ceilometer_notification.volumeMounts }}{{ toYaml $mounts_ceilometer_notification.volumeMounts | indent 12 }}{{ end }}
|
||||||
|
volumes:
|
||||||
|
- name: pod-etc-ceilometer
|
||||||
|
emptyDir: {}
|
||||||
|
- name: ceilometer-etc
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-etc
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: ceilometer-bin
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
{{ if $mounts_ceilometer_notification.volumes }}{{ toYaml $mounts_ceilometer_notification.volumes | indent 8 }}{{ end }}
|
||||||
|
{{- end }}
|
76
ceilometer/templates/etc/_rally_tests.yaml.tpl
Normal file
76
ceilometer/templates/etc/_rally_tests.yaml.tpl
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
---
|
||||||
|
CeilometerStats.create_meter_and_get_stats:
|
||||||
|
-
|
||||||
|
args:
|
||||||
|
user_id: "user-id"
|
||||||
|
resource_id: "resource-id"
|
||||||
|
counter_volume: 1.0
|
||||||
|
counter_unit: ""
|
||||||
|
counter_type: "cumulative"
|
||||||
|
runner:
|
||||||
|
type: "constant"
|
||||||
|
times: 1
|
||||||
|
concurrency: 1
|
||||||
|
context:
|
||||||
|
users:
|
||||||
|
tenants: 1
|
||||||
|
users_per_tenant: 1
|
||||||
|
sla:
|
||||||
|
failure_rate:
|
||||||
|
max: 0
|
||||||
|
CeilometerMeters.list_meters:
|
||||||
|
-
|
||||||
|
runner:
|
||||||
|
type: constant
|
||||||
|
times: 1
|
||||||
|
concurrency: 1
|
||||||
|
sla:
|
||||||
|
failure_rate:
|
||||||
|
max: 0
|
||||||
|
context:
|
||||||
|
users:
|
||||||
|
tenants: 1
|
||||||
|
users_per_tenant: 1
|
||||||
|
ceilometer:
|
||||||
|
counter_name: "benchmark_meter"
|
||||||
|
counter_type: "gauge"
|
||||||
|
counter_unit: "%"
|
||||||
|
counter_volume: 1
|
||||||
|
resources_per_tenant: 1
|
||||||
|
samples_per_resource: 1
|
||||||
|
timestamp_interval: 10
|
||||||
|
metadata_list:
|
||||||
|
-
|
||||||
|
status: "active"
|
||||||
|
name: "rally benchmark on"
|
||||||
|
deleted: "false"
|
||||||
|
-
|
||||||
|
status: "terminated"
|
||||||
|
name: "rally benchmark off"
|
||||||
|
deleted: "true"
|
||||||
|
args:
|
||||||
|
limit: 5
|
||||||
|
metadata_query:
|
||||||
|
status: "terminated"
|
||||||
|
CeilometerQueries.create_and_query_samples:
|
||||||
|
-
|
||||||
|
args:
|
||||||
|
filter: {"=": {"counter_unit": "instance"}}
|
||||||
|
orderby: !!null
|
||||||
|
limit: 10
|
||||||
|
counter_name: "cpu_util"
|
||||||
|
counter_type: "gauge"
|
||||||
|
counter_unit: "instance"
|
||||||
|
counter_volume: 1.0
|
||||||
|
resource_id: "resource_id"
|
||||||
|
runner:
|
||||||
|
type: "constant"
|
||||||
|
times: 1
|
||||||
|
concurrency: 1
|
||||||
|
context:
|
||||||
|
users:
|
||||||
|
tenants: 1
|
||||||
|
users_per_tenant: 1
|
||||||
|
sla:
|
||||||
|
failure_rate:
|
||||||
|
max: 0
|
42
ceilometer/templates/etc/_wsgi-ceilometer.conf.tpl
Normal file
42
ceilometer/templates/etc/_wsgi-ceilometer.conf.tpl
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
Listen 0.0.0.0:{{ .Values.network.api.port }}
|
||||||
|
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||||
|
|
||||||
|
<VirtualHost *:{{ .Values.network.api.port }}>
|
||||||
|
LogLevel info
|
||||||
|
WSGIDaemonProcess ceilometer-api processes=2 threads=1 user=ceilometer group=ceilometer display-name=%{GROUP} python-path=/var/lib/kolla/venv/lib/python2.7/site-packages
|
||||||
|
WSGIProcessGroup ceilometer-api
|
||||||
|
|
||||||
|
WSGIScriptReloading On
|
||||||
|
WSGIScriptAlias / /var/lib/kolla/venv/lib/python2.7/site-packages/ceilometer/api/app.wsgi
|
||||||
|
|
||||||
|
WSGIApplicationGroup %{GLOBAL}
|
||||||
|
|
||||||
|
<Directory "/var/lib/kolla/venv/lib/python2.7/site-packages/ceilometer/api">
|
||||||
|
<IfVersion >= 2.4>
|
||||||
|
Require all granted
|
||||||
|
</IfVersion>
|
||||||
|
<IfVersion < 2.4>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
</IfVersion>
|
||||||
|
</Directory>
|
||||||
|
ErrorLog /dev/stdout
|
||||||
|
CustomLog /dev/stdout combined
|
||||||
|
</VirtualHost>
|
60
ceilometer/templates/ingress-api.yaml
Normal file
60
ceilometer/templates/ingress-api.yaml
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.ingress_api }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- if .Values.network.api.ingress.public }}
|
||||||
|
{{- $backendServiceType := "metering" }}
|
||||||
|
{{- $backendPort := "ce-api" }}
|
||||||
|
{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||||
|
{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||||
|
{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||||
|
{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
|
||||||
|
{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }}
|
||||||
|
---
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ $ingressName }}
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
ingress.kubernetes.io/rewrite-target: /
|
||||||
|
ingress.kubernetes.io/proxy-body-size: {{ .Values.network.api.ingress.proxy_body_size }}
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
{{ if ne $hostNameNamespaced $hostNameFull }}
|
||||||
|
{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }}
|
||||||
|
- host: {{ $vHost }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
backend:
|
||||||
|
serviceName: {{ $backendName }}
|
||||||
|
servicePort: {{ $backendPort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }}
|
||||||
|
- host: {{ $vHost }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
backend:
|
||||||
|
serviceName: {{ $backendName }}
|
||||||
|
servicePort: {{ $backendPort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
61
ceilometer/templates/job-db-init-mongodb.yaml
Normal file
61
ceilometer/templates/job-db-init-mongodb.yaml
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.job_db_init_mongodb }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $dependencies := .Values.dependencies.db_init_mongodb }}
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: ceilometer-db-init-mongodb
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: ceilometer-db-init-mongodb
|
||||||
|
image: {{ .Values.images.db_init_mongodb | quote }}
|
||||||
|
imagePullPolicy: {{ .Values.images.pull_policy | quote }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.jobs.db_init_mongodb | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
env:
|
||||||
|
- name: ROOT_DB_CONNECTION
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Values.secrets.mongodb.admin }}
|
||||||
|
key: DB_CONNECTION
|
||||||
|
- name: USER_DB_CONNECTION
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Values.secrets.mongodb.user }}
|
||||||
|
key: DB_CONNECTION
|
||||||
|
command:
|
||||||
|
- /tmp/db-init-mongodb.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: ceilometer-bin
|
||||||
|
mountPath: /tmp/db-init-mongodb.sh
|
||||||
|
subPath: db-init-mongodb.sh
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- name: ceilometer-bin
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
{{- end }}
|
74
ceilometer/templates/job-db-init.yaml
Normal file
74
ceilometer/templates/job-db-init.yaml
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.job_db_init }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $dependencies := .Values.dependencies.db_init }}
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: ceilometer-db-init
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: ceilometer-db-init
|
||||||
|
image: {{ .Values.images.db_init | quote }}
|
||||||
|
imagePullPolicy: {{ .Values.images.pull_policy | quote }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.jobs.db_init | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
env:
|
||||||
|
- name: ROOT_DB_CONNECTION
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Values.secrets.oslo_db.admin }}
|
||||||
|
key: DB_CONNECTION
|
||||||
|
- name: OPENSTACK_CONFIG_FILE
|
||||||
|
value: /etc/ceilometer/ceilometer.conf
|
||||||
|
- name: OPENSTACK_CONFIG_DB_SECTION
|
||||||
|
value: database
|
||||||
|
- name: OPENSTACK_CONFIG_DB_KEY
|
||||||
|
value: connection
|
||||||
|
command:
|
||||||
|
- /tmp/db-init.py
|
||||||
|
volumeMounts:
|
||||||
|
- name: ceilometer-bin
|
||||||
|
mountPath: /tmp/db-init.py
|
||||||
|
subPath: db-init.py
|
||||||
|
readOnly: true
|
||||||
|
- name: etcceilometer
|
||||||
|
mountPath: /etc/ceilometer
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/ceilometer.conf
|
||||||
|
subPath: ceilometer.conf
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- name: etcceilometer
|
||||||
|
emptyDir: {}
|
||||||
|
- name: ceilometer-etc
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-etc
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: ceilometer-bin
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
{{- end }}
|
62
ceilometer/templates/job-db-sync.yaml
Normal file
62
ceilometer/templates/job-db-sync.yaml
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.job_db_sync }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $dependencies := .Values.dependencies.db_sync }}
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: ceilometer-db-sync
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: ceilometer-db-sync
|
||||||
|
image: {{ .Values.images.db_sync }}
|
||||||
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.jobs.db_sync | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/db-sync.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: ceilometer-bin
|
||||||
|
mountPath: /tmp/db-sync.sh
|
||||||
|
subPath: db-sync.sh
|
||||||
|
readOnly: true
|
||||||
|
- name: etcceilometer
|
||||||
|
mountPath: /etc/ceilometer
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/ceilometer/ceilometer.conf
|
||||||
|
subPath: ceilometer.conf
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- name: etcceilometer
|
||||||
|
emptyDir: {}
|
||||||
|
- name: ceilometer-etc
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-etc
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: ceilometer-bin
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
{{- end }}
|
66
ceilometer/templates/job-ks-endpoints.yaml
Normal file
66
ceilometer/templates/job-ks-endpoints.yaml
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.job_ks_endpoints }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $dependencies := .Values.dependencies.ks_endpoints }}
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: ceilometer-ks-endpoints
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
containers:
|
||||||
|
{{- range $key1, $osServiceType := tuple "metering" }}
|
||||||
|
{{- range $key2, $osServiceEndPoint := tuple "admin" "internal" "public" }}
|
||||||
|
- name: {{ $osServiceType }}-ks-endpoints-{{ $osServiceEndPoint }}
|
||||||
|
image: {{ $envAll.Values.images.ks_endpoints }}
|
||||||
|
imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.jobs.ks_endpoints | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/ks-endpoints.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: ks-endpoints-sh
|
||||||
|
mountPath: /tmp/ks-endpoints.sh
|
||||||
|
subPath: ks-endpoints.sh
|
||||||
|
readOnly: true
|
||||||
|
env:
|
||||||
|
{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.admin }}
|
||||||
|
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
- name: OS_SVC_ENDPOINT
|
||||||
|
value: {{ $osServiceEndPoint }}
|
||||||
|
- name: OS_SERVICE_NAME
|
||||||
|
value: {{ tuple $osServiceType $envAll | include "helm-toolkit.endpoints.keystone_endpoint_name_lookup" }}
|
||||||
|
- name: OS_SERVICE_TYPE
|
||||||
|
value: {{ $osServiceType }}
|
||||||
|
- name: OS_SERVICE_ENDPOINT
|
||||||
|
value: {{ tuple $osServiceType $osServiceEndPoint "api" $envAll | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: ks-endpoints-sh
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
{{- end }}
|
60
ceilometer/templates/job-ks-service.yaml
Normal file
60
ceilometer/templates/job-ks-service.yaml
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.job_ks_service }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $dependencies := .Values.dependencies.ks_service }}
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: ceilometer-ks-service
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
containers:
|
||||||
|
{{- range $key1, $osServiceType := tuple "metering" }}
|
||||||
|
- name: {{ $osServiceType }}-ks-service-registration
|
||||||
|
image: {{ $envAll.Values.images.ks_service }}
|
||||||
|
imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.jobs.ks_service | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/ks-service.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: ks-service-sh
|
||||||
|
mountPath: /tmp/ks-service.sh
|
||||||
|
subPath: ks-service.sh
|
||||||
|
readOnly: true
|
||||||
|
env:
|
||||||
|
{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.admin }}
|
||||||
|
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
- name: OS_SERVICE_NAME
|
||||||
|
value: {{ tuple $osServiceType $envAll | include "helm-toolkit.endpoints.keystone_endpoint_name_lookup" }}
|
||||||
|
- name: OS_SERVICE_TYPE
|
||||||
|
value: {{ $osServiceType }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: ks-service-sh
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
{{- end }}
|
61
ceilometer/templates/job-ks-user.yaml
Normal file
61
ceilometer/templates/job-ks-user.yaml
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.job_ks_user }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $dependencies := .Values.dependencies.ks_user }}
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: ceilometer-ks-user
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: ceilometer-ks-user
|
||||||
|
image: {{ .Values.images.ks_user }}
|
||||||
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.jobs.ks_user | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/ks-user.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: ks-user-sh
|
||||||
|
mountPath: /tmp/ks-user.sh
|
||||||
|
subPath: ks-user.sh
|
||||||
|
readOnly: true
|
||||||
|
env:
|
||||||
|
{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.admin }}
|
||||||
|
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
- name: SERVICE_OS_SERVICE_NAME
|
||||||
|
value: "ceilometer"
|
||||||
|
{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.user }}
|
||||||
|
{{- include "helm-toolkit.snippets.keystone_user_create_env_vars" $env | indent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
- name: SERVICE_OS_ROLE
|
||||||
|
value: {{ .Values.endpoints.identity.auth.user.role | quote }}
|
||||||
|
volumes:
|
||||||
|
- name: ks-user-sh
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
{{- end }}
|
29
ceilometer/templates/pdb-api.yaml
Normal file
29
ceilometer/templates/pdb-api.yaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.pdb_api }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
---
|
||||||
|
apiVersion: policy/v1beta1
|
||||||
|
kind: PodDisruptionBudget
|
||||||
|
metadata:
|
||||||
|
name: ceilometer-api
|
||||||
|
spec:
|
||||||
|
minAvailable: {{ .Values.pod.lifecycle.disruption_budget.api.min_available }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ceilometer-api
|
||||||
|
{{- end }}
|
70
ceilometer/templates/pod-rally-test.yaml
Normal file
70
ceilometer/templates/pod-rally-test.yaml
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.pod_rally_test }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $dependencies := .Values.dependencies.tests }}
|
||||||
|
{{- $mounts_ceilometer_tests := .Values.pod.mounts.ceilometer_tests.ceilometer_tests }}
|
||||||
|
{{- $mounts_ceilometer_tests_init := .Values.pod.mounts.ceilometer_tests.init_container }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: "{{.Release.Name}}-rally-test"
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test-success
|
||||||
|
spec:
|
||||||
|
restartPolicy: Never
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll $dependencies $mounts_ceilometer_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: {{.Release.Name}}-token-issue-test
|
||||||
|
image: {{ .Values.images.test }}
|
||||||
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.jobs.tests | include "helm-toolkit.snippets.kubernetes_resources" | indent 6 }}
|
||||||
|
env:
|
||||||
|
{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.admin }}
|
||||||
|
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
- name: RALLY_ENV_NAME
|
||||||
|
value: {{.Release.Name}}
|
||||||
|
command:
|
||||||
|
- /tmp/rally-test.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: ceilometer-etc
|
||||||
|
mountPath: /etc/rally/rally_tests.yaml
|
||||||
|
subPath: rally_tests.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: ceilometer-bin
|
||||||
|
mountPath: /tmp/rally-test.sh
|
||||||
|
subPath: rally-test.sh
|
||||||
|
readOnly: true
|
||||||
|
- name: rally-db
|
||||||
|
mountPath: /var/lib/rally
|
||||||
|
{{ if $mounts_ceilometer_tests.volumeMounts }}{{ toYaml $mounts_ceilometer_tests.volumeMounts | indent 8 }}{{ end }}
|
||||||
|
volumes:
|
||||||
|
- name: ceilometer-etc
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-etc
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: ceilometer-bin
|
||||||
|
configMap:
|
||||||
|
name: ceilometer-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
- name: rally-db
|
||||||
|
emptyDir: {}
|
||||||
|
{{ if $mounts_ceilometer_tests.volumes }}{{ toYaml $mounts_ceilometer_tests.volumes | indent 4 }}{{ end }}
|
||||||
|
{{- end }}
|
30
ceilometer/templates/secret-db.yaml
Normal file
30
ceilometer/templates/secret-db.yaml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.secret_db }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- range $key1, $userClass := tuple "admin" "user" }}
|
||||||
|
{{- $secretName := index $envAll.Values.secrets.oslo_db $userClass }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ $secretName }}
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
DB_CONNECTION: {{ tuple "oslo_db" "internal" $userClass "mysql" $envAll | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | b64enc -}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
30
ceilometer/templates/secret-keystone.yaml
Normal file
30
ceilometer/templates/secret-keystone.yaml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.secret_keystone }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- range $key1, $userClass := tuple "admin" "user" }}
|
||||||
|
{{- $secretName := index $envAll.Values.secrets.identity $userClass }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ $secretName }}
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
{{- tuple $userClass "internal" $envAll | include "helm-toolkit.snippets.keystone_secret_openrc" | indent 2 -}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
30
ceilometer/templates/secret-mongodb.yaml
Normal file
30
ceilometer/templates/secret-mongodb.yaml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.secret_mongodb }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- range $key1, $userClass := tuple "admin" "user" }}
|
||||||
|
{{- $secretName := index $envAll.Values.secrets.mongodb $userClass }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ $secretName }}
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
DB_CONNECTION: {{ tuple "mongodb" "internal" $userClass "mongodb" $envAll | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | b64enc -}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
36
ceilometer/templates/service-api.yaml
Normal file
36
ceilometer/templates/service-api.yaml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.service_api }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ tuple "metering" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: ce-api
|
||||||
|
port: {{ .Values.network.api.port }}
|
||||||
|
{{ if .Values.network.api.node_port.enabled }}
|
||||||
|
nodePort: {{ .Values.network.api.node_port.port }}
|
||||||
|
{{ end }}
|
||||||
|
selector:
|
||||||
|
{{ tuple $envAll "ceilometer" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
|
{{ if .Values.network.api.node_port.enabled }}
|
||||||
|
type: NodePort
|
||||||
|
{{ end }}
|
||||||
|
{{- end }}
|
32
ceilometer/templates/service-ingress-api.yaml
Normal file
32
ceilometer/templates/service-ingress-api.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{{/*
|
||||||
|
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.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.service_ingress_api }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- if .Values.network.api.ingress.public }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ tuple "metering" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
selector:
|
||||||
|
app: ingress-api
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
1919
ceilometer/values.yaml
Normal file
1919
ceilometer/values.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@ -130,6 +130,7 @@ if [ "x$INTEGRATION" == "xmulti" ]; then
|
|||||||
helm install --namespace=openstack ${WORK_DIR}/postgresql --name=postgresql
|
helm install --namespace=openstack ${WORK_DIR}/postgresql --name=postgresql
|
||||||
helm install --namespace=openstack ${WORK_DIR}/gnocchi --name=gnocchi
|
helm install --namespace=openstack ${WORK_DIR}/gnocchi --name=gnocchi
|
||||||
helm install --namespace=openstack ${WORK_DIR}/mongodb --name=mongodb
|
helm install --namespace=openstack ${WORK_DIR}/mongodb --name=mongodb
|
||||||
|
helm install --namespace=openstack ${WORK_DIR}/ceilometer --name=ceilometer
|
||||||
fi
|
fi
|
||||||
kube_wait_for_pods openstack ${POD_START_TIMEOUT_OPENSTACK}
|
kube_wait_for_pods openstack ${POD_START_TIMEOUT_OPENSTACK}
|
||||||
fi
|
fi
|
||||||
@ -205,6 +206,7 @@ if [ "x$INTEGRATION" == "xmulti" ]; then
|
|||||||
|
|
||||||
helm_test_deployment keystone ${SERVICE_TEST_TIMEOUT}
|
helm_test_deployment keystone ${SERVICE_TEST_TIMEOUT}
|
||||||
helm_test_deployment gnocchi ${SERVICE_TEST_TIMEOUT}
|
helm_test_deployment gnocchi ${SERVICE_TEST_TIMEOUT}
|
||||||
|
helm_test_deployment ceilometer ${SERVICE_TEST_TIMEOUT}
|
||||||
helm_test_deployment glance ${SERVICE_TEST_TIMEOUT}
|
helm_test_deployment glance ${SERVICE_TEST_TIMEOUT}
|
||||||
helm_test_deployment cinder ${SERVICE_TEST_TIMEOUT}
|
helm_test_deployment cinder ${SERVICE_TEST_TIMEOUT}
|
||||||
helm_test_deployment neutron ${SERVICE_TEST_TIMEOUT}
|
helm_test_deployment neutron ${SERVICE_TEST_TIMEOUT}
|
||||||
|
Loading…
Reference in New Issue
Block a user