Skip to content

Unable to set chronicleAgent.env in Helm chart to enable IncludeEventMetrics #810

@rmccombie

Description

@rmccombie

Description

Helm Chart: rstudio-connect v0.8.32

Issue
The Helm chart exposes a configuration field: chronicleAgent.env

However, when attempting to use this field, the chart renders invalid YAML, causing Helm templating to fail.

Steps to Reproduce

  1. Add the following configuration to values.yaml:
chronicleAgent:
enabled: true
env:
- name: CHRONICLE_CONNECT_INCLUDEEVENTMETRICS
  value: "true"

  1. Render the chart:
helm template debug rstudio/rstudio-connect \
--version 0.8.32 \
-f values-test.yaml \
--show-only templates/deployment.yaml

Helm returns the following error:

Error: YAML parse error on rstudio-connect/templates/deployment.yaml:
error converting YAML to JSON: yaml: line 43: did not find expected key

Impact
The chronicleAgent.env field is documented in the chart values (env: []) and appears to be the intended mechanism for adding environment variables to the Chronicle agent container.

However, due to the YAML rendering failure, it is currently not possible to enable CHRONICLE_CONNECT_INCLUDEEVENTMETRICS, which prevents collection of the connect_content_visits dataset.

Workaround

  1. Run:
    helm pull rstudio/rstudio-connect --version 0.8.32 --untar
  2. In charts/rstudio-connect/templates/deployment.yaml, look for the following:
{{- with .Values.chronicleAgent.env }}
{{ toYaml . | indent 10 }}
{{- end }}

Change to:

{{- with .Values.chronicleAgent.env }}
{{- toYaml . | nindent 10 }}
{{- end }}
  1. Deploy from the local patched chart directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    team: connectPosit Connect related issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions