Skip to content
Permalink
Browse files
feat(apisix): add timezone and extraEnvVars (#232)
  • Loading branch information
Gallardot committed Mar 28, 2022
1 parent 4f698a3 commit 6330350e71d2642ac932bde1be06fe46180454bb
Showing 3 changed files with 29 additions and 0 deletions.
@@ -76,6 +76,8 @@ The following tables lists the configurable parameters of the apisix chart and t
| `apisix.luaModuleHook.configMapRef.name` | Name of the ConfigMap where the lua module codes store | "" |
| `apisix.luaModuleHook.configMapRef.mounts[].key` | Name of the ConfigMap key, for setting the mapping relationship between ConfigMap key and the lua module code path. | `""` |
| `apisix.luaModuleHook.configMapRef.mounts[].path` | Filepath of the plugin code, for setting the mapping relationship between ConfigMap key and the lua module code path. | `""` |
| `apisix.timezone` | The timezone where APISIX container uses. For example: UTC, Asia/Shanghai. This value will be set on apisix container's environment variable TZ. Sometimes may need to set the timezone to be consistent with local time zone, otherwise the apisix's logs may used to retrieve event maybe in wrong timezone. | `""` |
| `apisix.extraEnvVars` | APISIX container extra environment variables , See [define-environment-variable-container](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/) for the detail. | `[]`
| `extraVolumes` | Additional `volume`, See [Kubernetes Volumes](https://kubernetes.io/docs/concepts/storage/volumes/) for the detail. | `[]` |
| `extraVolumeMounts` | Additional `volumeMounts`, See [Kubernetes Volumes](https://kubernetes.io/docs/concepts/storage/volumes/) for the detail. | `[]` |

@@ -51,6 +51,14 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.apisix.image.repository }}:{{ .Values.apisix.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.apisix.image.pullPolicy }}
env:
{{- if .Values.apisix.timezone }}
- name: TZ
value: {{ .Values.apisix.timezone }}
{{- end }}
{{- if .Values.apisix.extraEnvVars }}
{{- include "apisix.tplvalues.render" (dict "value" .Values.apisix.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.gateway.http.containerPort }}
@@ -96,6 +96,25 @@ apisix:
podAntiAffinity:
enabled: false

# timezone is the timezone where apisix uses.
# For example: "UTC" or "Asia/Shanghai"
# This value will be set on apisix container's environment variable TZ.
# You may need to set the timezone to be consistent with your local time zone,
# otherwise the apisix's logs may used to retrieve event maybe in wrong timezone.
timezone: ""

# extraEnvVars An array to add extra env vars
# e.g:
# extraEnvVars:
# - name: FOO
# value: "bar"
# - name: FOO2
# valueFrom:
# secretKeyRef:
# name: SECRET_NAME
# key: KEY
extraEnvVars: []

nameOverride: ""
fullnameOverride: ""

0 comments on commit 6330350

Please sign in to comment.