IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    Timezone in pods of Argo

    RobinDong发表于 2023-10-13 01:00:20
    love 0

    Last week I noticed that the pod in Argo would give a UTC timezone even though the Argo configuration has set a AEDT timezone.

    apiVersion: argoproj.io/v1alpha1
    kind: CronWorkflow
    metadata:
      name: my-cron-workflow
      namespace: MYNAMESPACE
    spec:
      schedule: "0 10 * * *"
      timezone: "Australia/Sydney"

    Actually, this timezone in configuration is only used to give the time this scheduled job would run at, not the timezone in every pod.

    To set up a unified timezone for all the pods, we need to use volume.

    apiVersion: v1
    kind: Pod
    metadata:
      name: busybox-sleep
    spec:
      containers:
      - name: busybox
        image: busybox
        args:
        - sleep
        - "1000000"
        volumeMounts:
        - name: tz-config
          mountPath: /etc/localtime
      volumes:
        - name: tz-config
          hostPath:
            path: /usr/share/zoneinfo/Australia/Sydney
            type: File


沪ICP备19023445号-2号
友情链接