rstudio / rstudio/helm

Connect: allow specifying resources in templates

Open
#306 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

team: connect
Dominant language
Markdown
Stars
46
Forks
40
Avg merge
4h 3m
Merged PRs (30d)
6

Description

Motivation: AKS has some azure-policies in place which deny spawning pods without a resource definition. This applies to the packrat-restore pods and eventually denies app deployment.

values.yml:

  templateValues:
    service:
      type: ClusterIP
      annotations: {}
      labels: {}
    pod:
      annotations: {}
      labels: {}
      serviceAccountName: ""
      volumes: []
      volumeMounts: []
      imagePullPolicy: ""
      imagePullSecrets: []
      initContainers: []
      extraContainers: []
      resources: {} # <---- NEW

As a workaround I am currently trying with

launcher:
  enabled: true
  useTemplates: false
  launcherKubernetesProfilesConf:
    "*":
      job-json-overrides:
        - name: resources
          target: /spec/template/spec/containers/resources
          json:
            requests:
              cpu: "100m"
              memory: "200Mi"
              ephemeral-storage: "200Mi"
            limits:
              cpu: "1000m"
              memory: "1Gi"
              ephemeral-storage: "2Gi"

but this specification results in a 500 from the launcher.

EDIT:

I see the values are just passed along as is and are not limited by the values.yml specification.

So the following

launcher:
  enabled: true
  useTemplates: false
  templateValues:
    pod:
      resources:

works!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with values.yml and the templateValues.pod configuration, then trace how those values are passed into the launcher templates. Verify with a rendered deployment that resource requests and limits reach the packrat-restore and other generated pods, and check whether existing chart validation or documentation reflects the supported setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, helm, kubernetes
Domain
cloud, devops, infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.