Skip to content

Commit

Permalink
fix: use global --port config.
Browse files Browse the repository at this point in the history
  • Loading branch information
hessjcg committed Sep 26, 2023
1 parent 805f20d commit 300063f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 6 additions & 3 deletions examples/k8s-health-check/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,19 @@ livenessProbe:
args:
# Replace <INSTANCE_CONNECTION_NAME> with the instance connection
# name in the format: "project_name:region:instance_name"
# Replace <DB_PORT> with the port that the proxy should open
# to listen for database connections from the application
- <INSTANCE_CONNECTION_NAME>?port=<DB_PORT>
- <INSTANCE_CONNECTION_NAME>

env:
# It can be easier to manage the k8s configuration file when you
# use environment variables instead of CLI flags. This is the
# recommended configuration. This configuration is enabled by default
# when the cloud-sql-proxy-operator configures a proxy image

# Replace <DB_PORT> with the port that the proxy should open
# to listen for database connections from the application
- name: CSQL_PROXY_PORT
value: <DB_PORT>

# Enable HTTP healthchecks on port 9801. This enables /liveness,
# /readiness and /startup health check endpoints. Allow connections
# listen for connections on any interface (0.0.0.0) so that the
Expand Down
7 changes: 6 additions & 1 deletion examples/k8s-health-check/proxy_with_http_health_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
# name in the format: "project_name:region:instance_name"
# Replace <DB_PORT> with the port that the proxy should open
# to listen for database connections from the application
- <INSTANCE_CONNECTION_NAME>?port=<DB_PORT>
- <INSTANCE_CONNECTION_NAME>

env:
# Using environment variables instead of CLI arguments to configure the
Expand All @@ -68,6 +68,11 @@ spec:
# It is used by the cloud-sql-proxy-operator when configuring the
# proxy container.

# Replace <DB_PORT> with the port that the proxy should open
# to listen for database connections from the application
- name: CSQL_PROXY_PORT
value: <DB_PORT>

# If connecting from a VPC-native GKE cluster, you can use the
# following flag to have the proxy connect over private IP
# - name: CSQL_PROXY_PRIVATE_IP
Expand Down

0 comments on commit 300063f

Please sign in to comment.