a lot of new services
This commit is contained in:
parent
085c9841b0
commit
b6c5c0c0e0
@ -4,5 +4,6 @@ kind: Kustomization
|
|||||||
namespace: bim
|
namespace: bim
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
- serviceaccount.yaml
|
||||||
- backend-deployment.yaml
|
- backend-deployment.yaml
|
||||||
- backend-service.yaml
|
- backend-service.yaml
|
||||||
|
|||||||
5
apps/bim/base/serviceaccount.yaml
Normal file
5
apps/bim/base/serviceaccount.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: bim-vault
|
||||||
|
namespace: bim
|
||||||
@ -8,4 +8,4 @@ patches:
|
|||||||
- path: replicas.yaml
|
- path: replicas.yaml
|
||||||
target:
|
target:
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
name: comparisons
|
name: backend
|
||||||
|
|||||||
@ -9,7 +9,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: postgresql-contour
|
chart: postgresql-contour
|
||||||
version: "17.0.2"
|
version: "17.0.7"
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: yc-oci-charts
|
name: yc-oci-charts
|
||||||
@ -44,7 +44,7 @@ spec:
|
|||||||
image:
|
image:
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
registry: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
repository: contour/postgresql
|
repository: contour/postgresql
|
||||||
tag: 13.0.7
|
tag: 17.0.7
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
metrics:
|
metrics:
|
||||||
enabled: false
|
enabled: false
|
||||||
@ -61,7 +61,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
@ -72,7 +72,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
@ -83,7 +83,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
@ -101,13 +101,20 @@ spec:
|
|||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
contour:
|
contour:
|
||||||
enabled: true
|
enabled: true
|
||||||
adminUser: ""
|
adminUser: "postgres"
|
||||||
adminPasswordSecretKey: ""
|
|
||||||
sharedPreloadLibraries: "pg_stat_statements,uuid-ossp,ltree,pg_partman"
|
sharedPreloadLibraries: "pg_stat_statements,uuid-ossp,ltree,pg_partman"
|
||||||
|
vault:
|
||||||
|
enabled: true
|
||||||
|
role: postgresql
|
||||||
|
authPath: auth/kubernetes
|
||||||
|
secretPath: secrets/data/postgresql/admin
|
||||||
|
secretKey: postgres-password
|
||||||
|
usersSecretPath: secrets/data/postgresql/users
|
||||||
databases:
|
databases:
|
||||||
- name: bim_db
|
- name: bim_db
|
||||||
user: bim
|
user: bim
|
||||||
|
passwordKey: bim
|
||||||
extensions: []
|
extensions: []
|
||||||
restoreFromDump: false
|
restoreFromDump: false
|
||||||
s3-proxy:
|
s3-proxy:
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
||||||
|
|||||||
@ -17,7 +17,64 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: backend
|
app: backend
|
||||||
service: backend
|
service: backend
|
||||||
|
annotations:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: django
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-postgresql: secrets/data/postgresql/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-postgresql: |-
|
||||||
|
{{- with secret "secrets/data/postgresql/apps/django" -}}
|
||||||
|
DJANGO_POSTGRES_HOST=postgresql.django.svc.cluster.local
|
||||||
|
DJANGO_POSTGRES_PORTS=5432
|
||||||
|
DJANGO_POSTGRES_DATABASE=sarex_db
|
||||||
|
DJANGO_POSTGRES_USER={{ index .Data.data "username" }}
|
||||||
|
DJANGO_POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-rabbitmq: secrets/data/rabbitmq/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-rabbitmq: |-
|
||||||
|
{{- with secret "secrets/data/rabbitmq/apps/django" -}}
|
||||||
|
CELERY_RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
CELERY_RABBITMQ_USER={{ index .Data.data "username" }}
|
||||||
|
CELERY_RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
CELERY_RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
DJANGO_RABBIT_HOSTNAME=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
DJANGO_RABBIT_USER={{ index .Data.data "username" }}
|
||||||
|
DJANGO_RABBIT_PASS={{ index .Data.data "password" }}
|
||||||
|
DJANGO_RABBIT_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-s3: secrets/data/minio/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/django" -}}
|
||||||
|
AWS_S3_ENDPOINT_URL=https://minio.contour.infra.sarex.tech
|
||||||
|
S3_HOST=https://minio.contour.infra.sarex.tech
|
||||||
|
S3_BUCKET=rfi
|
||||||
|
S3_LOGIN={{ index .Data.data "access_key" }}
|
||||||
|
S3_PASSWORD={{ index .Data.data "secret_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-kafka: secrets/data/kafka/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-kafka: |-
|
||||||
|
{{- with secret "secrets/data/kafka/apps/django" -}}
|
||||||
|
KAFKA_BOOTSTRAP_SERVERS=["{{ index .Data.data.auth "bootstrap_servers" }}"]
|
||||||
|
KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||||
|
KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||||
|
KAFKA_SASL_PLAIN_USERNAME={{ index .Data.data "username" }}
|
||||||
|
KAFKA_SASL_PLAIN_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-jwt-private: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-jwt-private: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "private_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-jwt-public: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-jwt-public: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
{{- end -}}
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: django-vault
|
||||||
volumes:
|
volumes:
|
||||||
- name: django-configmap
|
- name: django-configmap
|
||||||
configMap:
|
configMap:
|
||||||
@ -30,6 +87,18 @@ spec:
|
|||||||
- name: backend
|
- name: backend
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/backend:production_a96dead0
|
image: cr.yandex/crp3ccidau046kdj8g9q/backend:production_a96dead0
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
command: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/django-postgresql ] && . /vault/secrets/django-postgresql
|
||||||
|
[ -f /vault/secrets/django-rabbitmq ] && . /vault/secrets/django-rabbitmq
|
||||||
|
[ -f /vault/secrets/django-s3 ] && . /vault/secrets/django-s3
|
||||||
|
[ -f /vault/secrets/django-kafka ] && . /vault/secrets/django-kafka
|
||||||
|
[ -f /vault/secrets/django-jwt-private ] && export JWT_PRIVATE_KEY="$(cat /vault/secrets/django-jwt-private)"
|
||||||
|
[ -f /vault/secrets/django-jwt-public ] && export JWT_PUBLIC_KEY="$(cat /vault/secrets/django-jwt-public)"
|
||||||
|
set +a
|
||||||
|
exec /opt/sarex/entrypoint.sh
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: 8000
|
containerPort: 8000
|
||||||
@ -116,124 +185,8 @@ spec:
|
|||||||
value: "False"
|
value: "False"
|
||||||
- name: KAFKA_TOPICS
|
- name: KAFKA_TOPICS
|
||||||
value: '{"planning": "message-hub-stage", "ams-sync": "ams-sync"}'
|
value: '{"planning": "message-hub-stage", "ams-sync": "ams-sync"}'
|
||||||
- name: KAFKA_BOOTSTRAP_SERVERS
|
|
||||||
value: '["wb-prod-kafka-bootstrap.kafka.svc.cluster.local:9093"]'
|
|
||||||
- name: KAFKA_SECURITY_PROTOCOL
|
|
||||||
value: SSL
|
|
||||||
- name: KAFKA_SASL_PLAIN_USERNAME
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: username
|
|
||||||
name: kafka-secret
|
|
||||||
- name: KAFKA_SASL_PLAIN_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: password
|
|
||||||
name: kafka-secret
|
|
||||||
- name: KAFKA_SASL_MECHANISM
|
|
||||||
value: SCRAM-SHA-512
|
|
||||||
- name: KAFKA_SSL_CAFILE
|
- name: KAFKA_SSL_CAFILE
|
||||||
value: /usr/local/share/ca-certificates/kafka.crt
|
value: /usr/local/share/ca-certificates/kafka.crt
|
||||||
- name: AWS_S3_ENDPOINT_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: host
|
|
||||||
name: s3-secret
|
|
||||||
- name: S3_HOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: host
|
|
||||||
name: s3-secret
|
|
||||||
- name: CELERY_RABBITMQ_HOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: host
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: CELERY_RABBITMQ_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: username
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: CELERY_RABBITMQ_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: password
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: CELERY_RABBITMQ_VHOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: vhost
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: DJANGO_POSTGRES_HOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: hostname
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: DJANGO_POSTGRES_PORTS
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: port
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: DJANGO_POSTGRES_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: username
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: DJANGO_POSTGRES_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: password
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: DJANGO_POSTGRES_DATABASE
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: database
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: DJANGO_RABBIT_HOSTNAME
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: host
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: DJANGO_RABBIT_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: username
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: DJANGO_RABBIT_PASS
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: password
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: DJANGO_RABBIT_VHOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: vhost
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: JWT_PRIVATE_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: ssh_private.key
|
|
||||||
name: backend-secret
|
|
||||||
- name: JWT_PUBLIC_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: ssh_public.key
|
|
||||||
name: backend-secret
|
|
||||||
- name: S3_BUCKET
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: bucket
|
|
||||||
name: s3-secret
|
|
||||||
- name: S3_LOGIN
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: username
|
|
||||||
name: s3-secret
|
|
||||||
- name: S3_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: password
|
|
||||||
name: s3-secret
|
|
||||||
- name: KC_USE_REDIRECT_LOGOUT
|
- name: KC_USE_REDIRECT_LOGOUT
|
||||||
value: "False"
|
value: "False"
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,64 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: celery
|
app: celery
|
||||||
service: celery
|
service: celery
|
||||||
|
annotations:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: django
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-postgresql: secrets/data/postgresql/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-postgresql: |-
|
||||||
|
{{- with secret "secrets/data/postgresql/apps/django" -}}
|
||||||
|
DJANGO_POSTGRES_HOST=postgresql.django.svc.cluster.local
|
||||||
|
DJANGO_POSTGRES_PORTS=5432
|
||||||
|
DJANGO_POSTGRES_DATABASE=sarex_db
|
||||||
|
DJANGO_POSTGRES_USER={{ index .Data.data "username" }}
|
||||||
|
DJANGO_POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-rabbitmq: secrets/data/rabbitmq/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-rabbitmq: |-
|
||||||
|
{{- with secret "secrets/data/rabbitmq/apps/django" -}}
|
||||||
|
CELERY_RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
CELERY_RABBITMQ_USER={{ index .Data.data "username" }}
|
||||||
|
CELERY_RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
CELERY_RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
DJANGO_RABBIT_HOSTNAME=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
DJANGO_RABBIT_USER={{ index .Data.data "username" }}
|
||||||
|
DJANGO_RABBIT_PASS={{ index .Data.data "password" }}
|
||||||
|
DJANGO_RABBIT_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-s3: secrets/data/minio/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/django" -}}
|
||||||
|
AWS_S3_ENDPOINT_URL=https://minio.contour.infra.sarex.tech
|
||||||
|
S3_HOST=https://minio.contour.infra.sarex.tech
|
||||||
|
S3_BUCKET=rfi
|
||||||
|
S3_LOGIN={{ index .Data.data "access_key" }}
|
||||||
|
S3_PASSWORD={{ index .Data.data "secret_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-kafka: secrets/data/kafka/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-kafka: |-
|
||||||
|
{{- with secret "secrets/data/kafka/apps/django" -}}
|
||||||
|
KAFKA_BOOTSTRAP_SERVERS=["{{ index .Data.data.auth "bootstrap_servers" }}"]
|
||||||
|
KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||||
|
KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||||
|
KAFKA_SASL_PLAIN_USERNAME={{ index .Data.data "username" }}
|
||||||
|
KAFKA_SASL_PLAIN_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-jwt-private: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-jwt-private: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "private_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-jwt-public: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-jwt-public: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
{{- end -}}
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: django-vault
|
||||||
volumes:
|
volumes:
|
||||||
- name: django-configmap
|
- name: django-configmap
|
||||||
configMap:
|
configMap:
|
||||||
@ -30,7 +87,18 @@ spec:
|
|||||||
- name: celery
|
- name: celery
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/backend:production_a96dead0
|
image: cr.yandex/crp3ccidau046kdj8g9q/backend:production_a96dead0
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
command: ["celery", "-A", "config", "worker", "-B", "-l", "info", "-E", "-Q", "default", "-n", "default_worker.%h", "--concurrency=2"]
|
command: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/django-postgresql ] && . /vault/secrets/django-postgresql
|
||||||
|
[ -f /vault/secrets/django-rabbitmq ] && . /vault/secrets/django-rabbitmq
|
||||||
|
[ -f /vault/secrets/django-s3 ] && . /vault/secrets/django-s3
|
||||||
|
[ -f /vault/secrets/django-kafka ] && . /vault/secrets/django-kafka
|
||||||
|
[ -f /vault/secrets/django-jwt-private ] && export JWT_PRIVATE_KEY="$(cat /vault/secrets/django-jwt-private)"
|
||||||
|
[ -f /vault/secrets/django-jwt-public ] && export JWT_PUBLIC_KEY="$(cat /vault/secrets/django-jwt-public)"
|
||||||
|
set +a
|
||||||
|
exec celery -A config worker -B -l info -E -Q default -n default_worker.%h --concurrency=2
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@ -118,124 +186,8 @@ spec:
|
|||||||
value: "False"
|
value: "False"
|
||||||
- name: KAFKA_TOPICS
|
- name: KAFKA_TOPICS
|
||||||
value: '{"planning": "message-hub-stage", "ams-sync": "ams-sync"}'
|
value: '{"planning": "message-hub-stage", "ams-sync": "ams-sync"}'
|
||||||
- name: KAFKA_BOOTSTRAP_SERVERS
|
|
||||||
value: '["wb-prod-kafka-bootstrap.kafka.svc.cluster.local:9093"]'
|
|
||||||
- name: KAFKA_SECURITY_PROTOCOL
|
|
||||||
value: SSL
|
|
||||||
- name: KAFKA_SASL_PLAIN_USERNAME
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: username
|
|
||||||
name: kafka-secret
|
|
||||||
- name: KAFKA_SASL_PLAIN_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: password
|
|
||||||
name: kafka-secret
|
|
||||||
- name: KAFKA_SASL_MECHANISM
|
|
||||||
value: SCRAM-SHA-512
|
|
||||||
- name: KAFKA_SSL_CAFILE
|
- name: KAFKA_SSL_CAFILE
|
||||||
value: /usr/local/share/ca-certificates/kafka.crt
|
value: /usr/local/share/ca-certificates/kafka.crt
|
||||||
- name: AWS_S3_ENDPOINT_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: host
|
|
||||||
name: s3-secret
|
|
||||||
- name: S3_HOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: host
|
|
||||||
name: s3-secret
|
|
||||||
- name: CELERY_RABBITMQ_HOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: host
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: CELERY_RABBITMQ_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: username
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: CELERY_RABBITMQ_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: password
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: CELERY_RABBITMQ_VHOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: vhost
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: DJANGO_POSTGRES_HOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: hostname
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: DJANGO_POSTGRES_PORTS
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: port
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: DJANGO_POSTGRES_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: username
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: DJANGO_POSTGRES_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: password
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: DJANGO_POSTGRES_DATABASE
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: database
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: DJANGO_RABBIT_HOSTNAME
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: host
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: DJANGO_RABBIT_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: username
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: DJANGO_RABBIT_PASS
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: password
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: DJANGO_RABBIT_VHOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: vhost
|
|
||||||
name: rabbitmq-secret
|
|
||||||
- name: JWT_PRIVATE_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: ssh_private.key
|
|
||||||
name: backend-secret
|
|
||||||
- name: JWT_PUBLIC_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: ssh_public.key
|
|
||||||
name: backend-secret
|
|
||||||
- name: S3_BUCKET
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: bucket
|
|
||||||
name: s3-secret
|
|
||||||
- name: S3_LOGIN
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: username
|
|
||||||
name: s3-secret
|
|
||||||
- name: S3_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: password
|
|
||||||
name: s3-secret
|
|
||||||
- name: KC_USE_REDIRECT_LOGOUT
|
- name: KC_USE_REDIRECT_LOGOUT
|
||||||
value: "False"
|
value: "False"
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
@ -4,6 +4,7 @@ kind: Kustomization
|
|||||||
namespace: django
|
namespace: django
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
- serviceaccount.yaml
|
||||||
- backend-deployment.yaml
|
- backend-deployment.yaml
|
||||||
- celery-deployment.yaml
|
- celery-deployment.yaml
|
||||||
- frontend-deployment.yaml
|
- frontend-deployment.yaml
|
||||||
|
|||||||
5
apps/django/base/serviceaccount.yaml
Normal file
5
apps/django/base/serviceaccount.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: django-vault
|
||||||
|
namespace: django
|
||||||
@ -9,7 +9,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: postgresql-contour
|
chart: postgresql-contour
|
||||||
version: "17.0.2"
|
version: "17.0.7"
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: yc-oci-charts
|
name: yc-oci-charts
|
||||||
@ -44,7 +44,7 @@ spec:
|
|||||||
image:
|
image:
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
registry: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
repository: contour/postgresql
|
repository: contour/postgresql
|
||||||
tag: 17.0.2
|
tag: 17.0.7
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
metrics:
|
metrics:
|
||||||
enabled: false
|
enabled: false
|
||||||
@ -61,7 +61,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
@ -72,7 +72,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
@ -83,12 +83,15 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
successThreshold: 1
|
successThreshold: 1
|
||||||
failureThreshold: 6
|
failureThreshold: 6
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 512Mi
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
dedicated: db
|
dedicated: db
|
||||||
tolerations:
|
tolerations:
|
||||||
@ -98,12 +101,19 @@ spec:
|
|||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
contour:
|
contour:
|
||||||
enabled: true
|
enabled: true
|
||||||
adminUser: ""
|
adminUser: "postgres"
|
||||||
adminPasswordSecretKey: ""
|
|
||||||
sharedPreloadLibraries: "pg_stat_statements"
|
sharedPreloadLibraries: "pg_stat_statements"
|
||||||
|
vault:
|
||||||
|
enabled: true
|
||||||
|
role: postgresql
|
||||||
|
authPath: auth/kubernetes
|
||||||
|
secretPath: secrets/data/postgresql/admin
|
||||||
|
secretKey: postgres-password
|
||||||
|
usersSecretPath: secrets/data/postgresql/users
|
||||||
databases:
|
databases:
|
||||||
- name: sarex_db
|
- name: sarex_db
|
||||||
user: sarex
|
user: sarex
|
||||||
|
passwordKey: sarex
|
||||||
extensions: []
|
extensions: []
|
||||||
restoreFromDump: false
|
restoreFromDump: false
|
||||||
s3-proxy:
|
s3-proxy:
|
||||||
|
|||||||
@ -4,6 +4,7 @@ kind: Kustomization
|
|||||||
namespace: documentations
|
namespace: documentations
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
- serviceaccount.yaml
|
||||||
- api-deployment.yaml
|
- api-deployment.yaml
|
||||||
- pdm-deployment.yaml
|
- pdm-deployment.yaml
|
||||||
- filestream-deployment.yaml
|
- filestream-deployment.yaml
|
||||||
|
|||||||
5
apps/documentations/base/serviceaccount.yaml
Normal file
5
apps/documentations/base/serviceaccount.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: documentations-vault
|
||||||
|
namespace: documentations
|
||||||
@ -9,7 +9,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: postgresql-contour
|
chart: postgresql-contour
|
||||||
version: "17.0.2"
|
version: "17.0.7"
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: yc-oci-charts
|
name: yc-oci-charts
|
||||||
@ -44,7 +44,7 @@ spec:
|
|||||||
image:
|
image:
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
registry: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
repository: contour/postgresql
|
repository: contour/postgresql
|
||||||
tag: 17.0.2
|
tag: 17.0.7
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
metrics:
|
metrics:
|
||||||
enabled: false
|
enabled: false
|
||||||
@ -61,7 +61,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
@ -72,7 +72,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
@ -83,12 +83,15 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
successThreshold: 1
|
successThreshold: 1
|
||||||
failureThreshold: 6
|
failureThreshold: 6
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 512Mi
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
dedicated: db
|
dedicated: db
|
||||||
tolerations:
|
tolerations:
|
||||||
@ -98,12 +101,19 @@ spec:
|
|||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
contour:
|
contour:
|
||||||
enabled: true
|
enabled: true
|
||||||
adminUser: ""
|
adminUser: "postgres"
|
||||||
adminPasswordSecretKey: ""
|
|
||||||
sharedPreloadLibraries: "pg_stat_statements,ltree,timescaledb,uuid-ossp"
|
sharedPreloadLibraries: "pg_stat_statements,ltree,timescaledb,uuid-ossp"
|
||||||
|
vault:
|
||||||
|
enabled: true
|
||||||
|
role: postgresql
|
||||||
|
authPath: auth/kubernetes
|
||||||
|
secretPath: secrets/data/postgresql/admin
|
||||||
|
secretKey: postgres-password
|
||||||
|
usersSecretPath: secrets/data/postgresql/users
|
||||||
databases:
|
databases:
|
||||||
- name: documentations_db
|
- name: documentations_db
|
||||||
user: documentations
|
user: documentations
|
||||||
|
passwordKey: documentations
|
||||||
extensions: []
|
extensions: []
|
||||||
restoreFromDump: false
|
restoreFromDump: false
|
||||||
s3-proxy:
|
s3-proxy:
|
||||||
|
|||||||
@ -20,7 +20,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: workflows-api
|
- name: workflows-api
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/workflows-api:prod_9ae8865a
|
image: cr.yandex/crp3ccidau046kdj8g9q/workflows-api_prod:075fc0
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
|
|||||||
@ -33,7 +33,7 @@ spec:
|
|||||||
secretName: smtp-secret
|
secretName: smtp-secret
|
||||||
containers:
|
containers:
|
||||||
- name: engine-low
|
- name: engine-low
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/workflows-engine:prod_b6e15fda
|
image: cr.yandex/crp3ccidau046kdj8g9q/workflows-endigne_prod:075fc0
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@ -35,7 +35,7 @@ spec:
|
|||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: engine
|
- name: engine
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/workflows-engine:prod_b6e15fda
|
image: cr.yandex/crp3ccidau046kdj8g9q/workflows-endigne_prod:075fc0
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
@ -239,4 +239,4 @@ spec:
|
|||||||
memory: 1Gi
|
memory: 1Gi
|
||||||
|
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: regcred
|
- name: regcred
|
||||||
|
|||||||
@ -4,6 +4,7 @@ kind: Kustomization
|
|||||||
namespace: processing
|
namespace: processing
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
- serviceaccount.yaml
|
||||||
- api-deployment.yaml
|
- api-deployment.yaml
|
||||||
- engine-low.yaml
|
- engine-low.yaml
|
||||||
- engine.yaml
|
- engine.yaml
|
||||||
|
|||||||
5
apps/processing/base/serviceaccount.yaml
Normal file
5
apps/processing/base/serviceaccount.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: processing-vault
|
||||||
|
namespace: processing
|
||||||
@ -9,7 +9,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: postgresql-contour
|
chart: postgresql-contour
|
||||||
version: "17.0.2"
|
version: "17.0.7"
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: yc-oci-charts
|
name: yc-oci-charts
|
||||||
@ -44,7 +44,7 @@ spec:
|
|||||||
image:
|
image:
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
registry: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
repository: contour/postgresql
|
repository: contour/postgresql
|
||||||
tag: 17.0.2
|
tag: 17.0.7
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
metrics:
|
metrics:
|
||||||
enabled: false
|
enabled: false
|
||||||
@ -61,7 +61,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
@ -72,7 +72,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
@ -83,12 +83,15 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
successThreshold: 1
|
successThreshold: 1
|
||||||
failureThreshold: 6
|
failureThreshold: 6
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 512Mi
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
dedicated: db
|
dedicated: db
|
||||||
tolerations:
|
tolerations:
|
||||||
@ -98,12 +101,19 @@ spec:
|
|||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
contour:
|
contour:
|
||||||
enabled: true
|
enabled: true
|
||||||
adminUser: ""
|
adminUser: "postgres"
|
||||||
adminPasswordSecretKey: ""
|
|
||||||
sharedPreloadLibraries: "pg_stat_statements"
|
sharedPreloadLibraries: "pg_stat_statements"
|
||||||
|
vault:
|
||||||
|
enabled: true
|
||||||
|
role: postgresql
|
||||||
|
authPath: auth/kubernetes
|
||||||
|
secretPath: secrets/data/postgresql/admin
|
||||||
|
secretKey: postgres-password
|
||||||
|
usersSecretPath: secrets/data/postgresql/users
|
||||||
databases:
|
databases:
|
||||||
- name: workflow_db
|
- name: workflow_db
|
||||||
user: workflow
|
user: workflow
|
||||||
|
passwordKey: workflow
|
||||||
extensions:
|
extensions:
|
||||||
- uuid-ossp
|
- uuid-ossp
|
||||||
restoreFromDump: false
|
restoreFromDump: false
|
||||||
|
|||||||
@ -15,41 +15,49 @@ spec:
|
|||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: sarex-subscriptions
|
app: sarex-subscriptions
|
||||||
|
annotations:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: subscriptions
|
||||||
|
vault.hashicorp.com/agent-inject-secret-subscriptions-postgresql: secrets/data/postgresql/apps/subscriptions
|
||||||
|
vault.hashicorp.com/agent-inject-template-subscriptions-postgresql: |-
|
||||||
|
{{- with secret "secrets/data/postgresql/apps/subscriptions" -}}
|
||||||
|
DATABASE_HOST=postgresql.subscriptions.svc.cluster.local
|
||||||
|
DATABASE_PORT=5432
|
||||||
|
DATABASE_NAME=subscriptions_db
|
||||||
|
DATABASE_USER={{ index .Data.data "username" }}
|
||||||
|
DATABASE_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-subscriptions-minio: secrets/data/minio/apps/subscriptions
|
||||||
|
vault.hashicorp.com/agent-inject-template-subscriptions-minio: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/subscriptions" -}}
|
||||||
|
YC_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||||
|
YC_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||||
|
YC_S3_BUCKET_NAME=subscriptions
|
||||||
|
YC_S3_ENDPOINT_URL=https://minio.contour.infra.sarex.tech
|
||||||
|
{{- end -}}
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: subscriptions-vault
|
||||||
containers:
|
containers:
|
||||||
- name: subscriptions
|
- name: subscriptions
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/subscriptions:prod_a50928e1
|
image: cr.yandex/crp3ccidau046kdj8g9q/subscriptions:prod_a50928e1
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
command: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/subscriptions-postgresql ] && . /vault/secrets/subscriptions-postgresql
|
||||||
|
[ -f /vault/secrets/subscriptions-minio ] && . /vault/secrets/subscriptions-minio
|
||||||
|
set +a
|
||||||
|
exec /server/entrypoint.sh
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: 8000
|
containerPort: 8000
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
env:
|
env:
|
||||||
- name: DATABASE_HOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: hostname
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: DATABASE_PORT
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: port
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: DATABASE_NAME
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: database
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: DATABASE_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: username
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: DATABASE_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: password
|
|
||||||
name: postgresql-secret
|
|
||||||
- name: API_ADDRESS
|
- name: API_ADDRESS
|
||||||
value: "8000"
|
value: "8000"
|
||||||
- name: SYSTEM_LOG_HOST
|
- name: SYSTEM_LOG_HOST
|
||||||
@ -66,26 +74,6 @@ spec:
|
|||||||
value: mail.rwb.ru
|
value: mail.rwb.ru
|
||||||
- name: SMTP_EMAIL_PORT
|
- name: SMTP_EMAIL_PORT
|
||||||
value: "465"
|
value: "465"
|
||||||
- name: YC_S3_ACCESS_KEY_ID
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: username
|
|
||||||
name: s3-secret
|
|
||||||
- name: YC_S3_SECRET_ACCESS_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: password
|
|
||||||
name: s3-secret
|
|
||||||
- name: YC_S3_BUCKET_NAME
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: bucket
|
|
||||||
name: s3-secret
|
|
||||||
- name: YC_S3_ENDPOINT_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: host
|
|
||||||
name: s3-secret
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: "1"
|
cpu: "1"
|
||||||
|
|||||||
@ -4,5 +4,6 @@ kind: Kustomization
|
|||||||
namespace: subscriptions
|
namespace: subscriptions
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
- serviceaccount.yaml
|
||||||
- backend-deployment.yaml
|
- backend-deployment.yaml
|
||||||
- backend-service.yaml
|
- backend-service.yaml
|
||||||
|
|||||||
5
apps/subscriptions/base/serviceaccount.yaml
Normal file
5
apps/subscriptions/base/serviceaccount.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: subscriptions-vault
|
||||||
|
namespace: subscriptions
|
||||||
@ -9,7 +9,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: postgresql-contour
|
chart: postgresql-contour
|
||||||
version: "17.0.2"
|
version: "17.0.7"
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: yc-oci-charts
|
name: yc-oci-charts
|
||||||
@ -44,7 +44,7 @@ spec:
|
|||||||
image:
|
image:
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
registry: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
repository: contour/postgresql
|
repository: contour/postgresql
|
||||||
tag: 17.0.2
|
tag: 17.0.7
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
metrics:
|
metrics:
|
||||||
enabled: false
|
enabled: false
|
||||||
@ -61,7 +61,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
@ -72,7 +72,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
@ -83,12 +83,15 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
successThreshold: 1
|
successThreshold: 1
|
||||||
failureThreshold: 6
|
failureThreshold: 6
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 512Mi
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
dedicated: db
|
dedicated: db
|
||||||
tolerations:
|
tolerations:
|
||||||
@ -98,12 +101,19 @@ spec:
|
|||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
contour:
|
contour:
|
||||||
enabled: true
|
enabled: true
|
||||||
adminUser: ""
|
adminUser: "postgres"
|
||||||
adminPasswordSecretKey: ""
|
|
||||||
sharedPreloadLibraries: "postgis"
|
sharedPreloadLibraries: "postgis"
|
||||||
|
vault:
|
||||||
|
enabled: true
|
||||||
|
role: postgresql
|
||||||
|
authPath: auth/kubernetes
|
||||||
|
secretPath: secrets/data/postgresql/admin
|
||||||
|
secretKey: postgres-password
|
||||||
|
usersSecretPath: secrets/data/postgresql/users
|
||||||
databases:
|
databases:
|
||||||
- name: subscriptions_db
|
- name: subscriptions_db
|
||||||
user: subscriptions
|
user: subscriptions
|
||||||
|
passwordKey: subscriptions
|
||||||
extensions: []
|
extensions: []
|
||||||
restoreFromDump: false
|
restoreFromDump: false
|
||||||
s3-proxy:
|
s3-proxy:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user