Migrate attachments app to HelmRelease in d8-ugmk-prod, enable in kustomization, and update related configurations. Remove legacy namespace resource.

This commit is contained in:
emelinda 2026-07-18 21:43:49 +03:00
parent 3febe6382b
commit ccbfd63a08
4 changed files with 41 additions and 13 deletions

View File

@ -4,8 +4,8 @@ kind: Kustomization
namespace: attachments
resources:
- ../base
patches: []
# - path: patch.yaml
# target:
# kind: HelmRelease
# name: attachments
patches:
- path: patch.yaml
target:
kind: HelmRelease
name: attachments

View File

@ -1,7 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: attachments
labels:
istio-injection: disabled
security.deckhouse.io/pod-policy: privileged

View File

@ -0,0 +1,35 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: attachments
namespace: attachments
spec:
values:
services:
attachments:
podAnnotations:
_default:
vault.hashicorp.com/auth-path: auth/kubernetes
vault.hashicorp.com/role: attachments
vault.hashicorp.com/agent-inject-secret-attachments-db: secrets/data/postgresql/apps/attachments
vault.hashicorp.com/agent-inject-template-attachments-db: |-
{{- with secret "secrets/data/postgresql/apps/attachments" -}}
DATABASE_HOST={{ index .Data.data "host" }}
DATABASE_PORT={{ index .Data.data "port" }}
DATABASE_NAME={{ index .Data.data "database" }}
DATABASE_USER={{ index .Data.data "username" }}
DATABASE_PASSWORD={{ index .Data.data "password" }}
DATABASE_SSL_MODE=disable
{{- end -}}
# vault.hashicorp.com/agent-inject-secret-attachments-s3: secrets/data/minio/apps/attachments
# vault.hashicorp.com/agent-inject-template-attachments-s3: |-
# {{- with secret "secrets/data/minio/apps/attachments" -}}
# YANDEX_S3_ENDPOINT_URL=minio.minio:9000
# YANDEX_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
# YANDEX_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
# YANDEX_S3_USE_SSL=false
# YANDEX_S3_REGION=ru-central
# YANDEX_S3_VERIFY=false
# BUCKET_NAME=attachments
# {{- end -}}

View File

@ -17,7 +17,7 @@ resources:
- ./bootstrap-jobs
# apps
# - ../../apps/attachments/d8-ugmk-prod
- ../../apps/attachments/d8-ugmk-prod
- ../../apps/control-interface/d8-ugmk-prod
- ../../apps/cross-section/d8-ugmk-prod
- ../../apps/reviews/d8-ugmk-prod