Skip to content

Commit

Permalink
added fixes and db for sql agents
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarrata committed Jan 28, 2025
1 parent 0946785 commit 07be1e7
Show file tree
Hide file tree
Showing 11 changed files with 100 additions and 138 deletions.
10 changes: 5 additions & 5 deletions bootstrap/database/db-init-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@ spec:
command: ['sh', '-c', 'until nc -z -v -w30 $POSTGRESQL_DATABASE 5432; do echo "Waiting for database connection..."; sleep 2; done;']
env:
- name: POSTGRESQL_DATABASE
value: claimdb.ic-shared-db.svc.cluster.local
value: agenticdb.agentic-db.svc.cluster.local
containers:
- name: postgresql
image: registry.redhat.io/rhel9/postgresql-13:latest
env:
- name: POSTGRESQL_DATABASE
valueFrom:
secretKeyRef:
name: claimdb
name: agenticdb
key: database-name
- name: POSTGRESQL_USER
valueFrom:
secretKeyRef:
name: claimdb
name: agenticdb
key: database-user
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: claimdb
name: agenticdb
key: database-password
- name: POSTGRESQL_DATABASE_HOST
value: claimdb.ic-shared-db.svc.cluster.local
value: agenticdb.agentic-db.svc.cluster.local
command: ["/bin/bash", "-c"]
args:
- |
Expand Down
8 changes: 4 additions & 4 deletions bootstrap/database/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: ic-shared-db
name: ic-shared-db
namespace: agentic-zone
name: agentic-db
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
selector:
matchLabels:
app: ic-shared-db
app: agentic-db
replicas: 1
template:
metadata:
labels:
app: ic-shared-db
app: agentic-db
spec:
containers:
- name: postgresql
Expand Down
10 changes: 3 additions & 7 deletions bootstrap/database/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: ic-shared-db
namespace: agentic-zone

commonLabels:
component: ic-shared-db
component: agentic-zone

resources:
# wave 0
- namespace.yaml
# wave 1
- pvc.yaml
- secret.yaml
- secret-minio.yaml
- deployment.yaml
- service.yaml
- sql-script-configmap.yaml
# - sql-script-configmap.yaml
# wave 2
- db-init-job.yaml
- populate-images.yaml
11 changes: 0 additions & 11 deletions bootstrap/database/namespace.yaml

This file was deleted.

59 changes: 0 additions & 59 deletions bootstrap/database/populate-images.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions bootstrap/database/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: claimdb
namespace: ic-shared-db
namespace: agentic-zone
labels:
app: ic-shared-db
app: agentic-db
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
Expand Down
10 changes: 5 additions & 5 deletions bootstrap/database/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ kind: Secret
apiVersion: v1
metadata:
name: claimdb
namespace: ic-shared-db
namespace: agentic-zone
labels:
app: ic-shared-db
app: agentic-db
annotations:
argocd.argoproj.io/sync-wave: "1"
stringData:
database-name: claimdb
database-password: claimdb
database-user: claimdb
database-name: agenticdb
database-password: agenticdb
database-user: agenticdb
type: Opaque
8 changes: 4 additions & 4 deletions bootstrap/database/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
apiVersion: v1
kind: Service
metadata:
name: claimdb
namespace: ic-shared-db
name: agenticdb
namespace: agentic-zone
labels:
app: ic-shared-db
app: agentic-db
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
Expand All @@ -15,6 +15,6 @@ spec:
port: 5432
targetPort: 5432
selector:
app: ic-shared-db
app: agentic-db
sessionAffinity: None
type: ClusterIP
Loading

0 comments on commit 07be1e7

Please sign in to comment.