Skip to content

Commit 5888934

Browse files
CopilotSRF-Audio
andcommitted
Address code review feedback: add sync-wave comment, improve docs with service verification
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
1 parent a5f7571 commit 5888934

3 files changed

Lines changed: 32 additions & 4 deletions

File tree

argocd/apps/platform/pgadmin.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ metadata:
66
namespace: argocd
77
annotations:
88
argocd.argoproj.io/sync-wave: "20"
9+
# Deploys after pgadmin-secrets (wave 10) to ensure OnePasswordItem is created first
910
spec:
1011
project: coachlight-k3s-infra
1112
source:

docs/platform/pgadmin.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@ Credentials are automatically injected into the pgAdmin pod via the 1Password Op
3333

3434
After logging in to pgAdmin, you'll need to register the PostgreSQL server to manage it:
3535

36+
### Verify PostgreSQL Service Name
37+
38+
First, verify the PostgreSQL service name and namespace:
39+
40+
```bash
41+
kubectl -n db-postgres get svc
42+
# Look for: postgres-postgresql
43+
```
44+
45+
### Add Server in pgAdmin
46+
3647
1. Click **"Add New Server"** in the pgAdmin dashboard
3748
2. In the **General** tab:
3849
- **Name**: `Coachlight Postgres` (or any descriptive name)
@@ -46,6 +57,8 @@ After logging in to pgAdmin, you'll need to register the PostgreSQL server to ma
4657
- **DB restriction**: Leave blank to see all databases
4758
5. Click **Save**
4859

60+
> **Note**: The hostname `postgres-postgresql.db-postgres.svc.cluster.local` assumes the PostgreSQL service is named `postgres-postgresql` in the `db-postgres` namespace. Verify the actual service name if connection fails.
61+
4962
## Usage Guidelines
5063

5164
### Intended Use
@@ -102,16 +115,28 @@ kubectl -n infra-pgadmin describe onepassworditem pgadmin-credentials
102115

103116
### Cannot connect to PostgreSQL
104117

105-
Verify network connectivity from pgAdmin pod:
118+
Verify PostgreSQL service name and availability:
106119

107120
```bash
108-
kubectl -n infra-pgadmin exec -it <pod-name> -- ping postgres-postgresql.db-postgres.svc.cluster.local
121+
# List all services in db-postgres namespace
122+
kubectl -n db-postgres get svc
123+
124+
# Check specific service (default name: postgres-postgresql)
125+
kubectl -n db-postgres get svc postgres-postgresql
126+
kubectl -n db-postgres describe svc postgres-postgresql
109127
```
110128

111-
Check PostgreSQL service:
129+
Verify network connectivity from pgAdmin pod:
112130

113131
```bash
114-
kubectl -n db-postgres get svc postgres-postgresql
132+
# Get pod name
133+
POD=$(kubectl -n infra-pgadmin get pod -l app.kubernetes.io/name=pgadmin4 -o jsonpath='{.items[0].metadata.name}')
134+
135+
# Test DNS resolution
136+
kubectl -n infra-pgadmin exec -it $POD -- nslookup postgres-postgresql.db-postgres.svc.cluster.local
137+
138+
# Test connectivity
139+
kubectl -n infra-pgadmin exec -it $POD -- nc -zv postgres-postgresql.db-postgres.svc.cluster.local 5432
115140
```
116141

117142
### pgAdmin not accessible via Tailscale

k8s/resources/ingresses/infra-pgadmin/ingress-pgadmin.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
# Internal-only pgAdmin access via Tailscale
3+
# Service name follows Helm chart naming: <release-name>-<chart-name>
24
apiVersion: networking.k8s.io/v1
35
kind: Ingress
46
metadata:

0 commit comments

Comments
 (0)