[go: up one dir, main page]

Skip to content

Commit

Permalink
chore(cloud-sql): update GKE sample comments (#10451)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwotherspoon committed Aug 8, 2023
1 parent 38af4e5 commit b5b828a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
19 changes: 17 additions & 2 deletions cloud-sql/mysql/sqlalchemy/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,19 @@ spec:
env:
- name: PORT
value: "8080"
# This project uses environment variables to determine
# how you would like to run your application
# To use the Python Connector (recommended) - use INSTANCE_CONNECTION_NAME (proj:region:instance)
# To use TCP - Setting INSTANCE_HOST will use TCP (e.g., 127.0.0.1)
# To use Unix, use INSTANCE_UNIX_SOCKET (e.g., /cloudsql/proj:region:instance)
- name: INSTANCE_HOST
value: "127.0.0.1"
- name: DB_PORT
value: "3306"
value: "3306"
# For Automatic IAM Authentication with the Python Connector
# use DB_IAM_USER instead of DB_USER (recommended)
# You may also remove the DB_PASS environment variable if
# you use Automatic IAM Authentication
- name: DB_USER
valueFrom:
secretKeyRef:
Expand All @@ -57,8 +66,10 @@ spec:
secretKeyRef:
name: <YOUR-DB-SECRET>
key: database
# If you are using the Python Connector (recommended), you can
# remove cloud-sql-proxy (everything below this line)
- name: cloud-sql-proxy
# This uses the latest version of the Cloud SQL proxy
# This uses the latest version of the Cloud SQL Proxy
# It is recommended to use a specific version for production environments.
# See: https://github.com/GoogleCloudPlatform/cloudsql-proxy
image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:latest
Expand All @@ -67,6 +78,10 @@ spec:
# following flag to have the proxy connect over private IP
# - "--private-ip"

# If you are not connecting with Automatic IAM, you can delete
# the following flag.
- "--auto-iam-authn"

# tcp should be set to the port the proxy should listen on
# and should match the DB_PORT value set above.
# Defaults: MySQL: 3306, Postgres: 5432, SQLServer: 1433
Expand Down
17 changes: 16 additions & 1 deletion cloud-sql/postgres/sqlalchemy/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,19 @@ spec:
env:
- name: PORT
value: "8080"
# This project uses environment variables to determine
# how you would like to run your application
# To use the Python Connector (recommended) - use INSTANCE_CONNECTION_NAME (proj:region:instance)
# To use TCP - Setting INSTANCE_HOST will use TCP (e.g., 127.0.0.1)
# To use Unix, use INSTANCE_UNIX_SOCKET (e.g., /cloudsql/proj:region:instance)
- name: INSTANCE_HOST
value: "127.0.0.1"
- name: DB_PORT
value: "5432"
value: "5432"
# For Automatic IAM Authentication with the Python Connector
# use DB_IAM_USER instead of DB_USER (recommended)
# You may also remove the DB_PASS environment variable if
# you use Automatic IAM Authentication
- name: DB_USER
valueFrom:
secretKeyRef:
Expand All @@ -57,6 +66,8 @@ spec:
secretKeyRef:
name: <YOUR-DB-SECRET>
key: database
# If you are using the Python Connector (recommended), you can
# remove cloud-sql-proxy (everything below this line)
- name: cloud-sql-proxy
# This uses the latest version of the Cloud SQL proxy
# It is recommended to use a specific version for production environments.
Expand All @@ -67,6 +78,10 @@ spec:
# following flag to have the proxy connect over private IP
# - "--private-ip"

# If you are not connecting with Automatic IAM, you can delete
# the following flag.
- "--auto-iam-authn"

# tcp should be set to the port the proxy should listen on
# and should match the DB_PORT value set above.
# Defaults: MySQL: 3306, Postgres: 5432, SQLServer: 1433
Expand Down
6 changes: 6 additions & 0 deletions cloud-sql/sql-server/sqlalchemy/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ spec:
env:
- name: PORT
value: "8080"
# This project uses environment variables to determine
# how you would like to run your application
# To use the Python connector (recommended) - use INSTANCE_CONNECTION_NAME (proj:region:instance)
# To use TCP - Setting INSTANCE_HOST will use TCP (e.g., 127.0.0.1)
- name: INSTANCE_HOST
value: "127.0.0.1"
- name: DB_PORT
Expand All @@ -61,6 +65,8 @@ spec:
secretKeyRef:
name: <YOUR-DB-SECRET>
key: database
# If you are using the Python Connector (recommended), you can
# remove cloud-sql-proxy (everything below this line)
- name: cloud-sql-proxy
# This uses the latest version of the Cloud SQL proxy
# It is recommended to use a specific version for production environments.
Expand Down

0 comments on commit b5b828a

Please sign in to comment.