contracts,notes,mapper
This commit is contained in:
parent
be3910d747
commit
bb18939f5a
@ -15,27 +15,75 @@ spec:
|
|||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: backend
|
app: 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: contracts
|
||||||
|
vault.hashicorp.com/agent-inject-secret-contracts-db: secrets/data/postgresql/apps/contracts
|
||||||
|
vault.hashicorp.com/agent-inject-template-contracts-db: |-
|
||||||
|
{{- with secret "secrets/data/postgresql/apps/contracts" -}}
|
||||||
|
DB_URL=postgresql://{{ index .Data.data "username" }}:{{ index .Data.data "password" }}@postgresql.contracts.svc.cluster.local:5432/contracts_db?sslmode=disable
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-contracts-jwt-public: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-contracts-jwt-public: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-contracts-rabbitmq: secrets/data/rabbitmq/apps/contracts
|
||||||
|
vault.hashicorp.com/agent-inject-template-contracts-rabbitmq: |-
|
||||||
|
{{- with secret "secrets/data/rabbitmq/apps/contracts" -}}
|
||||||
|
CONTRACTS_RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
CONTRACTS_RABBITMQ_USERNAME={{ index .Data.data "username" }}
|
||||||
|
CONTRACTS_RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
CONTRACTS_RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
CONTRACTS_RABBITMQ_PORT=5672
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-contracts-s3: secrets/data/minio/apps/contracts
|
||||||
|
vault.hashicorp.com/agent-inject-template-contracts-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/contracts" -}}
|
||||||
|
CONTRACTS_S3_ENDPOINT={{ index .Data.data.client "endpoint" }}
|
||||||
|
CONTRACTS_S3_REGION={{ index .Data.data.client "region" }}
|
||||||
|
CONTRACTS_S3_BUCKET=contracts
|
||||||
|
CONTRACTS_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||||
|
CONTRACTS_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-contracts-kafka: secrets/data/kafka/apps/contracts
|
||||||
|
vault.hashicorp.com/agent-inject-template-contracts-kafka: |-
|
||||||
|
{{- with secret "secrets/data/kafka/apps/contracts" -}}
|
||||||
|
CONTRACTS_KAFKA_BOOTSTRAP_SERVERS={{ index .Data.data.auth "bootstrap_servers" }}
|
||||||
|
CONTRACTS_KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||||
|
CONTRACTS_KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||||
|
CONTRACTS_KAFKA_USERNAME={{ index .Data.data "username" }}
|
||||||
|
CONTRACTS_KAFKA_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: contracts-vault
|
||||||
containers:
|
containers:
|
||||||
- name: backend
|
- name: backend
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/contracts:prod_d3bbd9fc
|
image: cr.yandex/crp3ccidau046kdj8g9q/contracts:prod_d3bbd9fc
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
command: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/contracts-db ] && . /vault/secrets/contracts-db
|
||||||
|
[ -f /vault/secrets/contracts-jwt-public ] && export PUBLIC_KEY="$(cat /vault/secrets/contracts-jwt-public)"
|
||||||
|
[ -f /vault/secrets/contracts-rabbitmq ] && . /vault/secrets/contracts-rabbitmq
|
||||||
|
[ -f /vault/secrets/contracts-s3 ] && . /vault/secrets/contracts-s3
|
||||||
|
[ -f /vault/secrets/contracts-kafka ] && . /vault/secrets/contracts-kafka
|
||||||
|
set +a
|
||||||
|
exec /usr/local/bin/http
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: 8000
|
containerPort: 8000
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
env:
|
env:
|
||||||
|
- name: ADDRESS
|
||||||
|
value: ":8000"
|
||||||
- name: ENABLE_SSL
|
- name: ENABLE_SSL
|
||||||
value: "false"
|
value: "false"
|
||||||
- name: DB_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: postgresql-secrets
|
|
||||||
key: url
|
|
||||||
- name: PUBLIC_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: auth-public-key
|
|
||||||
key: public_key
|
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: regcred
|
- name: regcred
|
||||||
|
|||||||
@ -4,5 +4,6 @@ kind: Kustomization
|
|||||||
namespace: contracts
|
namespace: contracts
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
- serviceaccount.yaml
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
|
|||||||
5
apps/contracts/base/serviceaccount.yaml
Normal file
5
apps/contracts/base/serviceaccount.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: contracts-vault
|
||||||
|
namespace: contracts
|
||||||
@ -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
|
||||||
@ -64,7 +64,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
|
||||||
@ -75,7 +75,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
|
||||||
@ -86,7 +86,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,12 +101,19 @@ spec:
|
|||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
contour:
|
contour:
|
||||||
enabled: true
|
enabled: true
|
||||||
adminUser: ""
|
adminUser: "postgres"
|
||||||
adminPasswordSecretKey: ""
|
sharedPreloadLibraries: "pg_stat_statements,uuid-ossp"
|
||||||
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: contracts_db
|
- name: contracts_db
|
||||||
user: contracts
|
user: contracts
|
||||||
|
passwordKey: contracts
|
||||||
extensions: []
|
extensions: []
|
||||||
restoreFromDump: false
|
restoreFromDump: false
|
||||||
s3-proxy:
|
s3-proxy:
|
||||||
|
|||||||
@ -15,11 +15,71 @@ spec:
|
|||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: backend
|
app: 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: mapper
|
||||||
|
vault.hashicorp.com/agent-inject-secret-mapper-django-auth: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-mapper-django-auth: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
MAPPER_DJANGO_TOKEN={{ index .Data.data "key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-mapper-db: secrets/data/postgresql/apps/mapper
|
||||||
|
vault.hashicorp.com/agent-inject-template-mapper-db: |-
|
||||||
|
{{- with secret "secrets/data/postgresql/apps/mapper" -}}
|
||||||
|
MAPPER_DB_USER={{ index .Data.data "username" }}
|
||||||
|
MAPPER_DB_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
MAPPER_DB_HOST=postgresql.mapper.svc.cluster.local
|
||||||
|
MAPPER_DB_PORT=5432
|
||||||
|
MAPPER_DB_NAME=mapper_db
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-mapper-rabbitmq: secrets/data/rabbitmq/apps/mapper
|
||||||
|
vault.hashicorp.com/agent-inject-template-mapper-rabbitmq: |-
|
||||||
|
{{- with secret "secrets/data/rabbitmq/apps/mapper" -}}
|
||||||
|
MAPPER_RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
MAPPER_RABBITMQ_USERNAME={{ index .Data.data "username" }}
|
||||||
|
MAPPER_RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
MAPPER_RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
MAPPER_RABBITMQ_PORT=5672
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-mapper-s3: secrets/data/minio/apps/mapper
|
||||||
|
vault.hashicorp.com/agent-inject-template-mapper-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/mapper" -}}
|
||||||
|
MAPPER_S3_ENDPOINT={{ index .Data.data.client "endpoint" }}
|
||||||
|
MAPPER_S3_REGION={{ index .Data.data.client "region" }}
|
||||||
|
MAPPER_S3_BUCKET=mapper
|
||||||
|
MAPPER_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||||
|
MAPPER_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-mapper-kafka: secrets/data/kafka/apps/mapper
|
||||||
|
vault.hashicorp.com/agent-inject-template-mapper-kafka: |-
|
||||||
|
{{- with secret "secrets/data/kafka/apps/mapper" -}}
|
||||||
|
MAPPER_KAFKA_BOOTSTRAP_SERVERS={{ index .Data.data.auth "bootstrap_servers" }}
|
||||||
|
MAPPER_KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||||
|
MAPPER_KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||||
|
MAPPER_KAFKA_USERNAME={{ index .Data.data "username" }}
|
||||||
|
MAPPER_KAFKA_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: mapper-vault
|
||||||
containers:
|
containers:
|
||||||
- name: backend
|
- name: backend
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/mapper:prod_b0d05a34
|
image: cr.yandex/crp3ccidau046kdj8g9q/mapper:prod_b0d05a34
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
command: ["/bin/bash", "-ec"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/mapper-django-auth ] && . /vault/secrets/mapper-django-auth
|
||||||
|
[ -f /vault/secrets/mapper-db ] && . /vault/secrets/mapper-db
|
||||||
|
[ -f /vault/secrets/mapper-rabbitmq ] && . /vault/secrets/mapper-rabbitmq
|
||||||
|
[ -f /vault/secrets/mapper-s3 ] && . /vault/secrets/mapper-s3
|
||||||
|
[ -f /vault/secrets/mapper-kafka ] && . /vault/secrets/mapper-kafka
|
||||||
|
set +a
|
||||||
|
exec /bin/bash /opt/entrypoint.sh
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: 8000
|
containerPort: 8000
|
||||||
|
|||||||
@ -4,5 +4,6 @@ kind: Kustomization
|
|||||||
namespace: mapper
|
namespace: mapper
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
- serviceaccount.yaml
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
|
|||||||
5
apps/mapper/base/serviceaccount.yaml
Normal file
5
apps/mapper/base/serviceaccount.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: mapper-vault
|
||||||
|
namespace: mapper
|
||||||
@ -16,11 +16,71 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: backend
|
app: backend
|
||||||
service: main
|
service: main
|
||||||
|
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: notes
|
||||||
|
vault.hashicorp.com/agent-inject-secret-notes-db: secrets/data/postgresql/apps/notes
|
||||||
|
vault.hashicorp.com/agent-inject-template-notes-db: |-
|
||||||
|
{{- with secret "secrets/data/postgresql/apps/notes" -}}
|
||||||
|
PG_HOST=postgresql.notes.svc.cluster.local
|
||||||
|
PG_PORT=5432
|
||||||
|
PG_DB=notes_db
|
||||||
|
PG_LOGIN={{ index .Data.data "username" }}
|
||||||
|
PG_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-notes-django-auth: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-notes-django-auth: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
DJANGO_TOKEN={{ index .Data.data "key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-notes-rabbitmq: secrets/data/rabbitmq/apps/notes
|
||||||
|
vault.hashicorp.com/agent-inject-template-notes-rabbitmq: |-
|
||||||
|
{{- with secret "secrets/data/rabbitmq/apps/notes" -}}
|
||||||
|
NOTES_RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
NOTES_RABBITMQ_USERNAME={{ index .Data.data "username" }}
|
||||||
|
NOTES_RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
NOTES_RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
NOTES_RABBITMQ_PORT=5672
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-notes-s3: secrets/data/minio/apps/notes
|
||||||
|
vault.hashicorp.com/agent-inject-template-notes-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/notes" -}}
|
||||||
|
NOTES_S3_ENDPOINT={{ index .Data.data.client "endpoint" }}
|
||||||
|
NOTES_S3_REGION={{ index .Data.data.client "region" }}
|
||||||
|
NOTES_S3_BUCKET=notes
|
||||||
|
NOTES_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||||
|
NOTES_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-notes-kafka: secrets/data/kafka/apps/notes
|
||||||
|
vault.hashicorp.com/agent-inject-template-notes-kafka: |-
|
||||||
|
{{- with secret "secrets/data/kafka/apps/notes" -}}
|
||||||
|
NOTES_KAFKA_BOOTSTRAP_SERVERS={{ index .Data.data.auth "bootstrap_servers" }}
|
||||||
|
NOTES_KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||||
|
NOTES_KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||||
|
NOTES_KAFKA_USERNAME={{ index .Data.data "username" }}
|
||||||
|
NOTES_KAFKA_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: notes-vault
|
||||||
containers:
|
containers:
|
||||||
- name: main
|
- name: main
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/notes-backend:production_81366854
|
image: cr.yandex/crp3ccidau046kdj8g9q/notes-backend:production_81366854
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
command: ["/bin/bash", "-ec"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/notes-db ] && . /vault/secrets/notes-db
|
||||||
|
[ -f /vault/secrets/notes-django-auth ] && . /vault/secrets/notes-django-auth
|
||||||
|
[ -f /vault/secrets/notes-rabbitmq ] && . /vault/secrets/notes-rabbitmq
|
||||||
|
[ -f /vault/secrets/notes-s3 ] && . /vault/secrets/notes-s3
|
||||||
|
[ -f /vault/secrets/notes-kafka ] && . /vault/secrets/notes-kafka
|
||||||
|
set +a
|
||||||
|
exec /bin/bash /opt/entrypoint.sh
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: 8000
|
containerPort: 8000
|
||||||
@ -52,31 +112,6 @@ spec:
|
|||||||
value: http://attachments-service.attachments.svc.cluster.local:80/api/v1
|
value: http://attachments-service.attachments.svc.cluster.local:80/api/v1
|
||||||
- name: PG_PORT
|
- name: PG_PORT
|
||||||
value: "5432"
|
value: "5432"
|
||||||
- name: PG_DB
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: postgresql-secrets
|
|
||||||
key: database
|
|
||||||
- name: PG_LOGIN
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: postgresql-secrets
|
|
||||||
key: username
|
|
||||||
- name: PG_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: postgresql-secrets
|
|
||||||
key: password
|
|
||||||
- name: PG_HOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: postgresql-secrets
|
|
||||||
key: hostname
|
|
||||||
- name: DJANGO_TOKEN
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: django-secret
|
|
||||||
key: token
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: "1"
|
cpu: "1"
|
||||||
|
|||||||
@ -4,6 +4,7 @@ kind: Kustomization
|
|||||||
namespace: notes
|
namespace: notes
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
- serviceaccount.yaml
|
||||||
- backend-deployment.yaml
|
- backend-deployment.yaml
|
||||||
- backend-service.yaml
|
- backend-service.yaml
|
||||||
- frontend-deployment.yaml
|
- frontend-deployment.yaml
|
||||||
|
|||||||
5
apps/notes/base/serviceaccount.yaml
Normal file
5
apps/notes/base/serviceaccount.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: notes-vault
|
||||||
|
namespace: notes
|
||||||
@ -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
|
||||||
@ -64,7 +64,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
|
||||||
@ -75,7 +75,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
|
||||||
@ -86,7 +86,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,12 +101,19 @@ spec:
|
|||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
contour:
|
contour:
|
||||||
enabled: true
|
enabled: true
|
||||||
adminUser: ""
|
adminUser: "postgres"
|
||||||
adminPasswordSecretKey: ""
|
sharedPreloadLibraries: "pg_stat_statements,uuid-ossp"
|
||||||
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: notes_db
|
- name: notes_db
|
||||||
user: notes
|
user: notes
|
||||||
|
passwordKey: notes
|
||||||
extensions: []
|
extensions: []
|
||||||
restoreFromDump: false
|
restoreFromDump: false
|
||||||
s3-proxy:
|
s3-proxy:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user