Skip to content

[charts/metabase] Add possibility to extend the cloud proxy command arguments #186

Description

@redpanda

Hi there 👋

Description

Currently, the metabase chart does not expose configuration options to customize the Cloud SQL proxy container's command arguments.

Use Case

We would like to add this flag:ip_address_types=PRIVATE to use the database private IP.

Proposed Solution

  1. Add a values configuration option (e.g., googleCloudSQL.sidecarCommandArgsExtra) to extend the proxy command arguments.
  2. Define the value database.googleCloudSQL.ipAddressTypes set to ""

Implementation 1

values.yaml

database:
  googleCloudSQL:
    sidecarCommandArgsExtra:
      - "-ip_address_types=PRIVATE"

deployment.yaml

- name: cloudsql-proxy
  #...
  command:
    - "/cloud_sql_proxy"
    - "-instances={{ join "," .Values.database.googleCloudSQL.instanceConnectionNames }}"
    - "-term_timeout=10s"
    - "-structured_logs"
    - "-use_http_health_check"
    - "-enable_iam_login"
    {{ toYaml .Values.googleCloudSQL.sidecarCommandArgsExtra | nindent 4 }}

Implementation 2

values.yaml

database:
  googleCloudSQL:
    ipAddressTypes: ""

deployment.yaml

- name: cloudsql-proxy
  #...
  command:
    - "/cloud_sql_proxy"
    - "-instances={{ join "," .Values.database.googleCloudSQL.instanceConnectionNames }}"
    - "-term_timeout=10s"
    - "-structured_logs"
    - "-use_http_health_check"
    - "-enable_iam_login"
    {{- if .Values.database.googleCloudSQL.ipAddressTypes }}
    - "-ip_address_types={{ .Values.database.googleCloudSQL.ipAddressTypes }}"
    {{- end }}

I suggest doing implementation 2. I can do it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions