@@ -26,69 +26,72 @@ spec:
2626 app : <YOUR-APPLICATION-NAME>
2727 spec :
2828 containers :
29- - name : <YOUR-APPLICATION-NAME>
30- # ... other container configuration
31- env :
32- - name : DB_USER
33- valueFrom :
34- secretKeyRef :
35- name : <YOUR-DB-SECRET>
36- key : username
37- - name : DB_PASS
38- valueFrom :
39- secretKeyRef :
40- name : <YOUR-DB-SECRET>
41- key : password
42- - name : DB_NAME
43- valueFrom :
44- secretKeyRef :
45- name : <YOUR-DB-SECRET>
46- key : database
47- - name : cloud-sql-proxy
48- # It is recommended to use the latest version of the Cloud SQL Auth Proxy
49- # Make sure to update on a regular schedule!
50- image : gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.11.4
51- args :
52- # If connecting from a VPC-native GKE cluster, you can use the
53- # following flag to have the proxy connect over private IP
54- # - "--private-ip"
29+ - name : <YOUR-APPLICATION-NAME>
30+ # ... other container configuration
31+ env :
32+ - name : DB_USER
33+ valueFrom :
34+ secretKeyRef :
35+ name : <YOUR-DB-SECRET>
36+ key : username
37+ - name : DB_PASS
38+ valueFrom :
39+ secretKeyRef :
40+ name : <YOUR-DB-SECRET>
41+ key : password
42+ - name : DB_NAME
43+ valueFrom :
44+ secretKeyRef :
45+ name : <YOUR-DB-SECRET>
46+ key : database
47+ - name : cloud-sql-proxy
48+ # It is recommended to use the latest version of the Cloud SQL Auth Proxy
49+ # Make sure to update on a regular schedule!
50+ image : gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.14.1
51+ args :
52+ # If connecting from a VPC-native GKE cluster, you can use the
53+ # following flag to have the proxy connect over private IP
54+ # - "--private-ip"
5555
56- # Enable structured logging with LogEntry format:
57- - " --structured-logs"
56+ # If you are not connecting with Automatic IAM AuthN, you can delete
57+ # the following flag.
58+ - " --auto-iam-authn"
5859
60+ # Enable structured logging with LogEntry format:
61+ - " --structured-logs"
5962
60- # Replace DB_PORT with the port the proxy should listen on
61- - " --port=<DB_PORT>"
62- - " <INSTANCE_CONNECTION_NAME>"
63+ # Replace DB_PORT with the port the proxy should listen on
64+ - " --port=<DB_PORT>"
65+ - " <INSTANCE_CONNECTION_NAME>"
6366
64- # [START cloud_sql_proxy_k8s_volume_mount]
65- # This flag specifies where the service account key can be found
66- - " --credentials-file=/secrets/service_account.json"
67- securityContext :
68- # The default Cloud SQL Auth Proxy image runs as the
69- # "nonroot" user and group (uid: 65532) by default.
70- runAsNonRoot : true
71- volumeMounts :
72- - name : <YOUR-SA-SECRET-VOLUME>
73- mountPath : /secrets/
74- readOnly : true
75- # [END cloud_sql_proxy_k8s_volume_mount]
76- # Resource configuration depends on an application's requirements. You
77- # should adjust the following values based on what your application
78- # needs. For details, see https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
79- resources :
80- requests :
81- # The proxy's memory use scales linearly with the number of active
82- # connections. Fewer open connections will use less memory. Adjust
83- # this value based on your application's requirements.
84- memory : " 2Gi"
85- # The proxy's CPU use scales linearly with the amount of IO between
86- # the database and the application. Adjust this value based on your
87- # application's requirements.
88- cpu : " 1"
67+ # [START cloud_sql_proxy_k8s_volume_mount]
68+ # This flag specifies where the service account key can be found
69+ - " --credentials-file=/secrets/service_account.json"
70+ securityContext :
71+ # The default Cloud SQL Auth Proxy image runs as the
72+ # "nonroot" user and group (uid: 65532) by default.
73+ runAsNonRoot : true
74+ volumeMounts :
75+ - name : <YOUR-SA-SECRET-VOLUME>
76+ mountPath : /secrets/
77+ readOnly : true
78+ # [END cloud_sql_proxy_k8s_volume_mount]
79+ # Resource configuration depends on an application's requirements. You
80+ # should adjust the following values based on what your application
81+ # needs. For details, see https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
82+ resources :
83+ requests :
84+ # The proxy's memory use scales linearly with the number of active
85+ # connections. Fewer open connections will use less memory. Adjust
86+ # this value based on your application's requirements.
87+ memory : " 2Gi"
88+ # The proxy's CPU use scales linearly with the amount of IO between
89+ # the database and the application. Adjust this value based on your
90+ # application's requirements.
91+ cpu : " 1"
8992 # [START cloud_sql_proxy_k8s_volume_secret]
9093 volumes :
91- - name : <YOUR-SA-SECRET-VOLUME>
92- secret :
93- secretName : <YOUR-SA-SECRET>
94+ - name : <YOUR-SA-SECRET-VOLUME>
95+ secret :
96+ secretName : <YOUR-SA-SECRET>
9497 # [END cloud_sql_proxy_k8s_volume_secret]
0 commit comments