Posit Documentation Posit Documentation Posit Helm Charts
    • docs.posit.co
    • Posit Support
    • Overview
    • Posit Workbench
      • Overview
      • Changelog
      • Examples
    • Posit Connect
      • Overview
      • Changelog
      • Examples
    • Posit Package Manager
      • Overview
      • Changelog
      • Examples
    • Posit Chronicle
      • Overview
      • Changelog

    On this page

    • Configuring Posit Connect with Recommended Settings
    • Edit this page
    • Report an issue

    Configuring Posit Connect with Recommended Settings

    This example deploys Posit Connect with the recommended application configuration.

    These settings are recommend for most deployments and are described below:

    • Set replicas > 1 to deploy Connect load balanced across multiple pods
    • Set a default Posit Package Manager CRAN URL
    • Set a default Posit Package Manager PyPI URL
    • Enable Quarto content

    To use this example you will need:

    • a license file or key
    • a ReadWriteMany POSIX compliant storage class for sharedStorage
    • a PostgreSQL database.
    values.yaml
    
    replicas: 2 # TODO: Adjust the amount depending on your requirements
    
    # Using a license file with the helm chart:
    # https://github.com/rstudio/helm/tree/main/charts/rstudio-connect#license-file
    # If you would like to use a license key see this documentation:
    # https://github.com/rstudio/helm/tree/main/charts/rstudio-connect#license-key
    license:
      file:
        secret: posit-licenses # TODO: Change to the secret name in your cluster
        secretKey: connect.lic # TODO: Change to the secret key containing your Connect license
    
    # Configures Connect shared storage
    sharedStorage:
      create: true
      mount: true
      storageClassName: nfs-sc-rwx # TODO: Change to a RWX StorageClass available in your cluster
      # volumeName: connect-shared-pv-name # Only needed if PVs have been statically provisioned, in which case this will need to match the PV name.
      requests:
        storage: 100G
    
    extraObjects:
      # Required to set a custom PyPI repo
      - apiVersion: v1
        kind: ConfigMap
        metadata:
          name: pip-config-connect
        data:
          # TODO: if using Posit Package Manager, edit the below to match your package manager python repo URL
          pip.conf: |
            [global]
            timeout = 60
            index-url = https://packagemanager.posit.co/pypi/latest/simple
            trusted-host = packagemanager.posit.co
    
      # Required for authenticated R (not Python) repositories
      - apiVersion: v1
        kind: ConfigMap
        metadata:
          name: curlrc-config-connect
        data:
          .curlrc: |
            --netrc-file /etc/netrc
    
    launcher:
      enabled: true # Required for Off-Host Execution mode
      useTemplates: true # Required to set a custom R or Python repo
      templateValues:
        pod:
          volumes:
            # Required to set a custom Python repo
            - name: pip-config-volume
              configMap:
                name: pip-config-connect
    
            # Required for authenticated R and Python repositories
            # See the following documentation for more details:
            # https://packagemanager.posit.co/__docs__/admin/connect.html#authenticated-repositories
            # This secret must contain a netrc file with credentials to access your private repositories.
            # Here is an example of how to create this secret:
            # kubectl create secret generic connect-netrc --from-file=netrc=/path/to/your/netrc --namespace your-connect-namespace
            - name: netrc-config-volume
              secret:
                secretName: connect-netrc
    
            # Required for authenticated R (not Python) repositories
            - name: curlrc-config-volume
              configMap:
                name: curlrc-config-connect
    
          volumeMounts:
            # Required to set a custom Python repo
            - mountPath: /etc/pip.conf
              name: pip-config-volume
              subPath: pip.conf
    
            # Required for authenticated R and Python repositories
            - mountPath: /etc/netrc
              name: netrc-config-volume
              subPath: netrc
    
            # Required for authenticated R (not Python) repositories
            - mountPath: /etc/.curlrc
              name: curlrc-config-volume
              subPath: .curlrc
    
          env:
            # Required for authenticated R and Python repositories
            - name: NETRC
              value: /etc/netrc
    
            # Required for authenticated R (not Python) repositories
            - name: CURL_HOME
              value: /etc
    
    securityContext:
      privileged: false
    
    # The config section overwrites values in Posit Connect's main
    # .gcfg configuration file.
    config:
      # Configures the Postgres connection for Posit Connect.
      Database:
        Provider: "Postgres"
      Postgres:
        # The URL syntax below is to utilize a PostgreSQL database installed
        # in the cluster as described in the Kubernetes Cluster Preparation
        # page of this guide. Change this URL if your PostgreSQL database is
        # setup externally or in a different location.
        URL: "postgres://connect@postgres.example.com:5432/connect?sslmode=disable"
        Password: "<PASSWORD>" # TODO: Remove this line and instead set the password during helm install with --set config.Postgres.Password=<your-postgres-password>.
    
      "RPackageRepository \"CRAN\"":
        URL: https://packagemanager.posit.co/cran/__linux__/jammy/latest # TODO: If using Package Manager change to match your package manager R repo url
      # If using other R repos, add them here using the below format  
      # "RPackageRepository \"INTERNAL\"":
      #   URL: https://packagemanager.posit.co/cran/__linux__/jammy/latest
      Quarto:
        Enabled: true

    Copyright © 2024 Posit Software, PBC. All Rights Reserved.

    Posit Helm Charts

    • Edit this page
    • Report an issue
    • Link to main Posit site