Add possibility to use overrides for some charts

The deal is that all the jobs' scripts include extra arguments
when deploying helm charts, except these ones in the commit.
It would be useful to use override files in these charts.

+ Fix typo in apparmor.yaml for node-exporter
+ Amend apparmor.yaml for openstack-exporter since
those values are already by default in values.yaml

Change-Id: Ibe8b38977216e618dccba7e8443b3cc05a772de5
This commit is contained in:
astebenkova 2021-01-25 18:32:48 +02:00
parent 6cf614d7a8
commit a589db04e9
9 changed files with 26 additions and 18 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v0.18.1
description: OpenStack-Helm Node Exporter for Prometheus
name: prometheus-node-exporter
version: 0.1.1
version: 0.1.2
home: https://github.com/prometheus/node_exporter
sources:
- https://github.com/prometheus/node_exporter

View File

@ -4,5 +4,5 @@ pod:
type: apparmor
node-exporter:
node-exporter: runtime/default
init: runrtime/default
init: runtime/default
...

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack Metrics Exporter for Prometheus
name: prometheus-openstack-exporter
version: 0.1.2
version: 0.1.3
home: https://github.com/openstack/openstack-helm-infra
sources:
- https://opendev.org/openstack/openstack-helm-infra

View File

@ -8,14 +8,4 @@ pod:
prometheus-openstack-exporter-ks-user:
prometheus-openstack-exporter-ks-user: runtime/default
init: runtime/default
manifests:
job_ks_user: true
dependencies:
static:
prometheus_openstack_exporter:
jobs:
- prometheus-openstack-exporter-ks-user
services:
- endpoint: internal
service: identity
...

View File

@ -18,8 +18,11 @@ set -xe
make prometheus-kube-state-metrics
#NOTE: Deploy command
: ${OSH_INFRA_EXTRA_HELM_ARGS_KUBE_STATE_METRICS:="$(./tools/deployment/common/get-values-overrides.sh prometheus-kube-state-metrics)"}
helm upgrade --install prometheus-kube-state-metrics \
./prometheus-kube-state-metrics --namespace=kube-system
./prometheus-kube-state-metrics --namespace=kube-system \
${OSH_INFRA_EXTRA_HELM_ARGS_KUBE_STATE_METRICS}
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh kube-system

View File

@ -18,8 +18,11 @@ set -xe
make prometheus-node-exporter
#NOTE: Deploy command
: ${OSH_INFRA_EXTRA_HELM_ARGS_NODE_EXPORTER:="$(./tools/deployment/common/get-values-overrides.sh prometheus-node-exporter)"}
helm upgrade --install prometheus-node-exporter \
./prometheus-node-exporter --namespace=kube-system
./prometheus-node-exporter --namespace=kube-system \
${OSH_INFRA_EXTRA_HELM_ARGS_NODE_EXPORTER}
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh kube-system

View File

@ -18,8 +18,11 @@ set -xe
make prometheus-process-exporter
#NOTE: Deploy command
: ${OSH_INFRA_EXTRA_HELM_ARGS_PROCESS_EXPORTER:="$(./tools/deployment/common/get-values-overrides.sh prometheus-process-exporter)"}
helm upgrade --install prometheus-process-exporter \
./prometheus-process-exporter --namespace=kube-system
./prometheus-process-exporter --namespace=kube-system \
${OSH_INFRA_EXTRA_HELM_ARGS_PROCESS_EXPORTER}
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh kube-system

View File

@ -18,8 +18,13 @@ set -xe
make alerta
#NOTE: Deploy command
: ${OSH_INFRA_EXTRA_HELM_ARGS:=""}
: ${OSH_INFRA_EXTRA_HELM_ARGS_ALERTA:="$(./tools/deployment/common/get-values-overrides.sh alerta)"}
helm upgrade --install alerta ./alerta \
--namespace=osh-infra
--namespace=osh-infra \
${OSH_INFRA_EXTRA_HELM_ARGS} \
${OSH_INFRA_EXTRA_HELM_ARGS_ALERTA}
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh osh-infra

View File

@ -18,6 +18,8 @@ set -xe
make prometheus-openstack-exporter
#NOTE: Deploy command
: ${OSH_INFRA_EXTRA_HELM_ARGS_OS_EXPORTER:="$(./tools/deployment/common/get-values-overrides.sh prometheus-openstack-exporter)"}
tee /tmp/prometheus-openstack-exporter.yaml << EOF
manifests:
job_ks_user: false
@ -27,10 +29,12 @@ dependencies:
jobs: null
services: null
EOF
helm upgrade --install prometheus-openstack-exporter \
./prometheus-openstack-exporter \
--namespace=openstack \
--values=/tmp/prometheus-openstack-exporter.yaml
--values=/tmp/prometheus-openstack-exporter.yaml \
${OSH_INFRA_EXTRA_HELM_ARGS_OS_EXPORTER}
#NOTE: Wait for deploy
./tools/deployment/common/wait-for-pods.sh openstack