Gnocchi: Move chart to openstack-helm-infra
This moves the gnocchi chart to openstack-helm-infra as part of the effort to move charts to appropriate repositories Change-Id: I7b8f35a6a140995902304c402a077cf99be6190a
This commit is contained in:
parent
201c0a6d21
commit
4047f7231e
21
gnocchi/.helmignore
Normal file
21
gnocchi/.helmignore
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
25
gnocchi/Chart.yaml
Normal file
25
gnocchi/Chart.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# 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 Gnocchi
|
||||||
|
name: gnocchi
|
||||||
|
version: 0.1.0
|
||||||
|
home: https://gnocchi.xyz/
|
||||||
|
icon: https://gnocchi.xyz/_static/gnocchi-logo.png
|
||||||
|
sources:
|
||||||
|
- https://github.com/gnocchixyz/gnocchi
|
||||||
|
- https://git.openstack.org/cgit/openstack/openstack-helm
|
||||||
|
maintainers:
|
||||||
|
- name: OpenStack-Helm Authors
|
18
gnocchi/requirements.yaml
Normal file
18
gnocchi/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
|
20
gnocchi/templates/bin/_bootstrap.sh.tpl
Normal file
20
gnocchi/templates/bin/_bootstrap.sh.tpl
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/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
|
||||||
|
{{ .Values.bootstrap.script | default "echo 'Not Enabled'" }}
|
31
gnocchi/templates/bin/_ceph-admin-keyring.sh.tpl
Normal file
31
gnocchi/templates/bin/_ceph-admin-keyring.sh.tpl
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#!/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
|
||||||
|
export HOME=/tmp
|
||||||
|
|
||||||
|
cat <<EOF > /etc/ceph/ceph.client.admin.keyring
|
||||||
|
[client.admin]
|
||||||
|
{{- if .Values.conf.ceph.admin_keyring }}
|
||||||
|
key = {{ .Values.conf.ceph.admin_keyring }}
|
||||||
|
{{- else }}
|
||||||
|
key = $(cat /tmp/client-keyring)
|
||||||
|
{{- end }}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
exit 0
|
32
gnocchi/templates/bin/_ceph-keyring.sh.tpl
Normal file
32
gnocchi/templates/bin/_ceph-keyring.sh.tpl
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#!/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
|
||||||
|
export HOME=/tmp
|
||||||
|
|
||||||
|
cat <<EOF > /etc/ceph/ceph.client.{{ .Values.conf.gnocchi.storage.ceph_username }}.keyring
|
||||||
|
|
||||||
|
[client.{{ .Values.conf.gnocchi.storage.ceph_username }}]
|
||||||
|
{{- if .Values.conf.gnocchi.storage.provided_keyring }}
|
||||||
|
key = {{ .Values.conf.gnocchi.storage.provided_keyring }}
|
||||||
|
{{- else }}
|
||||||
|
key = $(cat /tmp/client-keyring)
|
||||||
|
{{- end }}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
exit 0
|
24
gnocchi/templates/bin/_clean-secrets.sh.tpl
Normal file
24
gnocchi/templates/bin/_clean-secrets.sh.tpl
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#!/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 kubectl delete secret \
|
||||||
|
--namespace ${NAMESPACE} \
|
||||||
|
--ignore-not-found=true \
|
||||||
|
${RBD_POOL_SECRET}
|
91
gnocchi/templates/bin/_db-init.sh.tpl
Normal file
91
gnocchi/templates/bin/_db-init.sh.tpl
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
#!/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
|
||||||
|
export HOME=/tmp
|
||||||
|
|
||||||
|
pgsql_superuser_cmd () {
|
||||||
|
DB_COMMAND="$1"
|
||||||
|
if [[ ! -z $2 ]]; then
|
||||||
|
EXPORT PGDATABASE=$2
|
||||||
|
fi
|
||||||
|
if [[ ! -z "${ROOT_DB_PASS}" ]]; then
|
||||||
|
export PGPASSWORD="${ROOT_DB_PASS}"
|
||||||
|
fi
|
||||||
|
psql \
|
||||||
|
-h ${DB_FQDN} \
|
||||||
|
-p ${DB_PORT} \
|
||||||
|
-U ${ROOT_DB_USER} \
|
||||||
|
--command="${DB_COMMAND}"
|
||||||
|
unset PGPASSWORD
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ ! -v ROOT_DB_CONNECTION ]]; then
|
||||||
|
echo "environment variable ROOT_DB_CONNECTION not set"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Got DB root connection"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -v OPENSTACK_CONFIG_FILE ]]; then
|
||||||
|
if [[ ! -v OPENSTACK_CONFIG_DB_SECTION ]]; then
|
||||||
|
echo "Environment variable OPENSTACK_CONFIG_DB_SECTION not set"
|
||||||
|
exit 1
|
||||||
|
elif [[ ! -v OPENSTACK_CONFIG_DB_KEY ]]; then
|
||||||
|
echo "Environment variable OPENSTACK_CONFIG_DB_KEY not set"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Using ${OPENSTACK_CONFIG_FILE} as db config source"
|
||||||
|
echo "Trying to load db config from ${OPENSTACK_CONFIG_DB_SECTION}:${OPENSTACK_CONFIG_DB_KEY}"
|
||||||
|
|
||||||
|
DB_CONN=$(awk -v key=$OPENSTACK_CONFIG_DB_KEY "/^\[${OPENSTACK_CONFIG_DB_SECTION}\]/{f=1} f==1&&/^$OPENSTACK_CONFIG_DB_KEY/{print \$3;exit}" "${OPENSTACK_CONFIG_FILE}")
|
||||||
|
|
||||||
|
echo "Found DB connection: $DB_CONN"
|
||||||
|
elif [[ -v DB_CONNECTION ]]; then
|
||||||
|
DB_CONN=${DB_CONNECTION}
|
||||||
|
echo "Got config from DB_CONNECTION env var"
|
||||||
|
else
|
||||||
|
echo "Could not get dbconfig"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ROOT_DB_PROTO="$(echo $ROOT_DB_CONNECTION | grep '//' | sed -e's,^\(.*://\).*,\1,g')"
|
||||||
|
ROOT_DB_URL="$(echo $ROOT_DB_CONNECTION | sed -e s,$ROOT_DB_PROTO,,g)"
|
||||||
|
ROOT_DB_USER="$(echo $ROOT_DB_URL | grep @ | cut -d@ -f1 | cut -d: -f1)"
|
||||||
|
ROOT_DB_PASS="$(echo $ROOT_DB_URL | grep @ | cut -d@ -f1 | cut -d: -f2)"
|
||||||
|
|
||||||
|
DB_FQDN="$(echo $ROOT_DB_URL | sed -e s,$ROOT_DB_USER:$ROOT_DB_PASS@,,g | cut -d/ -f1 | cut -d: -f1)"
|
||||||
|
DB_PORT="$(echo $ROOT_DB_URL | sed -e s,$ROOT_DB_USER:$ROOT_DB_PASS@,,g | cut -d/ -f1 | cut -d: -f2)"
|
||||||
|
DB_NAME="$(echo $ROOT_DB_URL | sed -e s,$ROOT_DB_USER:$ROOT_DB_PASS@,,g | cut -d/ -f2 | cut -d? -f1)"
|
||||||
|
|
||||||
|
DB_PROTO="$(echo $DB_CONN | grep '//' | sed -e's,^\(.*://\).*,\1,g')"
|
||||||
|
DB_URL="$(echo $DB_CONN | sed -e s,$DB_PROTO,,g)"
|
||||||
|
DB_USER="$( echo $DB_URL | grep @ | cut -d@ -f1 | cut -d: -f1)"
|
||||||
|
DB_PASS="$( echo $DB_URL | grep @ | cut -d@ -f1 | cut -d: -f2)"
|
||||||
|
|
||||||
|
#create db
|
||||||
|
pgsql_superuser_cmd "SELECT 1 FROM pg_database WHERE datname = '$DB_NAME'" | grep -q 1 || pgsql_superuser_cmd "CREATE DATABASE $DB_NAME"
|
||||||
|
|
||||||
|
#create db user
|
||||||
|
pgsql_superuser_cmd "SELECT * FROM pg_roles WHERE rolname = '$DB_USER';" | tail -n +3 | head -n -2 | grep -q 1 || \
|
||||||
|
pgsql_superuser_cmd "CREATE ROLE ${DB_USER} LOGIN PASSWORD '$DB_PASS';" && pgsql_superuser_cmd "ALTER USER ${DB_USER} WITH SUPERUSER"
|
||||||
|
|
||||||
|
#give permissions to user
|
||||||
|
pgsql_superuser_cmd "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;"
|
||||||
|
|
21
gnocchi/templates/bin/_db-sync.sh.tpl
Normal file
21
gnocchi/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 gnocchi-upgrade --create-legacy-resource-types
|
34
gnocchi/templates/bin/_gnocchi-api.sh.tpl
Normal file
34
gnocchi/templates/bin/_gnocchi-api.sh.tpl
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#!/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
|
||||||
|
exec apache2 -DFOREGROUND
|
||||||
|
}
|
||||||
|
|
||||||
|
function stop () {
|
||||||
|
kill -TERM 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$COMMAND
|
21
gnocchi/templates/bin/_gnocchi-metricd.sh.tpl
Normal file
21
gnocchi/templates/bin/_gnocchi-metricd.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 -x
|
||||||
|
exec gnocchi-metricd \
|
||||||
|
--config-file /etc/gnocchi/gnocchi.conf
|
21
gnocchi/templates/bin/_gnocchi-statsd.sh.tpl
Normal file
21
gnocchi/templates/bin/_gnocchi-statsd.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 -x
|
||||||
|
exec gnocchi-statsd \
|
||||||
|
--config-file /etc/gnocchi/gnocchi.conf
|
68
gnocchi/templates/bin/_gnocchi-test.sh.tpl
Normal file
68
gnocchi/templates/bin/_gnocchi-test.sh.tpl
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
#!/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
|
||||||
|
export HOME=/tmp
|
||||||
|
|
||||||
|
echo "Test: list archive policies"
|
||||||
|
gnocchi archive-policy list
|
||||||
|
|
||||||
|
echo "Test: create metric"
|
||||||
|
gnocchi metric create --archive-policy-name low
|
||||||
|
METRIC_UUID=$(gnocchi metric list -c id -f value | head -1)
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
echo "Test: show metric"
|
||||||
|
gnocchi metric show ${METRIC_UUID}
|
||||||
|
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
echo "Test: add measures"
|
||||||
|
gnocchi measures add -m 2017-06-27T12:00:00@31 \
|
||||||
|
-m 2017-06-27T12:03:27@20 \
|
||||||
|
-m 2017-06-27T12:06:51@41 \
|
||||||
|
${METRIC_UUID}
|
||||||
|
|
||||||
|
sleep 15
|
||||||
|
|
||||||
|
echo "Test: show measures"
|
||||||
|
gnocchi measures show ${METRIC_UUID}
|
||||||
|
gnocchi measures show --aggregation min ${METRIC_UUID}
|
||||||
|
|
||||||
|
echo "Test: delete metric"
|
||||||
|
gnocchi metric delete ${METRIC_UUID}
|
||||||
|
|
||||||
|
RESOURCE_UUID={{ uuidv4 }}
|
||||||
|
|
||||||
|
echo "Test: create resouce type"
|
||||||
|
gnocchi resource-type create --attribute name:string --attribute host:string test
|
||||||
|
|
||||||
|
echo "Test: list resource types"
|
||||||
|
gnocchi resource-type list
|
||||||
|
|
||||||
|
echo "Test: create resource"
|
||||||
|
gnocchi resource create --attribute name:test --attribute host:testnode1 --create-metric cpu:medium --create-metric memory:low --type test ${RESOURCE_UUID}
|
||||||
|
|
||||||
|
echo "Test: show resource history"
|
||||||
|
gnocchi resource history --format json --details ${RESOURCE_UUID}
|
||||||
|
echo "Test: delete resource"
|
||||||
|
gnocchi resource delete ${RESOURCE_UUID}
|
||||||
|
echo "Test: delete resource type"
|
||||||
|
gnocchi resource-type delete test
|
||||||
|
|
||||||
|
exit 0
|
60
gnocchi/templates/bin/_storage-init.sh.tpl
Normal file
60
gnocchi/templates/bin/_storage-init.sh.tpl
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#!/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 -x
|
||||||
|
SECRET=$(mktemp --suffix .yaml)
|
||||||
|
KEYRING=$(mktemp --suffix .keyring)
|
||||||
|
function cleanup {
|
||||||
|
rm -f ${SECRET} ${KEYRING}
|
||||||
|
}
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
ceph -s
|
||||||
|
function ensure_pool () {
|
||||||
|
ceph osd pool stats $1 || ceph osd pool create $1 $2
|
||||||
|
local test_luminous=$(ceph tell osd.* version | egrep -c "12.2|luminous" | xargs echo)
|
||||||
|
if [[ ${test_luminous} -gt 0 ]]; then
|
||||||
|
ceph osd pool application enable $1 $3
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
ensure_pool ${RBD_POOL_NAME} ${RBD_POOL_CHUNK_SIZE} "gnocchi-metrics"
|
||||||
|
|
||||||
|
if USERINFO=$(ceph auth get client.${RBD_POOL_USER}); then
|
||||||
|
KEYSTR=$(echo $USERINFO | sed 's/.*\( key = .*\) caps mon.*/\1/')
|
||||||
|
echo $KEYSTR > ${KEYRING}
|
||||||
|
else
|
||||||
|
#NOTE(Portdirect): Determine proper privs to assign keyring
|
||||||
|
ceph auth get-or-create client.${RBD_POOL_USER} \
|
||||||
|
mon "allow *" \
|
||||||
|
osd "allow *" \
|
||||||
|
mgr "allow *" \
|
||||||
|
-o ${KEYRING}
|
||||||
|
fi
|
||||||
|
|
||||||
|
ENCODED_KEYRING=$(sed -n 's/^[[:blank:]]*key[[:blank:]]\+=[[:blank:]]\(.*\)/\1/p' ${KEYRING} | base64 -w0)
|
||||||
|
cat > ${SECRET} <<EOF
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: "${RBD_POOL_SECRET}"
|
||||||
|
type: kubernetes.io/rbd
|
||||||
|
data:
|
||||||
|
key: $( echo ${ENCODED_KEYRING} )
|
||||||
|
EOF
|
||||||
|
kubectl apply --namespace ${NAMESPACE} -f ${SECRET}
|
63
gnocchi/templates/configmap-bin.yaml
Normal file
63
gnocchi/templates/configmap-bin.yaml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
{{/*
|
||||||
|
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 := . }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: gnocchi-bin
|
||||||
|
data:
|
||||||
|
{{- if .Values.images.local_registry.active }}
|
||||||
|
image-repo-sync.sh: |
|
||||||
|
{{- include "helm-toolkit.scripts.image_repo_sync" . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.bootstrap.enabled }}
|
||||||
|
bootstrap.sh: |
|
||||||
|
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
storage-init.sh: |
|
||||||
|
{{ tuple "bin/_storage-init.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
clean-secrets.sh: |
|
||||||
|
{{ tuple "bin/_clean-secrets.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
db-init.sh: |
|
||||||
|
{{ tuple "bin/_db-init.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 }}
|
||||||
|
gnocchi-api.sh: |
|
||||||
|
{{ tuple "bin/_gnocchi-api.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
gnocchi-metricd.sh: |
|
||||||
|
{{ tuple "bin/_gnocchi-metricd.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
gnocchi-statsd.sh: |
|
||||||
|
{{ tuple "bin/_gnocchi-statsd.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 }}
|
||||||
|
ks-domain-user.sh: |
|
||||||
|
{{- include "helm-toolkit.scripts.keystone_domain_user" . | indent 4 }}
|
||||||
|
ceph-keyring.sh: |
|
||||||
|
{{ tuple "bin/_ceph-keyring.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
ceph-admin-keyring.sh: |
|
||||||
|
{{ tuple "bin/_ceph-admin-keyring.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
gnocchi-test.sh: |
|
||||||
|
{{ tuple "bin/_gnocchi-test.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
{{- end }}
|
97
gnocchi/templates/configmap-etc.yaml
Normal file
97
gnocchi/templates/configmap-etc.yaml
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
{{/*
|
||||||
|
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 }}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.gnocchi.keystone_authtoken.auth_uri -}}
|
||||||
|
{{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.gnocchi.keystone_authtoken "auth_uri" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.gnocchi.keystone_authtoken.auth_url -}}
|
||||||
|
{{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.gnocchi.keystone_authtoken "auth_url" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.gnocchi.keystone_authtoken.memcached_servers -}}
|
||||||
|
{{- $_ := tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.gnocchi.keystone_authtoken "memcached_servers" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.gnocchi.keystone_authtoken.memcache_secret_key -}}
|
||||||
|
{{- $_ := set .Values.conf.gnocchi.keystone_authtoken "memcache_secret_key" ( default ( randAlphaNum 64 ) .Values.endpoints.oslo_cache.auth.memcache_secret_key ) -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.gnocchi.keystone_authtoken.region_name -}}
|
||||||
|
{{- $_ := set .Values.conf.gnocchi.keystone_authtoken "region_name" .Values.endpoints.identity.auth.gnocchi.region_name -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.gnocchi.keystone_authtoken.project_name -}}
|
||||||
|
{{- $_ := set .Values.conf.gnocchi.keystone_authtoken "project_name" .Values.endpoints.identity.auth.gnocchi.project_name -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.gnocchi.keystone_authtoken.project_domain_name -}}
|
||||||
|
{{- $_ := set .Values.conf.gnocchi.keystone_authtoken "project_domain_name" .Values.endpoints.identity.auth.gnocchi.project_domain_name -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.gnocchi.keystone_authtoken.user_domain_name -}}
|
||||||
|
{{- $_ := set .Values.conf.gnocchi.keystone_authtoken "user_domain_name" .Values.endpoints.identity.auth.gnocchi.user_domain_name -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.gnocchi.keystone_authtoken.username -}}
|
||||||
|
{{- $_ := set .Values.conf.gnocchi.keystone_authtoken "username" .Values.endpoints.identity.auth.gnocchi.username -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty .Values.conf.gnocchi.keystone_authtoken.password -}}
|
||||||
|
{{- $_ := set .Values.conf.gnocchi.keystone_authtoken "password" .Values.endpoints.identity.auth.gnocchi.password -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.gnocchi.database.connection -}}
|
||||||
|
{{- $_ := tuple "oslo_db" "internal" "gnocchi" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.gnocchi.database "connection" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.gnocchi.indexer.url -}}
|
||||||
|
{{ if eq .Values.conf.gnocchi.indexer.driver "postgresql" }}
|
||||||
|
{{- $_ := tuple "oslo_db_postgresql" "internal" "gnocchi" "postgresql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.gnocchi.indexer "url" -}}
|
||||||
|
{{ else }}
|
||||||
|
{{- $_ := tuple "oslo_db" "internal" "gnocchi" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.gnocchi.indexer "url" -}}
|
||||||
|
{{ end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.gnocchi.statsd.resource_id -}}
|
||||||
|
{{- $_ := uuidv4 | set .Values.conf.gnocchi.statsd "resource_id" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.gnocchi.statsd.user_id -}}
|
||||||
|
{{- $_ := uuidv4 | set .Values.conf.gnocchi.statsd "user_id" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.gnocchi.statsd.project_id -}}
|
||||||
|
{{- $_ := uuidv4 | set .Values.conf.gnocchi.statsd "project_id" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.gnocchi.api.port -}}
|
||||||
|
{{- $_ := tuple "metric" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.gnocchi.api "port" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.gnocchi.statsd.port -}}
|
||||||
|
{{- $_ := tuple "metric_statsd" "internal" "statsd" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.gnocchi.statsd "port" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $envAll := . }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: gnocchi-etc
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
gnocchi.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.gnocchi | b64enc }}
|
||||||
|
api-paste.ini: {{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | b64enc }}
|
||||||
|
policy.json: {{ toJson .Values.conf.policy | b64enc }}
|
||||||
|
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.apache "key" "wsgi-gnocchi.conf" "format" "Secret" ) | indent 2 }}
|
||||||
|
{{- end }}
|
117
gnocchi/templates/daemonset-metricd.yaml
Normal file
117
gnocchi/templates/daemonset-metricd.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.daemonset_metricd }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
|
||||||
|
{{- $mounts_gnocchi_metricd := .Values.pod.mounts.gnocchi_metricd.gnocchi_metricd }}
|
||||||
|
{{- $mounts_gnocchi_metricd_init := .Values.pod.mounts.gnocchi_metricd.init_container }}
|
||||||
|
|
||||||
|
{{- $serviceAccountName := "gnocchi-metricd" }}
|
||||||
|
{{ tuple $envAll "metricd" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: gnocchi-metricd
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "gnocchi" "metricd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{ tuple $envAll "gnocchi" "metricd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
|
||||||
|
{{ tuple $envAll "metricd" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "gnocchi" "metricd" | 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:
|
||||||
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.metricd.node_selector_key }}: {{ .Values.labels.metricd.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll "metricd" $mounts_gnocchi_metricd_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
- name: ceph-keyring-placement
|
||||||
|
{{ tuple $envAll "gnocchi_api" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/ceph-keyring.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: etcceph
|
||||||
|
mountPath: /etc/ceph
|
||||||
|
- name: gnocchi-bin
|
||||||
|
mountPath: /tmp/ceph-keyring.sh
|
||||||
|
subPath: ceph-keyring.sh
|
||||||
|
readOnly: true
|
||||||
|
- name: ceph-keyring
|
||||||
|
mountPath: /tmp/client-keyring
|
||||||
|
subPath: key
|
||||||
|
readOnly: true
|
||||||
|
containers:
|
||||||
|
- name: gnocchi-metricd
|
||||||
|
{{ tuple $envAll "gnocchi_metricd" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.metricd | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/gnocchi-metricd.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: pod-etc-gnocchi
|
||||||
|
mountPath: /etc/gnocchi
|
||||||
|
- name: gnocchi-etc
|
||||||
|
mountPath: /etc/gnocchi/gnocchi.conf
|
||||||
|
subPath: gnocchi.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: gnocchi-etc
|
||||||
|
mountPath: /etc/gnocchi/policy.json
|
||||||
|
subPath: policy.json
|
||||||
|
readOnly: true
|
||||||
|
- name: gnocchi-bin
|
||||||
|
mountPath: /tmp/gnocchi-metricd.sh
|
||||||
|
subPath: gnocchi-metricd.sh
|
||||||
|
readOnly: true
|
||||||
|
- name: etcceph
|
||||||
|
mountPath: /etc/ceph
|
||||||
|
- name: ceph-etc
|
||||||
|
mountPath: /etc/ceph/ceph.conf
|
||||||
|
subPath: ceph.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: ceph-keyring
|
||||||
|
mountPath: /tmp/client-keyring
|
||||||
|
subPath: key
|
||||||
|
readOnly: true
|
||||||
|
{{ if $mounts_gnocchi_metricd.volumeMounts }}{{ toYaml $mounts_gnocchi_metricd.volumeMounts | indent 12 }}{{ end }}
|
||||||
|
volumes:
|
||||||
|
- name: pod-etc-gnocchi
|
||||||
|
emptyDir: {}
|
||||||
|
- name: gnocchi-etc
|
||||||
|
secret:
|
||||||
|
secretName: gnocchi-etc
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: gnocchi-bin
|
||||||
|
configMap:
|
||||||
|
name: gnocchi-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
- name: etcceph
|
||||||
|
emptyDir: {}
|
||||||
|
- name: ceph-etc
|
||||||
|
configMap:
|
||||||
|
name: {{ .Values.ceph_client.configmap }}
|
||||||
|
- name: ceph-keyring
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.secrets.rbd | quote }}
|
||||||
|
{{ if $mounts_gnocchi_metricd.volumes }}{{ toYaml $mounts_gnocchi_metricd.volumes | indent 8 }}{{ end }}
|
||||||
|
{{- end }}
|
123
gnocchi/templates/daemonset-statsd.yaml
Normal file
123
gnocchi/templates/daemonset-statsd.yaml
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
{{/*
|
||||||
|
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.daemonset_statsd }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
|
||||||
|
{{- $mounts_gnocchi_statsd := .Values.pod.mounts.gnocchi_statsd.gnocchi_statsd }}
|
||||||
|
{{- $mounts_gnocchi_statsd_init := .Values.pod.mounts.gnocchi_statsd.init_container }}
|
||||||
|
|
||||||
|
{{- $serviceAccountName := "gnocchi-statsd" }}
|
||||||
|
{{ tuple $envAll "statsd" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: gnocchi-statsd
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "gnocchi" "metricd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{ tuple $envAll "gnocchi" "metricd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "gnocchi" "metricd" | 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:
|
||||||
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.statsd.node_selector_key }}: {{ .Values.labels.statsd.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll "statsd" $mounts_gnocchi_statsd_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
- name: ceph-keyring-placement
|
||||||
|
{{ tuple $envAll "gnocchi_api" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/ceph-keyring.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: etcceph
|
||||||
|
mountPath: /etc/ceph
|
||||||
|
- name: gnocchi-bin
|
||||||
|
mountPath: /tmp/ceph-keyring.sh
|
||||||
|
subPath: ceph-keyring.sh
|
||||||
|
readOnly: true
|
||||||
|
- name: ceph-keyring
|
||||||
|
mountPath: /tmp/client-keyring
|
||||||
|
subPath: key
|
||||||
|
readOnly: true
|
||||||
|
containers:
|
||||||
|
- name: gnocchi-statsd
|
||||||
|
{{ tuple $envAll "gnocchi_statsd" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.statsd | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/gnocchi-statsd.sh
|
||||||
|
ports:
|
||||||
|
- name: gn-stats
|
||||||
|
containerPort: {{ tuple "metric_statsd" "internal" "statsd" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: pod-etc-gnocchi
|
||||||
|
mountPath: /etc/gnocchi
|
||||||
|
- name: gnocchi-etc
|
||||||
|
mountPath: /etc/gnocchi/gnocchi.conf
|
||||||
|
subPath: gnocchi.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: gnocchi-etc
|
||||||
|
mountPath: /etc/gnocchi/api-paste.ini
|
||||||
|
subPath: api-paste.ini
|
||||||
|
readOnly: true
|
||||||
|
- name: gnocchi-etc
|
||||||
|
mountPath: /etc/gnocchi/policy.json
|
||||||
|
subPath: policy.json
|
||||||
|
readOnly: true
|
||||||
|
- name: gnocchi-bin
|
||||||
|
mountPath: /tmp/gnocchi-statsd.sh
|
||||||
|
subPath: gnocchi-statsd.sh
|
||||||
|
readOnly: true
|
||||||
|
- name: etcceph
|
||||||
|
mountPath: /etc/ceph
|
||||||
|
- name: ceph-etc
|
||||||
|
mountPath: /etc/ceph/ceph.conf
|
||||||
|
subPath: ceph.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: ceph-keyring
|
||||||
|
mountPath: /tmp/client-keyring
|
||||||
|
subPath: key
|
||||||
|
readOnly: true
|
||||||
|
{{ if $mounts_gnocchi_statsd.volumeMounts }}{{ toYaml $mounts_gnocchi_statsd.volumeMounts | indent 12 }}{{ end }}
|
||||||
|
volumes:
|
||||||
|
- name: pod-etc-gnocchi
|
||||||
|
emptyDir: {}
|
||||||
|
- name: gnocchi-etc
|
||||||
|
secret:
|
||||||
|
secretName: gnocchi-etc
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: gnocchi-bin
|
||||||
|
configMap:
|
||||||
|
name: gnocchi-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
- name: etcceph
|
||||||
|
emptyDir: {}
|
||||||
|
- name: ceph-etc
|
||||||
|
configMap:
|
||||||
|
name: {{ .Values.ceph_client.configmap }}
|
||||||
|
- name: ceph-keyring
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.secrets.rbd | quote }}
|
||||||
|
{{ if $mounts_gnocchi_statsd.volumes }}{{ toYaml $mounts_gnocchi_statsd.volumes | indent 8 }}{{ end }}
|
||||||
|
{{- end }}
|
142
gnocchi/templates/deployment-api.yaml
Normal file
142
gnocchi/templates/deployment-api.yaml
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
{{/*
|
||||||
|
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 := . }}
|
||||||
|
|
||||||
|
{{- $mounts_gnocchi_api := .Values.pod.mounts.gnocchi_api.gnocchi_api }}
|
||||||
|
{{- $mounts_gnocchi_api_init := .Values.pod.mounts.gnocchi_api.init_container }}
|
||||||
|
|
||||||
|
{{- $serviceAccountName := "gnocchi-api" }}
|
||||||
|
{{ tuple $envAll "api" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: gnocchi-api
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "gnocchi" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.pod.replicas.api }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{ tuple $envAll "gnocchi" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
|
||||||
|
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "gnocchi" "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:
|
||||||
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
|
affinity:
|
||||||
|
{{ tuple $envAll "gnocchi" "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 "api" $mounts_gnocchi_api_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
- name: ceph-keyring-placement
|
||||||
|
{{ tuple $envAll "gnocchi_api" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/ceph-keyring.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: etcceph
|
||||||
|
mountPath: /etc/ceph
|
||||||
|
- name: gnocchi-bin
|
||||||
|
mountPath: /tmp/ceph-keyring.sh
|
||||||
|
subPath: ceph-keyring.sh
|
||||||
|
readOnly: true
|
||||||
|
- name: ceph-keyring
|
||||||
|
mountPath: /tmp/client-keyring
|
||||||
|
subPath: key
|
||||||
|
readOnly: true
|
||||||
|
containers:
|
||||||
|
- name: gnocchi-api
|
||||||
|
{{ tuple $envAll "gnocchi_api" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/gnocchi-api.sh
|
||||||
|
- start
|
||||||
|
lifecycle:
|
||||||
|
preStop:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /tmp/gnocchi-api.sh
|
||||||
|
- stop
|
||||||
|
ports:
|
||||||
|
- name: gn-api
|
||||||
|
containerPort: {{ tuple "metric" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ tuple "metric" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: pod-etc-gnocchi
|
||||||
|
mountPath: /etc/gnocchi
|
||||||
|
- name: gnocchi-etc
|
||||||
|
mountPath: /etc/gnocchi/gnocchi.conf
|
||||||
|
subPath: gnocchi.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: gnocchi-etc
|
||||||
|
mountPath: /etc/gnocchi/api-paste.ini
|
||||||
|
subPath: api-paste.ini
|
||||||
|
readOnly: true
|
||||||
|
- name: gnocchi-etc
|
||||||
|
mountPath: /etc/gnocchi/policy.json
|
||||||
|
subPath: policy.json
|
||||||
|
readOnly: true
|
||||||
|
- name: gnocchi-etc
|
||||||
|
mountPath: /etc/apache2/conf-enabled/wsgi-gnocchi.conf
|
||||||
|
subPath: wsgi-gnocchi.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: etcceph
|
||||||
|
mountPath: /etc/ceph
|
||||||
|
- name: ceph-etc
|
||||||
|
mountPath: /etc/ceph/ceph.conf
|
||||||
|
subPath: ceph.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: ceph-keyring
|
||||||
|
mountPath: /tmp/client-keyring
|
||||||
|
subPath: key
|
||||||
|
readOnly: true
|
||||||
|
- name: gnocchi-bin
|
||||||
|
mountPath: /tmp/gnocchi-api.sh
|
||||||
|
subPath: gnocchi-api.sh
|
||||||
|
readOnly: true
|
||||||
|
{{ if $mounts_gnocchi_api.volumeMounts }}{{ toYaml $mounts_gnocchi_api.volumeMounts | indent 12 }}{{ end }}
|
||||||
|
volumes:
|
||||||
|
- name: pod-etc-gnocchi
|
||||||
|
emptyDir: {}
|
||||||
|
- name: gnocchi-etc
|
||||||
|
secret:
|
||||||
|
secretName: gnocchi-etc
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: gnocchi-bin
|
||||||
|
configMap:
|
||||||
|
name: gnocchi-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
- name: etcceph
|
||||||
|
emptyDir: {}
|
||||||
|
- name: ceph-etc
|
||||||
|
configMap:
|
||||||
|
name: {{ .Values.ceph_client.configmap }}
|
||||||
|
- name: ceph-keyring
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.secrets.rbd | quote }}
|
||||||
|
{{ if $mounts_gnocchi_api.volumes }}{{ toYaml $mounts_gnocchi_api.volumes | indent 8 }}{{ end }}
|
||||||
|
{{- end }}
|
20
gnocchi/templates/ingress-api.yaml
Normal file
20
gnocchi/templates/ingress-api.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{{/*
|
||||||
|
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 and .Values.manifests.ingress_api .Values.network.api.ingress.public }}
|
||||||
|
{{- $ingressOpts := dict "envAll" . "backendServiceType" "metric" "backendPort" "gn-api" -}}
|
||||||
|
{{ $ingressOpts | include "helm-toolkit.manifests.ingress" }}
|
||||||
|
{{- end }}
|
20
gnocchi/templates/job-bootstrap.yaml
Normal file
20
gnocchi/templates/job-bootstrap.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{{/*
|
||||||
|
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 and .Values.manifests.job_bootstrap .Values.bootstrap.enabled }}
|
||||||
|
{{- $bootstrapJob := dict "envAll" . "serviceName" "gnocchi" "keystoneUser" .Values.bootstrap.ks_user -}}
|
||||||
|
{{ $bootstrapJob | include "helm-toolkit.manifests.job_bootstrap" }}
|
||||||
|
{{- end }}
|
93
gnocchi/templates/job-clean.yaml
Normal file
93
gnocchi/templates/job-clean.yaml
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
{{/*
|
||||||
|
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_clean }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
|
||||||
|
{{- $randStringSuffix := randAlphaNum 5 | lower }}
|
||||||
|
|
||||||
|
{{- $serviceAccountName := print "gnocchi-clean-" $randStringSuffix }}
|
||||||
|
{{ tuple $envAll "clean" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: {{ $serviceAccountName }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- delete
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ $serviceAccountName }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ $serviceAccountName }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ $serviceAccountName }}
|
||||||
|
namespace: {{ $envAll.Release.Namespace }}
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: {{ print "gnocchi-clean-" $randStringSuffix }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": pre-delete
|
||||||
|
"helm.sh/hook-delete-policy": hook-succeeded
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "gnocchi" "clean" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||||
|
spec:
|
||||||
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll "clean" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: gnocchi-rbd-secret-clean
|
||||||
|
{{ tuple $envAll "gnocchi_storage_init" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.jobs.clean | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
env:
|
||||||
|
- name: NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: RBD_POOL_SECRET
|
||||||
|
value: {{ .Values.secrets.rbd | quote }}
|
||||||
|
command:
|
||||||
|
- /tmp/clean-secrets.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: gnocchi-bin
|
||||||
|
mountPath: /tmp/clean-secrets.sh
|
||||||
|
subPath: clean-secrets.sh
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- name: gnocchi-bin
|
||||||
|
configMap:
|
||||||
|
name: gnocchi-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
{{- end }}
|
20
gnocchi/templates/job-db-drop.yaml
Normal file
20
gnocchi/templates/job-db-drop.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{{/*
|
||||||
|
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_drop }}
|
||||||
|
{{- $dbDropJob := dict "envAll" . "serviceName" "gnocchi" -}}
|
||||||
|
{{ $dbDropJob | include "helm-toolkit.manifests.job_db_drop_mysql" }}
|
||||||
|
{{- end }}
|
78
gnocchi/templates/job-db-init-indexer.yaml
Normal file
78
gnocchi/templates/job-db-init-indexer.yaml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
{{/*
|
||||||
|
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_indexer }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
|
||||||
|
{{- $serviceAccountName := "gnocchi-db-init-indexer" }}
|
||||||
|
{{ tuple $envAll "db_init_postgresql" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: gnocchi-db-init-indexer
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "gnocchi" "db-init-indexer" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||||
|
spec:
|
||||||
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll "db_init_postgresql" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: gnocchi-db-init-indexer
|
||||||
|
{{ tuple $envAll "db_init_indexer" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.jobs.db_init_indexer | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
env:
|
||||||
|
- name: ROOT_DB_CONNECTION
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Values.secrets.oslo_db_indexer.admin }}
|
||||||
|
key: DB_CONNECTION_INDEXER
|
||||||
|
- name: OPENSTACK_CONFIG_FILE
|
||||||
|
value: /etc/gnocchi/gnocchi.conf
|
||||||
|
- name: OPENSTACK_CONFIG_DB_SECTION
|
||||||
|
value: indexer
|
||||||
|
- name: OPENSTACK_CONFIG_DB_KEY
|
||||||
|
value: url
|
||||||
|
command:
|
||||||
|
- /tmp/db-init.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: gnocchi-etc
|
||||||
|
mountPath: /etc/gnocchi/gnocchi.conf
|
||||||
|
subPath: gnocchi.conf
|
||||||
|
- name: pod-etc-gnocchi
|
||||||
|
mountPath: /etc/gnocchi
|
||||||
|
- name: gnocchi-bin
|
||||||
|
mountPath: /tmp/db-init.sh
|
||||||
|
subPath: db-init.sh
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- name: gnocchi-etc
|
||||||
|
secret:
|
||||||
|
secretName: gnocchi-etc
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: pod-etc-gnocchi
|
||||||
|
emptyDir: {}
|
||||||
|
- name: gnocchi-bin
|
||||||
|
configMap:
|
||||||
|
name: gnocchi-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
{{- end }}
|
20
gnocchi/templates/job-db-init.yaml
Normal file
20
gnocchi/templates/job-db-init.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{{/*
|
||||||
|
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 }}
|
||||||
|
{{- $dbInitJob := dict "envAll" . "serviceName" "gnocchi" -}}
|
||||||
|
{{ $dbInitJob | include "helm-toolkit.manifests.job_db_init_mysql" }}
|
||||||
|
{{- end }}
|
94
gnocchi/templates/job-db-sync.yaml
Normal file
94
gnocchi/templates/job-db-sync.yaml
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
{{/*
|
||||||
|
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 := . }}
|
||||||
|
|
||||||
|
{{- $serviceAccountName := "gnocchi-db-sync" }}
|
||||||
|
{{ tuple $envAll "db_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: gnocchi-db-sync
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "gnocchi" "db-sync" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||||
|
spec:
|
||||||
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll "db_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
- name: ceph-keyring-placement
|
||||||
|
{{ tuple $envAll "gnocchi_api" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/ceph-keyring.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: etcceph
|
||||||
|
mountPath: /etc/ceph
|
||||||
|
- name: gnocchi-bin
|
||||||
|
mountPath: /tmp/ceph-keyring.sh
|
||||||
|
subPath: ceph-keyring.sh
|
||||||
|
readOnly: true
|
||||||
|
- name: ceph-keyring
|
||||||
|
mountPath: /tmp/client-keyring
|
||||||
|
subPath: key
|
||||||
|
readOnly: true
|
||||||
|
containers:
|
||||||
|
- name: gnocchi-db-sync
|
||||||
|
{{ tuple $envAll "db_sync" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.jobs.db_sync | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /tmp/db-sync.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: gnocchi-etc
|
||||||
|
mountPath: /etc/gnocchi/gnocchi.conf
|
||||||
|
subPath: gnocchi.conf
|
||||||
|
- name: gnocchi-bin
|
||||||
|
mountPath: /tmp/db-sync.sh
|
||||||
|
subPath: db-sync.sh
|
||||||
|
- name: etcceph
|
||||||
|
mountPath: /etc/ceph
|
||||||
|
- name: ceph-etc
|
||||||
|
mountPath: /etc/ceph/ceph.conf
|
||||||
|
subPath: ceph.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: ceph-keyring
|
||||||
|
mountPath: /tmp/client-keyring
|
||||||
|
subPath: key
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- name: gnocchi-etc
|
||||||
|
secret:
|
||||||
|
secretName: gnocchi-etc
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: gnocchi-bin
|
||||||
|
configMap:
|
||||||
|
name: gnocchi-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
- name: etcceph
|
||||||
|
emptyDir: {}
|
||||||
|
- name: ceph-etc
|
||||||
|
configMap:
|
||||||
|
name: {{ .Values.ceph_client.configmap }}
|
||||||
|
- name: ceph-keyring
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.secrets.rbd | quote }}
|
||||||
|
{{- end }}
|
20
gnocchi/templates/job-image-repo-sync.yaml
Normal file
20
gnocchi/templates/job-image-repo-sync.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{{/*
|
||||||
|
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 and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }}
|
||||||
|
{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "gnocchi" -}}
|
||||||
|
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
|
||||||
|
{{- end }}
|
20
gnocchi/templates/job-ks-endpoints.yaml
Normal file
20
gnocchi/templates/job-ks-endpoints.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{{/*
|
||||||
|
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 }}
|
||||||
|
{{- $ksServiceJob := dict "envAll" . "serviceName" "gnocchi" "serviceTypes" ( tuple "metric" ) -}}
|
||||||
|
{{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_endpoints" }}
|
||||||
|
{{- end }}
|
20
gnocchi/templates/job-ks-service.yaml
Normal file
20
gnocchi/templates/job-ks-service.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{{/*
|
||||||
|
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 }}
|
||||||
|
{{- $ksServiceJob := dict "envAll" . "serviceName" "gnocchi" "serviceTypes" ( tuple "metric" ) -}}
|
||||||
|
{{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_service" }}
|
||||||
|
{{- end }}
|
20
gnocchi/templates/job-ks-user.yaml
Normal file
20
gnocchi/templates/job-ks-user.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{{/*
|
||||||
|
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 }}
|
||||||
|
{{- $ksUserJob := dict "envAll" . "serviceName" "gnocchi" -}}
|
||||||
|
{{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }}
|
||||||
|
{{- end }}
|
132
gnocchi/templates/job-storage-init.yaml
Normal file
132
gnocchi/templates/job-storage-init.yaml
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
{{/*
|
||||||
|
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_storage_init }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
|
||||||
|
{{- $serviceAccountName := "gnocchi-storage-init" }}
|
||||||
|
{{ tuple $envAll "storage_init" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: {{ $serviceAccountName }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- create
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ $serviceAccountName }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ $serviceAccountName }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ $serviceAccountName }}
|
||||||
|
namespace: {{ $envAll.Release.Namespace }}
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: gnocchi-storage-init
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "gnocchi" "storage-init" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||||
|
spec:
|
||||||
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll "storage_init" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
- name: ceph-keyring-placement
|
||||||
|
{{ tuple $envAll "gnocchi_api" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
securityContext:
|
||||||
|
runAsUser: {{ .Values.pod.user.gnocchi.uid }}
|
||||||
|
command:
|
||||||
|
- /tmp/ceph-admin-keyring.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: etcceph
|
||||||
|
mountPath: /etc/ceph
|
||||||
|
- name: gnocchi-bin
|
||||||
|
mountPath: /tmp/ceph-admin-keyring.sh
|
||||||
|
subPath: ceph-admin-keyring.sh
|
||||||
|
readOnly: true
|
||||||
|
- name: ceph-keyring
|
||||||
|
mountPath: /tmp/client-keyring
|
||||||
|
subPath: key
|
||||||
|
readOnly: true
|
||||||
|
containers:
|
||||||
|
- name: gnocchi-storage-init
|
||||||
|
{{ tuple $envAll "gnocchi_storage_init" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.jobs.storage_init | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
env:
|
||||||
|
- name: NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: RBD_POOL_NAME
|
||||||
|
value: {{ .Values.conf.gnocchi.storage.ceph_pool | quote }}
|
||||||
|
- name: RBD_POOL_USER
|
||||||
|
value: {{ .Values.conf.gnocchi.storage.ceph_username | quote }}
|
||||||
|
- name: RBD_POOL_CHUNK_SIZE
|
||||||
|
value: "8"
|
||||||
|
- name: RBD_POOL_SECRET
|
||||||
|
value: {{ .Values.secrets.rbd | quote }}
|
||||||
|
command:
|
||||||
|
- /tmp/storage-init.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: gnocchi-bin
|
||||||
|
mountPath: /tmp/storage-init.sh
|
||||||
|
subPath: storage-init.sh
|
||||||
|
readOnly: true
|
||||||
|
- name: etcceph
|
||||||
|
mountPath: /etc/ceph
|
||||||
|
- name: ceph-etc
|
||||||
|
mountPath: /etc/ceph/ceph.conf
|
||||||
|
subPath: ceph.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: ceph-keyring
|
||||||
|
mountPath: /tmp/client-keyring
|
||||||
|
subPath: key
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- name: gnocchi-bin
|
||||||
|
configMap:
|
||||||
|
name: gnocchi-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
- name: etcceph
|
||||||
|
emptyDir: {}
|
||||||
|
- name: ceph-etc
|
||||||
|
configMap:
|
||||||
|
name: {{ .Values.ceph_client.configmap }}
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: ceph-keyring
|
||||||
|
secret:
|
||||||
|
secretName: {{ .Values.ceph_client.user_secret_name }}
|
||||||
|
{{- end }}
|
29
gnocchi/templates/pdb-api.yaml
Normal file
29
gnocchi/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: gnocchi-api
|
||||||
|
spec:
|
||||||
|
minAvailable: {{ .Values.pod.lifecycle.disruption_budget.api.min_available }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{ tuple $envAll "gnocchi" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
|
||||||
|
{{- end }}
|
81
gnocchi/templates/pod-gnocchi-test.yaml
Normal file
81
gnocchi/templates/pod-gnocchi-test.yaml
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
{{/*
|
||||||
|
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_gnocchi_test }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
|
||||||
|
{{- $mounts_gnocchi_tests := .Values.pod.mounts.gnocchi_tests.gnocchi_tests }}
|
||||||
|
{{- $mounts_gnocchi_tests_init := .Values.pod.mounts.gnocchi_tests.init_container }}
|
||||||
|
|
||||||
|
{{- $serviceAccountName := print .Release.Name "-test" }}
|
||||||
|
{{ tuple $envAll "tests" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: "{{.Release.Name}}-test"
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "gnocchi" "test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test-success
|
||||||
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }}
|
||||||
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
|
restartPolicy: Never
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll "tests" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}
|
||||||
|
containers:
|
||||||
|
- name: {{.Release.Name}}-helm-tests
|
||||||
|
{{ tuple $envAll "gnocchi_api" | include "helm-toolkit.snippets.image" | indent 6 }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.jobs.tests | include "helm-toolkit.snippets.kubernetes_resources" | indent 6 }}
|
||||||
|
env:
|
||||||
|
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
|
||||||
|
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 8 }}
|
||||||
|
- name: OS_AUTH_TYPE
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ $.Values.secrets.identity.admin }}
|
||||||
|
key: OS_AUTH_TYPE
|
||||||
|
- name: OS_TENANT_NAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ $.Values.secrets.identity.admin }}
|
||||||
|
key: OS_TENANT_NAME
|
||||||
|
{{- end }}
|
||||||
|
command:
|
||||||
|
- /tmp/gnocchi-test.sh
|
||||||
|
volumeMounts:
|
||||||
|
- name: gnocchi-etc
|
||||||
|
mountPath: /etc/gnocchi/gnocchi.conf
|
||||||
|
subPath: gnocchi.conf
|
||||||
|
readOnly: true
|
||||||
|
- name: gnocchi-bin
|
||||||
|
mountPath: /tmp/gnocchi-test.sh
|
||||||
|
subPath: gnocchi-test.sh
|
||||||
|
readOnly: true
|
||||||
|
{{ if $mounts_gnocchi_tests.volumeMounts }}{{ toYaml $mounts_gnocchi_tests.volumeMounts | indent 8 }}{{ end }}
|
||||||
|
volumes:
|
||||||
|
- name: gnocchi-etc
|
||||||
|
secret:
|
||||||
|
secretName: gnocchi-etc
|
||||||
|
defaultMode: 0444
|
||||||
|
- name: gnocchi-bin
|
||||||
|
configMap:
|
||||||
|
name: gnocchi-bin
|
||||||
|
defaultMode: 0555
|
||||||
|
{{ if $mounts_gnocchi_tests.volumes }}{{ toYaml $mounts_gnocchi_tests.volumes | indent 4 }}{{ end }}
|
||||||
|
{{- end }}
|
30
gnocchi/templates/secret-db-indexer.yaml
Normal file
30
gnocchi/templates/secret-db-indexer.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_indexer }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- range $key1, $userClass := tuple "admin" "gnocchi" }}
|
||||||
|
{{- $secretName := index $envAll.Values.secrets.oslo_db_indexer $userClass }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ $secretName }}
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
DB_CONNECTION_INDEXER: {{ tuple "oslo_db_postgresql" "internal" $userClass "postgresql" $envAll | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | b64enc }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
30
gnocchi/templates/secret-db.yaml
Normal file
30
gnocchi/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" "gnocchi" }}
|
||||||
|
{{- $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 }}
|
35
gnocchi/templates/secret-keystone.yaml
Normal file
35
gnocchi/templates/secret-keystone.yaml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{{/*
|
||||||
|
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" "gnocchi" }}
|
||||||
|
{{- $secretName := index $envAll.Values.secrets.identity $userClass }}
|
||||||
|
{{- $auth := index $envAll.Values.endpoints.identity.auth $userClass }}
|
||||||
|
{{ $osAuthType := $auth.os_auth_type }}
|
||||||
|
{{ $osTenantName := $auth.os_tenant_name }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ $secretName }}
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
{{- tuple $userClass "internal" $envAll | include "helm-toolkit.snippets.keystone_secret_openrc" | indent 2 }}
|
||||||
|
OS_AUTH_TYPE: {{ $osAuthType | b64enc }}
|
||||||
|
OS_TENANT_NAME: {{ $osTenantName | b64enc }}
|
||||||
|
{{ end }}
|
||||||
|
{{- end }}
|
39
gnocchi/templates/service-api.yaml
Normal file
39
gnocchi/templates/service-api.yaml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{{/*
|
||||||
|
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 "metric" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: gn-api
|
||||||
|
port: {{ tuple "metric" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
|
{{ if .Values.network.api.node_port.enabled }}
|
||||||
|
nodePort: {{ .Values.network.api.node_port.port }}
|
||||||
|
{{ end }}
|
||||||
|
selector:
|
||||||
|
{{ tuple $envAll "gnocchi" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
|
{{ if .Values.network.api.node_port.enabled }}
|
||||||
|
type: NodePort
|
||||||
|
{{ if .Values.network.api.external_policy_local }}
|
||||||
|
externalTrafficPolicy: Local
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{- end }}
|
20
gnocchi/templates/service-ingress-api.yaml
Normal file
20
gnocchi/templates/service-ingress-api.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{{/*
|
||||||
|
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 and .Values.manifests.service_ingress_api .Values.network.api.ingress.public }}
|
||||||
|
{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "metric" -}}
|
||||||
|
{{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }}
|
||||||
|
{{- end }}
|
36
gnocchi/templates/service-statsd.yaml
Normal file
36
gnocchi/templates/service-statsd.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_statsd }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ tuple "metric_statsd" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: gn-stats
|
||||||
|
port: {{ tuple "metric_statsd" "internal" "statsd" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
|
{{ if .Values.network.statsd.node_port.enabled }}
|
||||||
|
nodePort: {{ .Values.network.statsd.node_port.port }}
|
||||||
|
{{ end }}
|
||||||
|
selector:
|
||||||
|
{{ tuple $envAll "gnocchi" "statsd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
|
{{ if .Values.network.statsd.node_port.enabled }}
|
||||||
|
type: NodePort
|
||||||
|
{{ end }}
|
||||||
|
{{- end }}
|
602
gnocchi/values.yaml
Normal file
602
gnocchi/values.yaml
Normal file
@ -0,0 +1,602 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
# Default values for gnocchi.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
labels:
|
||||||
|
api:
|
||||||
|
node_selector_key: openstack-control-plane
|
||||||
|
node_selector_value: enabled
|
||||||
|
job:
|
||||||
|
node_selector_key: openstack-control-plane
|
||||||
|
node_selector_value: enabled
|
||||||
|
metricd:
|
||||||
|
node_selector_key: openstack-control-plane
|
||||||
|
node_selector_value: enabled
|
||||||
|
statsd:
|
||||||
|
node_selector_key: openstack-control-plane
|
||||||
|
node_selector_value: enabled
|
||||||
|
test:
|
||||||
|
node_selector_key: openstack-control-plane
|
||||||
|
node_selector_value: enabled
|
||||||
|
|
||||||
|
release_group: null
|
||||||
|
|
||||||
|
images:
|
||||||
|
tags:
|
||||||
|
dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1
|
||||||
|
gnocchi_storage_init: docker.io/port/ceph-config-helper:v1.10.3
|
||||||
|
db_init_indexer: docker.io/postgres:9.5
|
||||||
|
# using non-kolla images until kolla supports postgres as
|
||||||
|
# an indexer
|
||||||
|
db_init: quay.io/attcomdev/ubuntu-source-gnocchi-api:3.0.3
|
||||||
|
db_sync: quay.io/attcomdev/ubuntu-source-gnocchi-api:3.0.3
|
||||||
|
ks_user: docker.io/openstackhelm/heat:newton
|
||||||
|
ks_service: docker.io/openstackhelm/heat:newton
|
||||||
|
ks_endpoints: docker.io/openstackhelm/heat:newton
|
||||||
|
gnocchi_api: quay.io/attcomdev/ubuntu-source-gnocchi-api:3.0.3
|
||||||
|
gnocchi_statsd: quay.io/attcomdev/ubuntu-source-gnocchi-statsd:3.0.3
|
||||||
|
gnocchi_metricd: quay.io/attcomdev/ubuntu-source-gnocchi-metricd:3.0.3
|
||||||
|
image_repo_sync: docker.io/docker:17.07.0
|
||||||
|
pull_policy: "IfNotPresent"
|
||||||
|
local_registry:
|
||||||
|
active: false
|
||||||
|
exclude:
|
||||||
|
- dep_check
|
||||||
|
- image_repo_sync
|
||||||
|
|
||||||
|
network:
|
||||||
|
api:
|
||||||
|
ingress:
|
||||||
|
public: true
|
||||||
|
classes:
|
||||||
|
namespace: "nginx"
|
||||||
|
cluster: "nginx-cluster"
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
|
external_policy_local: false
|
||||||
|
node_port:
|
||||||
|
enabled: false
|
||||||
|
port: 8041
|
||||||
|
statsd:
|
||||||
|
node_port:
|
||||||
|
enabled: false
|
||||||
|
port: 8125
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
dynamic:
|
||||||
|
common:
|
||||||
|
local_image_registry:
|
||||||
|
jobs:
|
||||||
|
- gnocchi-image-repo-sync
|
||||||
|
services:
|
||||||
|
- endpoint: node
|
||||||
|
service: local_image_registry
|
||||||
|
static:
|
||||||
|
api:
|
||||||
|
jobs:
|
||||||
|
- gnocchi-storage-init
|
||||||
|
- gnocchi-db-sync
|
||||||
|
- gnocchi-ks-endpoints
|
||||||
|
- gnocchi-ks-service
|
||||||
|
- gnocchi-ks-user
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: identity
|
||||||
|
- endpoint: internal
|
||||||
|
service: oslo_db
|
||||||
|
clean:
|
||||||
|
services: null
|
||||||
|
db_init:
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: oslo_db
|
||||||
|
db_init_postgresql:
|
||||||
|
jobs: null
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: oslo_db_postgresql
|
||||||
|
db_sync:
|
||||||
|
jobs:
|
||||||
|
- gnocchi-storage-init
|
||||||
|
- gnocchi-db-init
|
||||||
|
- gnocchi-db-init-indexer
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: oslo_db_postgresql
|
||||||
|
ks_endpoints:
|
||||||
|
jobs:
|
||||||
|
- gnocchi-ks-service
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: identity
|
||||||
|
ks_service:
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: identity
|
||||||
|
ks_user:
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: identity
|
||||||
|
metricd:
|
||||||
|
jobs:
|
||||||
|
- gnocchi-storage-init
|
||||||
|
- gnocchi-db-sync
|
||||||
|
- gnocchi-ks-user
|
||||||
|
- gnocchi-ks-service
|
||||||
|
- gnocchi-ks-endpoints
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: oslo_db_postgresql
|
||||||
|
- endpoint: internal
|
||||||
|
service: metric
|
||||||
|
statsd:
|
||||||
|
jobs:
|
||||||
|
- gnocchi-storage-init
|
||||||
|
- gnocchi-db-sync
|
||||||
|
- gnocchi-ks-user
|
||||||
|
- gnocchi-ks-service
|
||||||
|
- gnocchi-ks-endpoints
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: oslo_db_postgresql
|
||||||
|
- endpoint: internal
|
||||||
|
service: metric
|
||||||
|
storage_init:
|
||||||
|
services: null
|
||||||
|
tests:
|
||||||
|
jobs:
|
||||||
|
- gnocchi-storage-init
|
||||||
|
- gnocchi-db-sync
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: identity
|
||||||
|
- endpoint: internal
|
||||||
|
service: oslo_db_postgresql
|
||||||
|
- endpoint: internal
|
||||||
|
service: metric
|
||||||
|
image_repo_sync:
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: local_image_registry
|
||||||
|
|
||||||
|
pod:
|
||||||
|
user:
|
||||||
|
gnocchi:
|
||||||
|
uid: 1000
|
||||||
|
affinity:
|
||||||
|
anti:
|
||||||
|
type:
|
||||||
|
default: preferredDuringSchedulingIgnoredDuringExecution
|
||||||
|
topologyKey:
|
||||||
|
default: kubernetes.io/hostname
|
||||||
|
mounts:
|
||||||
|
gnocchi_api:
|
||||||
|
init_container: null
|
||||||
|
gnocchi_api:
|
||||||
|
gnocchi_statsd:
|
||||||
|
init_container: null
|
||||||
|
gnocchi_statsd:
|
||||||
|
gnocchi_metricd:
|
||||||
|
init_container: null
|
||||||
|
gnocchi_metricd:
|
||||||
|
gnocchi_tests:
|
||||||
|
init_container: null
|
||||||
|
gnocchi_tests:
|
||||||
|
replicas:
|
||||||
|
api: 1
|
||||||
|
lifecycle:
|
||||||
|
upgrades:
|
||||||
|
deployments:
|
||||||
|
revision_history: 3
|
||||||
|
pod_replacement_strategy: RollingUpdate
|
||||||
|
rolling_update:
|
||||||
|
max_unavailable: 1
|
||||||
|
max_surge: 3
|
||||||
|
daemonsets:
|
||||||
|
pod_replacement_strategy: RollingUpdate
|
||||||
|
metricd:
|
||||||
|
enabled: false
|
||||||
|
min_ready_seconds: 0
|
||||||
|
max_unavailable: 1
|
||||||
|
statsd:
|
||||||
|
enabled: false
|
||||||
|
min_ready_seconds: 0
|
||||||
|
max_unavailable: 1
|
||||||
|
disruption_budget:
|
||||||
|
api:
|
||||||
|
min_available: 0
|
||||||
|
termination_grace_period:
|
||||||
|
api:
|
||||||
|
timeout: 30
|
||||||
|
resources:
|
||||||
|
enabled: false
|
||||||
|
api:
|
||||||
|
requests:
|
||||||
|
memory: "124Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "1024Mi"
|
||||||
|
cpu: "2000m"
|
||||||
|
statsd:
|
||||||
|
requests:
|
||||||
|
memory: "124Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "1024Mi"
|
||||||
|
cpu: "2000m"
|
||||||
|
metricd:
|
||||||
|
requests:
|
||||||
|
memory: "124Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "1024Mi"
|
||||||
|
cpu: "2000m"
|
||||||
|
jobs:
|
||||||
|
clean:
|
||||||
|
requests:
|
||||||
|
memory: "124Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "1024Mi"
|
||||||
|
cpu: "2000m"
|
||||||
|
db_init:
|
||||||
|
requests:
|
||||||
|
memory: "124Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "1024Mi"
|
||||||
|
cpu: "2000m"
|
||||||
|
db_sync:
|
||||||
|
requests:
|
||||||
|
memory: "124Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "1024Mi"
|
||||||
|
cpu: "2000m"
|
||||||
|
ks_endpoints:
|
||||||
|
requests:
|
||||||
|
memory: "124Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "1024Mi"
|
||||||
|
cpu: "2000m"
|
||||||
|
ks_service:
|
||||||
|
requests:
|
||||||
|
memory: "124Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "1024Mi"
|
||||||
|
cpu: "2000m"
|
||||||
|
ks_user:
|
||||||
|
requests:
|
||||||
|
memory: "124Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "1024Mi"
|
||||||
|
cpu: "2000m"
|
||||||
|
tests:
|
||||||
|
requests:
|
||||||
|
memory: "124Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "1024Mi"
|
||||||
|
cpu: "2000m"
|
||||||
|
image_repo_sync:
|
||||||
|
requests:
|
||||||
|
memory: "128Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "1024Mi"
|
||||||
|
cpu: "2000m"
|
||||||
|
|
||||||
|
conf:
|
||||||
|
apache: |
|
||||||
|
Listen 0.0.0.0:{{ tuple "metric" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
|
|
||||||
|
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
|
||||||
|
CustomLog /dev/stdout combined env=!forwarded
|
||||||
|
CustomLog /dev/stdout proxy env=forwarded
|
||||||
|
|
||||||
|
<VirtualHost *:{{ tuple "metric" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}>
|
||||||
|
WSGIDaemonProcess gnocchi processes=1 threads=2 user=gnocchi group=gnocchi display-name=%{GROUP}
|
||||||
|
WSGIProcessGroup gnocchi
|
||||||
|
WSGIScriptAlias / "/var/lib/kolla/venv/lib/python2.7/site-packages/gnocchi/rest/app.wsgi"
|
||||||
|
WSGIApplicationGroup %{GLOBAL}
|
||||||
|
|
||||||
|
ErrorLog /dev/stderr
|
||||||
|
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
|
||||||
|
CustomLog /dev/stdout combined env=!forwarded
|
||||||
|
CustomLog /dev/stdout proxy env=forwarded
|
||||||
|
|
||||||
|
<Directory "/var/lib/kolla/venv/lib/python2.7/site-packages/gnocchi/rest">
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
|
ceph:
|
||||||
|
monitors: []
|
||||||
|
admin_keyring: null
|
||||||
|
override:
|
||||||
|
append:
|
||||||
|
paste:
|
||||||
|
pipeline:main:
|
||||||
|
pipeline: gnocchi+auth
|
||||||
|
composite:gnocchi+noauth:
|
||||||
|
use: egg:Paste#urlmap
|
||||||
|
/: gnocchiversions
|
||||||
|
/v1: gnocchiv1+noauth
|
||||||
|
composite:gnocchi+auth:
|
||||||
|
use: egg:Paste#urlmap
|
||||||
|
/: gnocchiversions
|
||||||
|
/v1: gnocchiv1+auth
|
||||||
|
pipeline:gnocchiv1+noauth:
|
||||||
|
pipeline: gnocchiv1
|
||||||
|
pipeline:gnocchiv1+auth:
|
||||||
|
pipeline: keystone_authtoken gnocchiv1
|
||||||
|
app:gnocchiversions:
|
||||||
|
paste.app_factory: gnocchi.rest.app:app_factory
|
||||||
|
root: gnocchi.rest.VersionsController
|
||||||
|
app:gnocchiv1:
|
||||||
|
paste.app_factory: gnocchi.rest.app:app_factory
|
||||||
|
root: gnocchi.rest.V1Controller
|
||||||
|
filter:keystone_authtoken:
|
||||||
|
paste.filter_factory: keystonemiddleware.auth_token:filter_factory
|
||||||
|
oslo_config_project: gnocchi
|
||||||
|
policy:
|
||||||
|
admin_or_creator: 'role:admin or project_id:%(created_by_project_id)s'
|
||||||
|
resource_owner: 'project_id:%(project_id)s'
|
||||||
|
metric_owner: 'project_id:%(resource.project_id)s'
|
||||||
|
get status: 'role:admin'
|
||||||
|
create resource: ''
|
||||||
|
get resource: 'rule:admin_or_creator or rule:resource_owner'
|
||||||
|
update resource: 'rule:admin_or_creator'
|
||||||
|
delete resource: 'rule:admin_or_creator'
|
||||||
|
delete resources: 'rule:admin_or_creator'
|
||||||
|
list resource: 'rule:admin_or_creator or rule:resource_owner'
|
||||||
|
search resource: 'rule:admin_or_creator or rule:resource_owner'
|
||||||
|
create resource type: 'role:admin'
|
||||||
|
delete resource type: 'role:admin'
|
||||||
|
update resource type: 'role:admin'
|
||||||
|
list resource type: ''
|
||||||
|
get resource type: ''
|
||||||
|
get archive policy: ''
|
||||||
|
list archive policy: ''
|
||||||
|
create archive policy: 'role:admin'
|
||||||
|
update archive policy: 'role:admin'
|
||||||
|
delete archive policy: 'role:admin'
|
||||||
|
create archive policy rule: 'role:admin'
|
||||||
|
get archive policy rule: ''
|
||||||
|
list archive policy rule: ''
|
||||||
|
delete archive policy rule: 'role:admin'
|
||||||
|
create metric: ''
|
||||||
|
delete metric: 'rule:admin_or_creator'
|
||||||
|
get metric: 'rule:admin_or_creator or rule:metric_owner'
|
||||||
|
search metric: 'rule:admin_or_creator or rule:metric_owner'
|
||||||
|
list metric: ''
|
||||||
|
list all metric: 'role:admin'
|
||||||
|
get measures: 'rule:admin_or_creator or rule:metric_owner'
|
||||||
|
post measures: 'rule:admin_or_creator'
|
||||||
|
gnocchi:
|
||||||
|
DEFAULT:
|
||||||
|
debug: false
|
||||||
|
token:
|
||||||
|
provider: uuid
|
||||||
|
api:
|
||||||
|
auth_mode: keystone
|
||||||
|
#NOTE(portdirect): the bind port should not be defined, and is manipulated
|
||||||
|
# via the endpoints section.
|
||||||
|
port: null
|
||||||
|
statsd:
|
||||||
|
#NOTE(portdirect): the bind port should not be defined, and is manipulated
|
||||||
|
# via the endpoints section.
|
||||||
|
port: null
|
||||||
|
metricd:
|
||||||
|
workers: 1
|
||||||
|
database:
|
||||||
|
max_retries: -1
|
||||||
|
storage:
|
||||||
|
driver: ceph
|
||||||
|
ceph_pool: gnocchi.metrics
|
||||||
|
ceph_username: gnocchi
|
||||||
|
ceph_keyring: /etc/ceph/ceph.client.gnocchi.keyring
|
||||||
|
ceph_conffile: /etc/ceph/ceph.conf
|
||||||
|
file_basepath: /var/lib/gnocchi
|
||||||
|
provided_keyring: null
|
||||||
|
indexer:
|
||||||
|
driver: postgresql
|
||||||
|
keystone_authtoken:
|
||||||
|
auth_type: password
|
||||||
|
auth_version: v3
|
||||||
|
memcache_security_strategy: ENCRYPT
|
||||||
|
|
||||||
|
ceph_client:
|
||||||
|
configmap: ceph-etc
|
||||||
|
user_secret_name: pvc-ceph-client-key
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
identity:
|
||||||
|
admin: gnocchi-keystone-admin
|
||||||
|
gnocchi: gnocchi-keystone-user
|
||||||
|
oslo_db:
|
||||||
|
admin: gnocchi-db-admin
|
||||||
|
gnocchi: gnocchi-db-user
|
||||||
|
oslo_db_indexer:
|
||||||
|
admin: gnocchi-db-indexer-admin
|
||||||
|
gnocchi: gnocchi-db-indexer-user
|
||||||
|
rbd: gnocchi-rbd-keyring
|
||||||
|
|
||||||
|
bootstrap:
|
||||||
|
enabled: false
|
||||||
|
ks_user: gnocchi
|
||||||
|
script: |
|
||||||
|
openstack token issue
|
||||||
|
|
||||||
|
# typically overridden by environmental
|
||||||
|
# values, but should include all endpoints
|
||||||
|
# required by this chart
|
||||||
|
endpoints:
|
||||||
|
cluster_domain_suffix: cluster.local
|
||||||
|
local_image_registry:
|
||||||
|
name: docker-registry
|
||||||
|
namespace: docker-registry
|
||||||
|
hosts:
|
||||||
|
default: localhost
|
||||||
|
internal: docker-registry
|
||||||
|
node: localhost
|
||||||
|
host_fqdn_override:
|
||||||
|
default: null
|
||||||
|
port:
|
||||||
|
registry:
|
||||||
|
node: 5000
|
||||||
|
identity:
|
||||||
|
name: keystone
|
||||||
|
auth:
|
||||||
|
admin:
|
||||||
|
username: "admin"
|
||||||
|
user_domain_name: "default"
|
||||||
|
password: "password"
|
||||||
|
project_name: "admin"
|
||||||
|
project_domain_name: "default"
|
||||||
|
region_name: "RegionOne"
|
||||||
|
os_auth_type: "password"
|
||||||
|
os_tenant_name: "admin"
|
||||||
|
gnocchi:
|
||||||
|
username: "gnocchi"
|
||||||
|
role: "admin"
|
||||||
|
password: "password"
|
||||||
|
project_name: "service"
|
||||||
|
region_name: "RegionOne"
|
||||||
|
os_auth_type: "password"
|
||||||
|
os_tenant_name: "service"
|
||||||
|
user_domain_name: service
|
||||||
|
project_domain_name: service
|
||||||
|
hosts:
|
||||||
|
default: keystone
|
||||||
|
internal: keystone-api
|
||||||
|
host_fqdn_override:
|
||||||
|
default: null
|
||||||
|
path:
|
||||||
|
default: /v3
|
||||||
|
scheme:
|
||||||
|
default: 'http'
|
||||||
|
port:
|
||||||
|
api:
|
||||||
|
default: 80
|
||||||
|
internal: 5000
|
||||||
|
metric:
|
||||||
|
name: gnocchi
|
||||||
|
hosts:
|
||||||
|
default: gnocchi-api
|
||||||
|
public: gnocchi
|
||||||
|
host_fqdn_override:
|
||||||
|
default: null
|
||||||
|
path:
|
||||||
|
default: null
|
||||||
|
scheme:
|
||||||
|
default: 'http'
|
||||||
|
port:
|
||||||
|
api:
|
||||||
|
default: 8041
|
||||||
|
public: 80
|
||||||
|
metric_statsd:
|
||||||
|
name: gnocchi-statsd
|
||||||
|
hosts:
|
||||||
|
default: gnocchi-statsd
|
||||||
|
host_fqdn_override:
|
||||||
|
default: null
|
||||||
|
path:
|
||||||
|
default: null
|
||||||
|
scheme:
|
||||||
|
default: null
|
||||||
|
port:
|
||||||
|
statsd:
|
||||||
|
default: 8125
|
||||||
|
oslo_db_postgresql:
|
||||||
|
auth:
|
||||||
|
admin:
|
||||||
|
username: postgres
|
||||||
|
password: password
|
||||||
|
gnocchi:
|
||||||
|
username: gnocchi
|
||||||
|
password: password
|
||||||
|
hosts:
|
||||||
|
default: postgresql
|
||||||
|
host_fqdn_override:
|
||||||
|
default: null
|
||||||
|
path: /gnocchi
|
||||||
|
scheme: postgresql
|
||||||
|
port:
|
||||||
|
postgresql:
|
||||||
|
default: 5432
|
||||||
|
oslo_db:
|
||||||
|
auth:
|
||||||
|
admin:
|
||||||
|
username: root
|
||||||
|
password: password
|
||||||
|
gnocchi:
|
||||||
|
username: gnocchi
|
||||||
|
password: password
|
||||||
|
hosts:
|
||||||
|
default: mariadb
|
||||||
|
host_fqdn_override:
|
||||||
|
default: null
|
||||||
|
path: /gnocchi
|
||||||
|
scheme: mysql+pymysql
|
||||||
|
port:
|
||||||
|
mysql:
|
||||||
|
default: 3306
|
||||||
|
oslo_cache:
|
||||||
|
auth:
|
||||||
|
# NOTE(portdirect): this is used to define the value for keystone
|
||||||
|
# authtoken cache encryption key, if not set it will be populated
|
||||||
|
# automatically with a random value, but to take advantage of
|
||||||
|
# this feature all services should be set to use the same key,
|
||||||
|
# and memcache service.
|
||||||
|
memcache_secret_key: null
|
||||||
|
hosts:
|
||||||
|
default: memcache
|
||||||
|
host_fqdn_override:
|
||||||
|
default: null
|
||||||
|
port:
|
||||||
|
memcache:
|
||||||
|
default: 11211
|
||||||
|
|
||||||
|
manifests:
|
||||||
|
configmap_bin: true
|
||||||
|
configmap_etc: true
|
||||||
|
daemonset_metricd: true
|
||||||
|
daemonset_statsd: true
|
||||||
|
deployment_api: true
|
||||||
|
ingress_api: true
|
||||||
|
job_bootstrap: true
|
||||||
|
job_clean: true
|
||||||
|
job_db_drop: false
|
||||||
|
job_db_init_indexer: true
|
||||||
|
job_db_init: true
|
||||||
|
job_image_repo_sync: true
|
||||||
|
secret_db_indexer: true
|
||||||
|
job_db_sync: true
|
||||||
|
job_ks_endpoints: true
|
||||||
|
job_ks_service: true
|
||||||
|
job_ks_user: true
|
||||||
|
job_storage_init: true
|
||||||
|
pdb_api: true
|
||||||
|
pod_gnocchi_test: true
|
||||||
|
secret_db: true
|
||||||
|
secret_keystone: true
|
||||||
|
service_api: true
|
||||||
|
service_ingress_api: true
|
||||||
|
service_statsd: true
|
Loading…
Reference in New Issue
Block a user