drwaings/measurements/comparisons/cross-section
This commit is contained in:
parent
4a4c966e50
commit
5ab8fe0fe3
@ -15,11 +15,34 @@ 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: drawings
|
||||||
|
vault.hashicorp.com/agent-inject-secret-drawings-db: secrets/data/postgresql/apps/drawings
|
||||||
|
vault.hashicorp.com/agent-inject-template-drawings-db: |-
|
||||||
|
{{- with secret "secrets/data/postgresql/apps/drawings" -}}
|
||||||
|
POSTGRES_ADDRESS=postgresql.drawings.svc.cluster.local
|
||||||
|
POSTGRES_DB=drawings_db
|
||||||
|
POSTGRES_USER={{ index .Data.data "username" }}
|
||||||
|
POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: drawings-vault
|
||||||
containers:
|
containers:
|
||||||
- name: backend
|
- name: backend
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/drawings-api:015e68e1b2a3dcc13f0b405e1f761b154a825d24
|
image: cr.yandex/crp3ccidau046kdj8g9q/drawings-api:015e68e1b2a3dcc13f0b405e1f761b154a825d24
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
command: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/drawings-db ] && . /vault/secrets/drawings-db
|
||||||
|
set +a
|
||||||
|
exec ./entrypoint.sh
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: 8080
|
containerPort: 8080
|
||||||
@ -31,25 +54,5 @@ spec:
|
|||||||
value: 0.0.0.0:8000
|
value: 0.0.0.0:8000
|
||||||
- name: ENABLE_SSL
|
- name: ENABLE_SSL
|
||||||
value: "0"
|
value: "0"
|
||||||
- name: POSTGRES_ADDRESS
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: postgresql-secrets
|
|
||||||
key: host
|
|
||||||
- name: POSTGRES_DB
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: postgresql-secrets
|
|
||||||
key: database
|
|
||||||
- name: POSTGRES_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: postgresql-secrets
|
|
||||||
key: username
|
|
||||||
- name: POSTGRES_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: postgresql-secrets
|
|
||||||
key: password
|
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: regcred
|
- name: regcred
|
||||||
|
|||||||
@ -4,5 +4,6 @@ kind: Kustomization
|
|||||||
namespace: drawings
|
namespace: drawings
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
- serviceaccount.yaml
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
|
|||||||
5
apps/drawings/base/serviceaccount.yaml
Normal file
5
apps/drawings/base/serviceaccount.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: drawings-vault
|
||||||
|
namespace: drawings
|
||||||
@ -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,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"
|
sharedPreloadLibraries: "pg_stat_statements,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: drawings_db
|
- name: drawings_db
|
||||||
user: drawings
|
user: drawings
|
||||||
|
passwordKey: drawings
|
||||||
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"
|
||||||
|
|||||||
@ -15,11 +15,31 @@ spec:
|
|||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: measurements
|
app: measurements
|
||||||
|
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: measurements
|
||||||
|
vault.hashicorp.com/agent-inject-secret-measurements-s3: secrets/data/minio/apps/measurements
|
||||||
|
vault.hashicorp.com/agent-inject-template-measurements-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/measurements" -}}
|
||||||
|
S3_JSON_SETTINGS='{"host":"{{ index .Data.data.client "endpoint" }}","login":"{{ index .Data.data "access_key" }}","password":"{{ index .Data.data "secret_key" }}","verify":false,"buckets":["measurements"]}'
|
||||||
|
{{- end -}}
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: measurements-vault
|
||||||
containers:
|
containers:
|
||||||
- name: measurements
|
- name: measurements
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/measurements:production_a5bb3e84
|
image: cr.yandex/crp3ccidau046kdj8g9q/measurements:production_a5bb3e84
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
command: ["/bin/bash", "-ec"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/measurements-s3 ] && . /vault/secrets/measurements-s3
|
||||||
|
set +a
|
||||||
|
exec /opt/entrypoint.sh
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: 8000
|
containerPort: 8000
|
||||||
@ -27,11 +47,6 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: TRACING_USE
|
- name: TRACING_USE
|
||||||
value: "false"
|
value: "false"
|
||||||
- name: S3_JSON_SETTINGS
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: s3-secrets
|
|
||||||
key: json
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 500m
|
cpu: 500m
|
||||||
|
|||||||
@ -4,5 +4,6 @@ kind: Kustomization
|
|||||||
namespace: measurements
|
namespace: measurements
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
- serviceaccount.yaml
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
|
|||||||
5
apps/measurements/base/serviceaccount.yaml
Normal file
5
apps/measurements/base/serviceaccount.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: measurements-vault
|
||||||
|
namespace: measurements
|
||||||
Loading…
Reference in New Issue
Block a user