Skip to content

Commit

Permalink
cleanup current user connect
Browse files Browse the repository at this point in the history
Signed-off-by: Gerd Oberlechner <goberlec@redhat.com>
  • Loading branch information
geoberle committed Oct 30, 2024
1 parent c6f5911 commit 08971dc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 44 deletions.
14 changes: 0 additions & 14 deletions dev-infrastructure/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,27 +167,13 @@ endif
@scripts/aks-admin-access.sh $(RESOURCEGROUP)
.PHONY: aks.admin-access

cs-current-user-pg-connect: rg
ifndef AKSCONFIG
$(error "Must set AKSCONFIG")
endif
@scripts/cs-current-user-pg-connect.sh $(RESOURCEGROUP) "cs-pg-"
.PHONY: cs-current-user-pg-connect

cs-miwi-pg-connect: rg
ifndef AKSCONFIG
$(error "Must set AKSCONFIG")
endif
@scripts/miwi-pg-connect.sh $(RESOURCEGROUP) "cs-pg-" "clusters-service" "cluster-service" "clusters-service"
.PHONY: cs-miwi-pg-connect

maestro-current-user-pg-connect: rg
ifndef AKSCONFIG
$(error "Must set AKSCONFIG")
endif
@scripts/cs-current-user-pg-connect.sh $(RESOURCEGROUP) "maestro-pg-"
.PHONY: maestro-current-user-pg-connect

maestro-miwi-pg-connect: rg
ifndef AKSCONFIG
$(error "Must set AKSCONFIG")
Expand Down
12 changes: 1 addition & 11 deletions dev-infrastructure/docs/development-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,20 +449,10 @@ To create a Postgres DB on Azure enabled for Entra authentication, a svc cluster
### Access the database from outside of the AKS cluster
To connect to the database as current user run
```sh
eval $(make cs-current-user-pg-connect)
psql -d clusters-service
```
The output of the make target is in ENV var format for the `psql` tool, so this works to get a connection into the DB.
To connect to the database with the managed identity of CS, make sure to have a KUBECONFIG for the cluster that runs CS and run
```sh
eval $(make cs-miwi-pg-connect)
psql -d clusters-service
AKSCONFIG=svc-cluster make cs-miwi-pg-connect
```
Once logged in, verify the connection with `\conninfo`
Expand Down
19 changes: 0 additions & 19 deletions dev-infrastructure/scripts/cs-current-user-pg-connect.sh

This file was deleted.

0 comments on commit 08971dc

Please sign in to comment.