Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
9c4df17a55
110
apps/system-log/base/backend-deployment.yaml
Normal file
110
apps/system-log/base/backend-deployment.yaml
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: api
|
||||||
|
namespace: system-log
|
||||||
|
labels:
|
||||||
|
app: api
|
||||||
|
service: api
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: api
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: api
|
||||||
|
service: api
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: api
|
||||||
|
image: cr.yandex/crp3ccidau046kdj8g9q/system-log:prod_6ed1b27e
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 8000
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: KAFKA_ENABLE
|
||||||
|
value: "0"
|
||||||
|
- name: KAFKA_USE_SSL
|
||||||
|
value: "0"
|
||||||
|
- name: KAFKA_ENABLE_LOGGING
|
||||||
|
value: "0"
|
||||||
|
- name: APP_NAME
|
||||||
|
value: system_log
|
||||||
|
- name: APP_VERSION
|
||||||
|
value: 0.0.1
|
||||||
|
- name: LOG_LEVEL
|
||||||
|
value: INFO
|
||||||
|
- name: HTTP_HOST
|
||||||
|
value: 0.0.0.0
|
||||||
|
- name: HTTP_PORT
|
||||||
|
value: "8000"
|
||||||
|
- name: NAMESPACE
|
||||||
|
value: system-log
|
||||||
|
- name: POSTGRES_POOL_SIZE
|
||||||
|
value: "3"
|
||||||
|
- name: ENABLE_SSL
|
||||||
|
value: "0"
|
||||||
|
- name: DJANGO_HOST
|
||||||
|
value: http://backend.django.svc.cluster.local:8000
|
||||||
|
- name: POSTGRES_ADDRESS
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: hostname
|
||||||
|
name: postgresql-secret
|
||||||
|
- name: POSTGRES_PORT
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: port
|
||||||
|
name: postgresql-secret
|
||||||
|
- name: POSTGRES_DB
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: database
|
||||||
|
name: postgresql-secret
|
||||||
|
- name: POSTGRES_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: username
|
||||||
|
name: postgresql-secret
|
||||||
|
- name: POSTGRES_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: password
|
||||||
|
name: postgresql-secret
|
||||||
|
- name: KAFKA_USERNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: username
|
||||||
|
name: kafka-secret
|
||||||
|
- name: KAFKA_BROKERS
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: host
|
||||||
|
name: kafka-secret
|
||||||
|
- name: KAFKA_TOPIC
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: topic
|
||||||
|
name: kafka-secret
|
||||||
|
- name: KAFKA_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: password
|
||||||
|
name: kafka-secret
|
||||||
|
- name: KAFKA_PEM_CERT
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: ca.crt
|
||||||
|
name: kafka-secret
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "1"
|
||||||
|
memory: 1Gi
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: regcred
|
||||||
15
apps/system-log/base/backend-service.yaml
Normal file
15
apps/system-log/base/backend-service.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: rfi-backend-api-svc
|
||||||
|
namespace: system-log
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: rfi-backend-api
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 8000
|
||||||
|
protocol: TCP
|
||||||
9
apps/system-log/base/kustomization.yaml
Normal file
9
apps/system-log/base/kustomization.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: system-log
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- backend-deployment.yaml
|
||||||
|
- backend-service.yaml
|
||||||
|
- worker-deployment.yaml
|
||||||
7
apps/system-log/base/namespace.yaml
Normal file
7
apps/system-log/base/namespace.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: system-log
|
||||||
|
labels:
|
||||||
|
istio-injection: enabled
|
||||||
91
apps/system-log/base/worker-deployment.yaml
Normal file
91
apps/system-log/base/worker-deployment.yaml
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: worker
|
||||||
|
namespace: system-log
|
||||||
|
labels:
|
||||||
|
app: worker
|
||||||
|
service: worker
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: worker
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: worker
|
||||||
|
service: worker
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: worker
|
||||||
|
image: cr.yandex/crp3ccidau046kdj8g9q/system_log_worker:de6a0147d285afa273e85c0f074c8b6049d03a32
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 8000
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: APP_NAME
|
||||||
|
value: system_log
|
||||||
|
- name: APP_VERSION
|
||||||
|
value: 0.0.1
|
||||||
|
- name: LOG_LEVEL
|
||||||
|
value: INFO
|
||||||
|
- name: HTTP_HOST
|
||||||
|
value: 0.0.0.0
|
||||||
|
- name: HTTP_PORT
|
||||||
|
value: "8000"
|
||||||
|
- name: NAMESPACE
|
||||||
|
value: sarex-system-log
|
||||||
|
- name: DOCUMENTATIONS_URL
|
||||||
|
value: http://documentations-api.documentations.svc.cluster.local:8080
|
||||||
|
- name: POSTGRES_POOL_SIZE
|
||||||
|
value: "3"
|
||||||
|
- name: ENABLE_SSL
|
||||||
|
value: "0"
|
||||||
|
- name: DJANGO_HOST
|
||||||
|
value: http://backend.django.svc.cluster.local:8000
|
||||||
|
- name: POSTGRES_ADDRESS
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: hostname
|
||||||
|
name: postgresql-secret
|
||||||
|
- name: POSTGRES_PORT
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: port
|
||||||
|
name: postgresql-secret
|
||||||
|
- name: POSTGRES_DB
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: database
|
||||||
|
name: postgresql-secret
|
||||||
|
- name: POSTGRES_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: username
|
||||||
|
name: postgresql-secret
|
||||||
|
- name: POSTGRES_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: password
|
||||||
|
name: postgresql-secret
|
||||||
|
- name: SUPER_USERNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: username
|
||||||
|
name: superuser
|
||||||
|
- name: SUPER_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: password
|
||||||
|
name: superuser
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "1"
|
||||||
|
memory: 1Gi
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: regcred
|
||||||
7
apps/system-log/yc-k8s-test/kustomization.yaml
Normal file
7
apps/system-log/yc-k8s-test/kustomization.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
- postgresql.yaml
|
||||||
|
patches: []
|
||||||
110
apps/system-log/yc-k8s-test/postgresql.yaml
Normal file
110
apps/system-log/yc-k8s-test/postgresql.yaml
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: postgresql
|
||||||
|
namespace: system-log
|
||||||
|
spec:
|
||||||
|
interval: 5m
|
||||||
|
timeout: 2h
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: postgresql-contour
|
||||||
|
version: "17.0.2"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
|
||||||
|
install:
|
||||||
|
timeout: 2h
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
|
||||||
|
upgrade:
|
||||||
|
timeout: 2h
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
security:
|
||||||
|
allowInsecureImages: true
|
||||||
|
defaultStorageClass: local-path
|
||||||
|
postgresql:
|
||||||
|
auth:
|
||||||
|
username: ""
|
||||||
|
database: ""
|
||||||
|
secretKeys:
|
||||||
|
userPasswordKey: "postgres-password"
|
||||||
|
auth:
|
||||||
|
username: ""
|
||||||
|
database: ""
|
||||||
|
secretKeys:
|
||||||
|
userPasswordKey: "postgres-password"
|
||||||
|
image:
|
||||||
|
registry: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
|
repository: contour/postgresql
|
||||||
|
tag: 17.0.2
|
||||||
|
pullPolicy: Always
|
||||||
|
metrics:
|
||||||
|
enabled: false
|
||||||
|
prometheusRule:
|
||||||
|
enabled: false
|
||||||
|
primary:
|
||||||
|
containerSecurityContext:
|
||||||
|
readOnlyRootFilesystem: false
|
||||||
|
persistence:
|
||||||
|
storageClass: local-path
|
||||||
|
size: 20Gi
|
||||||
|
customLivenessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 6
|
||||||
|
customReadinessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 6
|
||||||
|
customStartupProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- exec pg_isready -U "sarex" -d postgres -h 127.0.0.1 -p 5432
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 6
|
||||||
|
nodeSelector:
|
||||||
|
dedicated: db
|
||||||
|
tolerations:
|
||||||
|
- key: dedicated
|
||||||
|
operator: Equal
|
||||||
|
value: db
|
||||||
|
effect: NoSchedule
|
||||||
|
contour:
|
||||||
|
enabled: true
|
||||||
|
adminUser: ""
|
||||||
|
adminPasswordSecretKey: ""
|
||||||
|
sharedPreloadLibraries: "ltree,pg_stat_statements,timescaledb"
|
||||||
|
databases:
|
||||||
|
- name: system_log_db
|
||||||
|
user: system_log
|
||||||
|
extensions: []
|
||||||
|
restoreFromDump: false
|
||||||
|
s3-proxy:
|
||||||
|
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
||||||
@ -19,4 +19,5 @@ resources:
|
|||||||
- ../../apps/rfi/yc-k8s-test
|
- ../../apps/rfi/yc-k8s-test
|
||||||
- ../../apps/checklists/yc-k8s-test
|
- ../../apps/checklists/yc-k8s-test
|
||||||
- ../../apps/subscriptions/yc-k8s-test
|
- ../../apps/subscriptions/yc-k8s-test
|
||||||
- ../../apps/inspections/yc-k8s-test
|
- ../../apps/inspections/yc-k8s-test
|
||||||
|
- ../../apps/system-log/yc-k8s-test
|
||||||
Loading…
Reference in New Issue
Block a user