Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b5b828a

Browse filesBrowse files
chore(cloud-sql): update GKE sample comments (GoogleCloudPlatform#10451)
1 parent 38af4e5 commit b5b828a
Copy full SHA for b5b828a

File tree

Expand file treeCollapse file tree

3 files changed

+39
-3
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+39
-3
lines changed

‎cloud-sql/mysql/sqlalchemy/deployment.yaml

Copy file name to clipboardExpand all lines: cloud-sql/mysql/sqlalchemy/deployment.yaml
+17-2Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,19 @@ spec:
3838
env:
3939
- name: PORT
4040
value: "8080"
41+
# This project uses environment variables to determine
42+
# how you would like to run your application
43+
# To use the Python Connector (recommended) - use INSTANCE_CONNECTION_NAME (proj:region:instance)
44+
# To use TCP - Setting INSTANCE_HOST will use TCP (e.g., 127.0.0.1)
45+
# To use Unix, use INSTANCE_UNIX_SOCKET (e.g., /cloudsql/proj:region:instance)
4146
- name: INSTANCE_HOST
4247
value: "127.0.0.1"
4348
- name: DB_PORT
44-
value: "3306"
49+
value: "3306"
50+
# For Automatic IAM Authentication with the Python Connector
51+
# use DB_IAM_USER instead of DB_USER (recommended)
52+
# You may also remove the DB_PASS environment variable if
53+
# you use Automatic IAM Authentication
4554
- name: DB_USER
4655
valueFrom:
4756
secretKeyRef:
@@ -57,8 +66,10 @@ spec:
5766
secretKeyRef:
5867
name: <YOUR-DB-SECRET>
5968
key: database
69+
# If you are using the Python Connector (recommended), you can
70+
# remove cloud-sql-proxy (everything below this line)
6071
- name: cloud-sql-proxy
61-
# This uses the latest version of the Cloud SQL proxy
72+
# This uses the latest version of the Cloud SQL Proxy
6273
# It is recommended to use a specific version for production environments.
6374
# See: https://github.com/GoogleCloudPlatform/cloudsql-proxy
6475
image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:latest
@@ -67,6 +78,10 @@ spec:
6778
# following flag to have the proxy connect over private IP
6879
# - "--private-ip"
6980

81+
# If you are not connecting with Automatic IAM, you can delete
82+
# the following flag.
83+
- "--auto-iam-authn"
84+
7085
# tcp should be set to the port the proxy should listen on
7186
# and should match the DB_PORT value set above.
7287
# Defaults: MySQL: 3306, Postgres: 5432, SQLServer: 1433

‎cloud-sql/postgres/sqlalchemy/deployment.yaml

Copy file name to clipboardExpand all lines: cloud-sql/postgres/sqlalchemy/deployment.yaml
+16-1Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,19 @@ spec:
3838
env:
3939
- name: PORT
4040
value: "8080"
41+
# This project uses environment variables to determine
42+
# how you would like to run your application
43+
# To use the Python Connector (recommended) - use INSTANCE_CONNECTION_NAME (proj:region:instance)
44+
# To use TCP - Setting INSTANCE_HOST will use TCP (e.g., 127.0.0.1)
45+
# To use Unix, use INSTANCE_UNIX_SOCKET (e.g., /cloudsql/proj:region:instance)
4146
- name: INSTANCE_HOST
4247
value: "127.0.0.1"
4348
- name: DB_PORT
44-
value: "5432"
49+
value: "5432"
50+
# For Automatic IAM Authentication with the Python Connector
51+
# use DB_IAM_USER instead of DB_USER (recommended)
52+
# You may also remove the DB_PASS environment variable if
53+
# you use Automatic IAM Authentication
4554
- name: DB_USER
4655
valueFrom:
4756
secretKeyRef:
@@ -57,6 +66,8 @@ spec:
5766
secretKeyRef:
5867
name: <YOUR-DB-SECRET>
5968
key: database
69+
# If you are using the Python Connector (recommended), you can
70+
# remove cloud-sql-proxy (everything below this line)
6071
- name: cloud-sql-proxy
6172
# This uses the latest version of the Cloud SQL proxy
6273
# It is recommended to use a specific version for production environments.
@@ -67,6 +78,10 @@ spec:
6778
# following flag to have the proxy connect over private IP
6879
# - "--private-ip"
6980

81+
# If you are not connecting with Automatic IAM, you can delete
82+
# the following flag.
83+
- "--auto-iam-authn"
84+
7085
# tcp should be set to the port the proxy should listen on
7186
# and should match the DB_PORT value set above.
7287
# Defaults: MySQL: 3306, Postgres: 5432, SQLServer: 1433

‎cloud-sql/sql-server/sqlalchemy/deployment.yaml

Copy file name to clipboardExpand all lines: cloud-sql/sql-server/sqlalchemy/deployment.yaml
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ spec:
3838
env:
3939
- name: PORT
4040
value: "8080"
41+
# This project uses environment variables to determine
42+
# how you would like to run your application
43+
# To use the Python connector (recommended) - use INSTANCE_CONNECTION_NAME (proj:region:instance)
44+
# To use TCP - Setting INSTANCE_HOST will use TCP (e.g., 127.0.0.1)
4145
- name: INSTANCE_HOST
4246
value: "127.0.0.1"
4347
- name: DB_PORT
@@ -61,6 +65,8 @@ spec:
6165
secretKeyRef:
6266
name: <YOUR-DB-SECRET>
6367
key: database
68+
# If you are using the Python Connector (recommended), you can
69+
# remove cloud-sql-proxy (everything below this line)
6470
- name: cloud-sql-proxy
6571
# This uses the latest version of the Cloud SQL proxy
6672
# It is recommended to use a specific version for production environments.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.