1

The helm chart we are using for a particular microservice has the following dependency:

dependencies:
- name: mariadb
  version: 7.x.x.
  repository: "abc"
  condition: mariadb.enabled
  tags:
    - database

When we login to the microservice pod, the timezone shown is local as configured in the deployment. However, when we log into the mariadb pod, the timezone is in UTC.

Could someone help me understand how to set local timezone instead of UTC in mariadb?

hoque
  • 5,735
  • 1
  • 19
  • 29

1 Answers1

0

To change MardiaDB timezone you need to edit /etc/my.cnf.d/server.conf

# this is read by the standalone daemon and embedded servers
[server]
default-time-zone=-06:00

The value is a string and you would need to figure out for your timezone to do so look up here.

As for helm and mariaDB chart, I was unable to find any timezone parameters you can set while deploying the chart.

So you would need to download the value.yaml from https://github.com/helm/charts/tree/master/stable/mariadb

Edit the value.yaml file and add:

extraEnvVars:
   - name: TZ
     value: "UTC"

or any other TZ you like Europe/Paris. Once done you can use the value.yaml in a following way:

$ helm install --name my-release stable/mariadb -f values.yaml

You can also read how to set value in dependency of helm chart.

Crou
  • 10,232
  • 2
  • 26
  • 31