Skip to content

Commit 99c01e6

Browse files
committed
cmd/relui: correct database configuration
Add missing IAM flag for cloud_sql_proxy, and use the correct user and database in relui environment. For golang/go#47401 Change-Id: I2fa760c00f7000552d87069f259750fa455cce92 Reviewed-on: https://go-review.googlesource.com/c/build/+/363695 Trust: Alexander Rakoczy <[email protected]> Run-TryBot: Alexander Rakoczy <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
1 parent a9ac038 commit 99c01e6

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

cmd/relui/deployment-prod.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,20 @@ spec:
1919
- name: relui
2020
image: gcr.io/symbolic-datum-552/relui:latest
2121
imagePullPolicy: Always
22-
command: ["/sbin/tini", "--", "./relui", "--listen-https-selfsigned=:444"]
22+
command:
23+
- "/usr/bin/tini"
24+
- "--"
25+
- "./relui"
26+
- "--listen-https-selfsigned=:444"
2327
ports:
2428
- containerPort: 444
2529
env:
2630
- name: PGUSER
27-
value: relui
31+
32+
- name: PGHOST
33+
value: 127.0.0.1
2834
- name: PGDATABASE
29-
value: relui-prod
35+
value: relui
3036
resources:
3137
requests:
3238
cpu: "2"
@@ -36,11 +42,10 @@ spec:
3642
image: gcr.io/cloudsql-docker/gce-proxy:latest
3743
command:
3844
- "/cloud_sql_proxy"
39-
4045
# If connecting from a VPC-native GKE cluster, you can use the
4146
# following flag to have the proxy connect over private IP
4247
- "-ip_address_types=PRIVATE"
43-
48+
- "-enable_iam_login"
4449
# Replace DB_PORT with the port the proxy should listen on
4550
# Defaults: MySQL: 3306, Postgres: 5432, SQLServer: 1433
4651
- "-instances=symbolic-datum-552:us-central1:relui-prod-01=tcp:5432"
@@ -68,7 +73,7 @@ metadata:
6873
namespace: prod
6974
name: relui
7075
annotations:
71-
iam.gke.io/gcp-service-account: [email protected]
76+
iam.gke.io/gcp-service-account: relui-prod@symbolic-datum-552.iam.gserviceaccount.com
7277
---
7378
apiVersion: v1
7479
kind: Service

0 commit comments

Comments
 (0)