Initial commit

This commit is contained in:
Valentin Afanasev
2025-08-05 02:11:04 +03:00
commit c8aeedafdb
3 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,12 @@
name: Run pg for tests
inputs:
service_name:
required: true
runs:
using: composite
env:
POD_NAME: ${{ inputs.service_name }}
APP_NAME: ${{ inputs.service_name }}
SERVICE_NAME: ${{ inputs.service_name }}
steps:
run: envsubst < postgres-template.yaml | werf kubectl apply -

View File

@ -0,0 +1,31 @@
apiVersion: v1
kind: Pod
metadata:
name: ${POD_NAME}
labels:
app: ${APP_NAME}
spec:
containers:
- name: postgres
image: postgres:15
ports:
- containerPort: 5432
env:
- name: POSTGRES_PASSWORD
value: test
readinessProbe:
exec:
command: ["pg_isready", "-U", "postgres"]
initialDelaySeconds: 5
periodSeconds: 10
---
apiVersion: v1
kind: Service
metadata:
name: ${SERVICE_NAME}
spec:
selector:
app: ${APP_NAME}
ports:
- port: 5432
targetPort: 5432