Skip to content

Commit 4a2d655

Browse files
authored
fix(examples): do not manually set env vars in deployment (#653)
1 parent c1cd021 commit 4a2d655

File tree

4 files changed

+3
-16
lines changed

4 files changed

+3
-16
lines changed

docs/examples/deployment-mssql-tcp.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ spec:
4646
- connectionString: "my-project:us-central1:instance" # from your Cloud SQL Database instance
4747
portEnvName: "DB_PORT" # Will set an env var named 'DB_PORT' to the database port
4848
hostEnvName: "DB_HOST" # Will set an env var named 'DB_HOST' to the proxy's host, 127.0.0.1
49+
privateIP: true # Optional - Will use the private IP instead of public IP
4950
---
5051
##
5152
# Put the database name, username, and password into a kubernetes secret
@@ -103,10 +104,6 @@ spec:
103104
- "-c"
104105
- "sleep 10 ; /opt/mssql-tools/bin/sqlcmd -S \"tcp:$DB_HOST,$DB_PORT\" -U $DB_USER -P $DB_PASS -Q \"use $DB_NAME ; select 1 ;\" ; sleep 3600"
105106
env:
106-
- name: DB_HOST
107-
value: "set-by-operator"
108-
- name: DB_PORT
109-
value: "set-by-operator"
110107
- name: DB_USER
111108
valueFrom:
112109
secretKeyRef:

docs/examples/deployment-mysql-tcp.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ spec:
4646
- connectionString: "my-project:us-central1:instance" # from your Cloud SQL Database instance
4747
portEnvName: "DB_PORT" # Will set an env var named 'DB_PORT' to the database port
4848
hostEnvName: "DB_HOST" # Will set an env var named 'DB_HOST' to the proxy's host, 127.0.0.1
49+
privateIP: true # Optional - Will use the private IP instead of public IP
4950
---
5051
##
5152
# Put the database name, username, and password into a kubernetes secret
@@ -103,10 +104,6 @@ spec:
103104
- "-c"
104105
- "sleep 10 ; mysql --host=$DB_HOST --port=$DB_PORT --user=$DB_USER --password=$DB_PASS --database=$DB_NAME '--execute=select now() ; sleep 3600"
105106
env:
106-
- name: DB_HOST
107-
value: "set-by-operator"
108-
- name: DB_PORT
109-
value: "set-by-operator"
110107
- name: DB_USER
111108
valueFrom:
112109
secretKeyRef:

docs/examples/deployment-postgres-tcp.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ spec:
4646
- connectionString: "my-project:us-central1:instance" # from your Cloud SQL Database instance
4747
portEnvName: "DB_PORT" # Will set an env var named 'DB_PORT' to the database port
4848
hostEnvName: "DB_HOST" # Will set an env var named 'DB_HOST' to the proxy's host, 127.0.0.1
49+
privateIP: true # Optional - Will use the private IP instead of public IP
4950
---
5051
##
5152
# Put the database name, username, and password into a kubernetes secret
@@ -103,10 +104,6 @@ spec:
103104
- "-c"
104105
- "sleep 10 ; psql --host=$DB_HOST --port=$DB_PORT --username=$DB_USER '--command=select 1' --echo-queries --dbname=$DB_NAME ; sleep 3600"
105106
env:
106-
- name: DB_HOST
107-
value: "set-by-operator"
108-
- name: DB_PORT
109-
value: "set-by-operator"
110107
- name: DB_USER
111108
valueFrom:
112109
secretKeyRef:

docs/quick-start.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,6 @@ spec:
112112
env:
113113
- name: PORT
114114
value: "8080"
115-
- name: INSTANCE_HOST
116-
value: "set-by-proxy"
117-
- name: DB_PORT
118-
value: "set-by-proxy"
119115
- name: DB_USER
120116
valueFrom:
121117
secretKeyRef:

0 commit comments

Comments
 (0)