diff --git a/components/tyk-gateway/templates/deployment-gw-repset.yaml b/components/tyk-gateway/templates/deployment-gw-repset.yaml index 5095810a..a85b12b3 100644 --- a/components/tyk-gateway/templates/deployment-gw-repset.yaml +++ b/components/tyk-gateway/templates/deployment-gw-repset.yaml @@ -151,8 +151,17 @@ spec: {{- else}} value: "file" {{- end}} + + # Set this environment variable only if either analyticsEnabled or global.components.pump is set + {{ if or .Values.gateway.analyticsEnabled ((.Values.global.components).pump) }} - name: TYK_GW_ENABLEANALYTICS - value: "{{.Values.gateway.analyticsEnabled}}" + {{- if .Values.gateway.analyticsEnabled }} + value: "{{ .Values.gateway.analyticsEnabled }}" + {{- else }} + value: "{{ .Values.global.components.pump }}" + {{- end}} + {{- end}} + - name: TYK_GW_ANALYTICSCONFIG_TYPE value: "{{.Values.gateway.analyticsConfigType}}" {{- if .Values.global.remoteControlPlane.enabled }} diff --git a/components/tyk-gateway/values.yaml b/components/tyk-gateway/values.yaml index db3e976d..32d362c2 100644 --- a/components/tyk-gateway/values.yaml +++ b/components/tyk-gateway/values.yaml @@ -275,8 +275,9 @@ gateway: ## readOnly: true extraVolumeMounts: [] - # analyticsEnabled property is used to enable or disable analytics. - analyticsEnabled: "false" + # analyticsEnabled property is used to enable/disable analytics. + # If set to empty or nil, analytics will be enabled/disabled based on `global.components.pump`. + analyticsEnabled: "" # used to decide whether to send the results back directly to Tyk without a hybrid pump # if you want to send analytics to control plane instead of pump, change analyticsConfigType to "rpc" diff --git a/tyk-mdcb-data-plane/values.yaml b/tyk-mdcb-data-plane/values.yaml index ee7d6edf..a739600a 100644 --- a/tyk-mdcb-data-plane/values.yaml +++ b/tyk-mdcb-data-plane/values.yaml @@ -269,8 +269,9 @@ tyk-gateway: enabled: false tags: "" - # analyticsEnabled property is used to enable or disable analytics. - analyticsEnabled: "true" + # analyticsEnabled property is used to enable/disable analytics. + # If set to empty or nil, analytics will be enabled/disabled based on `global.components.pump`. + analyticsEnabled: "" # used to decide whether to send the results back directly to Tyk without a hybrid pump # if you want to send analytics to control plane instead of pump, change value to "rpc" diff --git a/tyk-oss/values.yaml b/tyk-oss/values.yaml index ac30da8e..76d70a9c 100644 --- a/tyk-oss/values.yaml +++ b/tyk-oss/values.yaml @@ -230,8 +230,9 @@ tyk-gateway: # affinity for gateway pod assignment affinity: {} - # analyticsEnabled property is used to enable or disable analytics. - analyticsEnabled: "false" + # analyticsEnabled property is used to enable/disable analytics. + # If set to empty or nil, analytics will be enabled/disabled based on `global.components.pump`. + analyticsEnabled: "" # extraEnvs is used to set gateway env variables # - name: TYK_GW_HTTPSERVEROPTIONS_SSLINSECURESKIPVERIFY diff --git a/tyk-single-dc/values.yaml b/tyk-single-dc/values.yaml index b666f4ab..f1e99665 100644 --- a/tyk-single-dc/values.yaml +++ b/tyk-single-dc/values.yaml @@ -222,8 +222,9 @@ tyk-gateway: # replicaCount specifies number of replicas to be created if kind is Deployment. replicaCount: 1 - # analyticsEnabled property is used to enable or disable analytics. - analyticsEnabled: "true" + # analyticsEnabled property is used to enable/disable analytics. + # If set to empty or nil, analytics will be enabled/disabled based on `global.components.pump`. + analyticsEnabled: "" image: # image repository for Tyk Gateway