[hotfix] Fix deploy postgres_exporter to manually deploy (!107)
Co-authored-by: denis.patrakeev <denis.patrakeev@avroid.tech> Reviewed-on: https://git.avroid.tech/K8s/k8s-configs/pulls/107
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
# Install [Prometheus Postgres Exporter](https://github.com/prometheus-community/helm-charts/blob/main/charts/prometheus-postgres-exporter/README.md)
|
||||
|
||||
## Create from version
|
||||
| Project | Version |
|
||||
|------------------------------|----------|
|
||||
| Prometheus Postgres Exporter | 6.9.0 |
|
||||
|
||||
## Install
|
||||
Настраиваем для работы файл конфигурации kubectl для подключения к кластеру Kubernetes
|
||||
|
||||
Готовим служебную УЗ для vault (ЭТО АВТОМАТИЗИРОВАНО через ArgoCD):
|
||||
```bash
|
||||
kubectl apply -f .rbac/vault-service-account.yaml
|
||||
kubectl apply -f .rbac/harbor-registry-secret.yaml
|
||||
```
|
||||
|
||||
Получаем из Vault секреты с паролями/токенами/сертификатами и выгружаем в окружение оболочки:
|
||||
```bash
|
||||
./prometheus_postgres_exporter_values_secrets_init.sh
|
||||
```
|
||||
|
||||
Применяем секрет и сетевые политики:
|
||||
```bash
|
||||
kubectl -n cloud-prod apply -f .secrets/argocd-secret-path.yaml
|
||||
kubectl -n cloud-prod apply -f postgres-exporter-network-policy.yaml
|
||||
```
|
||||
|
||||
И производим непосредственную установку:
|
||||
|
||||
```bash
|
||||
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
||||
helm repo update
|
||||
|
||||
helm install -n cloud-prod prometheus-postgres-exporter prometheus-community/prometheus-postgres-exporter -f values-override.yaml
|
||||
```
|
||||
|
||||
## Upgrade/Changes
|
||||
Обновление настроек и чарта делаем так:
|
||||
|
||||
В начале сравниваем содержимое `values-override.yaml` с исходным файлом `values.yaml`
|
||||
(ссылка на исходную версию зафиксирована в заголовке `values-override.yaml`) через diff (IDE лучше).
|
||||
Или с новой версией `values.yaml` в Helm-чарте.
|
||||
Вносим необходимые правки, новые опции или добавляем секреты.
|
||||
|
||||
Получаем из Vault секреты с паролями/токенами/сертификатами и выгружаем в окружение оболочки:
|
||||
```bash
|
||||
./prometheus_postgres_exporter_values_secrets_init.sh
|
||||
|
||||
kubectl -n cloud-prod apply -f .secrets/argocd-secret-path.yaml
|
||||
```
|
||||
|
||||
Затем применяем:
|
||||
```bash
|
||||
helm upgrade -n cloud-prod prometheus-postgres-exporter prometheus-community/prometheus-postgres-exporter -f values-override.yaml
|
||||
```
|
||||
Reference in New Issue
Block a user