Add attachments app with base configuration and yc-k8s-test overlay
This commit is contained in:
parent
82a1bdcbc6
commit
40c8ef7d24
76
apps/attachments/base/deployment.yaml
Normal file
76
apps/attachments/base/deployment.yaml
Normal file
@ -0,0 +1,76 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: attachments
|
||||
namespace: attachments
|
||||
labels:
|
||||
app: attachments
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: attachments
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: attachments
|
||||
spec:
|
||||
containers:
|
||||
- name: attachments
|
||||
image: cr.yandex/crp3ccidau046kdj8g9q/att9:dev
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8000
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: POSTGRES_POOL_SIZE
|
||||
value: "10"
|
||||
- name: API_ADDRESS
|
||||
value: 0.0.0.0:8000
|
||||
- name: YANDEX_S3_ACCOUNT_PATH
|
||||
value: /etc/sarex/yc-s3-storage/yc-s3-service-account.json
|
||||
- name: BUCKET_NAME
|
||||
value: attachments-storage
|
||||
- name: DATABASE_SSL_MODE
|
||||
value: disable
|
||||
- name: YANDEX_S3_VERIFY
|
||||
value: "false"
|
||||
- name: YANDEX_S3_USE_SSL
|
||||
value: "false"
|
||||
- name: DATABASE_HOST
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres-secret
|
||||
key: host
|
||||
- name: DATABASE_PORT
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres-secret
|
||||
key: port
|
||||
- name: DATABASE_NAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres-secret
|
||||
key: database
|
||||
- name: DATABASE_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres-secret
|
||||
key: username
|
||||
- name: DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres-secret
|
||||
key: password
|
||||
volumeMounts:
|
||||
- mountPath: /etc/sarex/yc-s3-storage
|
||||
name: yc-s3
|
||||
readOnly: true
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
||||
volumes:
|
||||
- name: yc-s3
|
||||
secret:
|
||||
secretName: yc-s3
|
||||
10
apps/attachments/base/kustomization.yaml
Normal file
10
apps/attachments/base/kustomization.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: attachments
|
||||
resources:
|
||||
- namespace.yaml
|
||||
# - deployment.yaml
|
||||
# - service.yaml
|
||||
# - secret-postgres.yaml
|
||||
# - secret-yc-s3.yaml
|
||||
7
apps/attachments/base/namespace.yaml
Normal file
7
apps/attachments/base/namespace.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: attachments
|
||||
labels:
|
||||
istio-injection: enabled
|
||||
13
apps/attachments/base/secret-postgres.yaml
Normal file
13
apps/attachments/base/secret-postgres.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: postgres-secret
|
||||
namespace: attachments
|
||||
type: Opaque
|
||||
data:
|
||||
host: ""
|
||||
port: ""
|
||||
database: ""
|
||||
username: ""
|
||||
password: ""
|
||||
9
apps/attachments/base/secret-yc-s3.yaml
Normal file
9
apps/attachments/base/secret-yc-s3.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: yc-s3
|
||||
namespace: attachments
|
||||
type: Opaque
|
||||
data:
|
||||
yc-s3-service-account.json: ""
|
||||
14
apps/attachments/base/service.yaml
Normal file
14
apps/attachments/base/service.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: attachments-service
|
||||
namespace: attachments
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: attachments
|
||||
ports:
|
||||
- port: 8000
|
||||
targetPort: 8000
|
||||
protocol: TCP
|
||||
10
apps/attachments/yc-k8s-test/kustomization.yaml
Normal file
10
apps/attachments/yc-k8s-test/kustomization.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../base
|
||||
patches: []
|
||||
# - path: replicas.yaml
|
||||
# target:
|
||||
# kind: Deployment
|
||||
# name: attachments
|
||||
8
apps/attachments/yc-k8s-test/replicas.yaml
Normal file
8
apps/attachments/yc-k8s-test/replicas.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: attachments
|
||||
namespace: attachments
|
||||
spec:
|
||||
replicas: 1
|
||||
@ -11,3 +11,4 @@ resources:
|
||||
- ../../apps/control-interface/yc-k8s-test
|
||||
- ../../apps/cross-section/yc-k8s-test
|
||||
- ../../apps/mapper/yc-k8s-test
|
||||
- ../../apps/attachments/yc-k8s-test
|
||||
Loading…
Reference in New Issue
Block a user