Posit Connect Server Configuration

All values under the config key are merged to create the final rstudio-connect.gcfg configuration file that is used by Posit Connect. The keys and values are included as-is in the final config. For example, if your values.yaml contains:

config:
  Abc:
    xyz: "This is a config value"
  MultiExample:
    Color:
      - "black"
      - "blue"
  'NamedSection "Alpha"':
    Url: http://example.org
  'Section With Spaces':
    Enabled: "Always true"

Then your resulting rstudio-connect.gcfg will include:

[Abc]
xyz = "This is a config value"

[MultiExample]
Color = "black"
Color = "blue"

[Named Section "Alpha"]
Url = http://example.org

[Section With Spaces]
Enabled = "Always true"

Dealing with Special Characters

String values which contain special characters can require further attention. For example, values containing ; or # can be interpreted as comments in your resulting rstudio-connect.gcfg configuration. This is most likely to affect chart values nested under config.*, but the problem is not exclusive to these values.

Here are some examples of special cases:

Note

Each of these examples wraps the value in single-quotes in order to preserve the double-quotes in the final configuration

config:
  SpecialCharacters:
    Property1: '"simple"'
    Property2: '"a string with spaces"'
    Property3: '"escape \"quotes\" in a string like this"'
    Property4: '"A string containing # and ;"'

The your resulting rstudio-connect.gcfg will include:

[SpecialCharacters]
Property1 = "simple"
Property2 = "a string with spaces"
Property3 = "escape \"quotes\" in a string like this"
Property4 = "A string containing # and ;"

Installing an Alternate Version of Posit Connect

By default, the Helm chart’s appVersion specifies the version of Posit Connect that is used for your installation.

This value can be modified by setting the following in your values.yaml:

versionOverride: "connect-version-override"

Setting Resource Requirements for Connect

The minimum recommended system requirements when running Posit Connect in production can be specified using the resources.requests configuration key of the Helm chart. To specify a maximum resource limit, use the resources.limits configuration instead.

Note

The configurations below apply only to the Posit Connect server container. Connect supports resource requests/limits on a per-content basis. See the section on Runtime/Scheduler configuration for more information.

Note

Pods that exceed the resource allocations defined by resources.limits can be evicted by Kubernetes.

resources:
  requests:
    enabled: true
    memory: "8G"
    cpu: "4"

Setting a Default Service Account for Content

Users can configure the Kubernetes service account used by content jobs globally via the helm chart. Please note that this service account is used by all content launched by Posit Connect.

To apply this configuration, modify the values.yaml to contain values like the following:

launcher:
  templateValues:
    pod:
      serviceAccountName: "global-service-account"

This is used to populate Connect’s Launcher.KubernetesDefaultServiceAccount configuration option, which sets the global default service account used by content pods.

Using the above configuration, content pods execute with the following specification:

spec:
  serviceAccountName: global-service-account