Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch Red Hat postgres image #7

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions infra/dataindex/01-postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,39 @@ spec:
spec:
containers:
- name: postgres
image: postgres:13.2-alpine
image: registry.redhat.io/rhel8/postgresql-13
imagePullPolicy: 'IfNotPresent'
ports:
- containerPort: 5432
protocol: TCP
volumeMounts:
- name: storage
mountPath: /var/lib/postgresql/data
mountPath: /var/lib/pgsql/data
envFrom:
- secretRef:
name: postgres-secrets
readinessProbe:
exec:
command: ["pg_isready"]
initialDelaySeconds: 15
timeoutSeconds: 2
command:
- /usr/libexec/check-container
initialDelaySeconds: 5
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
livenessProbe:
exec:
command: ["pg_isready"]
initialDelaySeconds: 15
timeoutSeconds: 2
command:
- /usr/libexec/check-container
- '--live'
initialDelaySeconds: 120
timeoutSeconds: 10
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
resources:
limits:
memory: "256Mi"
memory: "512Mi"
cpu: "500m"
volumes:
- name: storage
Expand Down
4 changes: 2 additions & 2 deletions infra/dataindex/02-dataindex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ spec:
- name: QUARKUS_DATASOURCE_USERNAME
valueFrom:
secretKeyRef:
key: POSTGRES_USER
key: POSTGRESQL_USER
name: postgres-secrets
- name: QUARKUS_DATASOURCE_PASSWORD
valueFrom:
secretKeyRef:
key: POSTGRES_PASSWORD
key: POSTGRESQL_PASSWORD
name: postgres-secrets
volumeMounts:
- name: application-config
Expand Down
8 changes: 4 additions & 4 deletions infra/dataindex/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ resources:
secretGenerator:
- name: postgres-secrets
literals:
- POSTGRES_USER=sonataflow
- POSTGRES_PASSWORD=sonataflow
- POSTGRES_DB=sonataflow
- PGDATA=/var/lib/postgresql/data/mydata
- POSTGRESQL_USER=sonataflow
- POSTGRESQL_PASSWORD=sonataflow
- POSTGRESQL_DATABASE=sonataflow
- PGDATA=/var/lib/pgsql/data/userdata

configMapGenerator:
- name: dataindex-properties
Expand Down
4 changes: 2 additions & 2 deletions infra/dataindex_and_jobservice/03-jobservice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ spec:
- name: QUARKUS_DATASOURCE_USERNAME
valueFrom:
secretKeyRef:
key: POSTGRES_USER
key: POSTGRESQL_USER
name: postgres-secrets
- name: QUARKUS_DATASOURCE_PASSWORD
valueFrom:
secretKeyRef:
key: POSTGRES_PASSWORD
key: POSTGRESQL_PASSWORD
name: postgres-secrets
volumeMounts:
- name: application-config
Expand Down