Description
The Mongo Aggregate Pump's collection name is hardcoded as a literal string in components/tyk-pump/templates/deployment-pmp.yaml and exposes no values key to override it. Chart users who need to change where rollups are written must work around this with pump.extraEnvs, which produces a duplicate env entry in the rendered Pod spec.
Affected
components/tyk-pump/templates/deployment-pmp.yaml (~line 246):
- name: TYK_PMP_PUMPS_MONGOAGGREGATE_META_COLLECTIONNAME
value: "tyk_analytics_pump"
The neighbouring mongoGraphPump.collectionName (values.yaml ~line 344) and sqlGraphPump.tableName follow the configurable pattern. The aggregate pump should match.
Steps to reproduce
helm install tyk-pump tyk-helm/tyk-pump --set 'pump.backend={mongo,prometheus}'
- Try to point the aggregate pump at a different collection via values.
- Observe: no values key exists. The only workaround is
pump.extraEnvs, which produces a duplicate env entry. The rendered Pod has both the chart's hardcoded tyk_analytics_pump and the user's override.
kubectl get deploy <pump> -o jsonpath='{range .spec.template.spec.containers[0].env[?(@.name=="TYK_PMP_PUMPS_MONGOAGGREGATE_META_COLLECTIONNAME")]}{.name}={.value}{"\n"}{end}'
# TYK_PMP_PUMPS_MONGOAGGREGATE_META_COLLECTIONNAME=tyk_analytics_pump
# TYK_PMP_PUMPS_MONGOAGGREGATE_META_COLLECTIONNAME=tyk_analytics_aggregates
Effective value is the last-wins entry, but duplicate env keys are fragile (ServerSideApply rejects them; strategic-merge re-orders are undefined).
Expected
A values key — for example pump.mongoAggregatePump.collectionName — that lets operators override the aggregate collection without resorting to extraEnvs. Default value preserved so the change is non-breaking.
Proposed fix (additive, no behavior change)
- Add
pump.mongoAggregatePump.collectionName: "" to components/tyk-pump/values.yaml (alongside the existing mongoGraphPump stanza).
- Template the value in
deployment-pmp.yaml:
- name: TYK_PMP_PUMPS_MONGOAGGREGATE_META_COLLECTIONNAME
value: "{{ default "tyk_analytics_pump" .Values.pump.mongoAggregatePump.collectionName }}"
- README updated for the new value.
Happy to send the PR.
Description
The Mongo Aggregate Pump's collection name is hardcoded as a literal string in
components/tyk-pump/templates/deployment-pmp.yamland exposes no values key to override it. Chart users who need to change where rollups are written must work around this withpump.extraEnvs, which produces a duplicate env entry in the rendered Pod spec.Affected
components/tyk-pump/templates/deployment-pmp.yaml(~line 246):The neighbouring
mongoGraphPump.collectionName(values.yaml ~line 344) andsqlGraphPump.tableNamefollow the configurable pattern. The aggregate pump should match.Steps to reproduce
helm install tyk-pump tyk-helm/tyk-pump --set 'pump.backend={mongo,prometheus}'pump.extraEnvs, which produces a duplicate env entry. The rendered Pod has both the chart's hardcodedtyk_analytics_pumpand the user's override.Effective value is the last-wins entry, but duplicate env keys are fragile (ServerSideApply rejects them; strategic-merge re-orders are undefined).
Expected
A values key — for example
pump.mongoAggregatePump.collectionName— that lets operators override the aggregate collection without resorting toextraEnvs. Default value preserved so the change is non-breaking.Proposed fix (additive, no behavior change)
pump.mongoAggregatePump.collectionName: ""tocomponents/tyk-pump/values.yaml(alongside the existingmongoGraphPumpstanza).deployment-pmp.yaml:Happy to send the PR.