Skip to content

Commit

Permalink
Add/fargate-option (#14)
Browse files Browse the repository at this point in the history
* EKSS fargate resource optimizations

* values lint cleanup

---------

Co-authored-by: stewartshea <>
  • Loading branch information
stewartshea authored Apr 25, 2024
1 parent e17c32c commit eddfe9e
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 10 deletions.
4 changes: 2 additions & 2 deletions charts/runwhen-local/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: runwhen-local
description: A Helm chart RunWhen Local - A community powered troubleshooting cheat sheet
type: application
version: 0.1.4
appVersion: "0.5.8"
version: 0.1.5
appVersion: "0.5.10"
icon: https://storage.googleapis.com/runwhen-nonprod-shared-images/icons/runwhen_icon.png
dependencies:
- name: grafana-agent
Expand Down
2 changes: 2 additions & 0 deletions charts/runwhen-local/templates/local-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ data:
defaultLocation: {{ .Values.runwhenLocal.workspaceInfo.configMap.data.defaultLocation | default "none" }}
workspaceOwnerEmail: {{ .Values.runwhenLocal.workspaceInfo.configMap.data.workspaceOwnerEmail | default "[email protected]" }}
defaultLOD: {{ .Values.runwhenLocal.workspaceInfo.configMap.data.defaultLOD | default "detailed" }}
codeCollections:
{{- toYaml .Values.runwhenLocal.workspaceInfo.configMap.data.codeCollections | nindent 6 }}
cloudConfig:
{{- toYaml .Values.runwhenLocal.workspaceInfo.configMap.data.cloudConfig | nindent 6 }}
custom:
Expand Down
6 changes: 5 additions & 1 deletion charts/runwhen-local/templates/local-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ spec:
periodSeconds: 5
failureThreshold: 5
resources:
{{- toYaml .Values.runwhenLocal.resources | nindent 12 }}
{{- if eq .Values.platformType "EKS_Fargate" }}
{{- toYaml .Values.runwhenLocal.resources.EKS_Fargate | nindent 12 }}
{{- else }}
{{- toYaml .Values.runwhenLocal.resources.default | nindent 12 }}
{{- end }}
volumeMounts:
- name: shared-volume
mountPath: "/shared"
Expand Down
7 changes: 6 additions & 1 deletion charts/runwhen-local/templates/runner-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ spec:
- containerPort: 9090
name: metrics
protocol: TCP
resources: {}
resources:
{{- if eq .Values.platformType "EKS_Fargate" }}
{{- toYaml .Values.runner.resources.EKS_Fargate | nindent 12 }}
{{- else }}
{{- toYaml .Values.runner.resources.default | nindent 12 }}
{{- end }}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
env:
Expand Down
41 changes: 35 additions & 6 deletions charts/runwhen-local/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ tolerations: []

affinity: {}

# Is this a platform the requires special configuration?
# Currently supports EKS_Fargate, kubernetes
platformType: "kubernetes"

###############################################################################
######################## RunWhen Local Configuration ##########################
###############################################################################
Expand Down Expand Up @@ -95,12 +99,21 @@ runwhenLocal:
# - chart-example.local

resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "1024Mi"
cpu: "1"
default:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "1"
memory: "1024Mi"
EKS_Fargate:
requests:
cpu: "2"
memory: "1024Mi"
limits:
cpu: "2"
memory: "1024Mi"


# RunWhen Local requires a kubeconfig to discover resouces from 1 or more
# clusters.
Expand Down Expand Up @@ -175,6 +188,7 @@ runwhenLocal:
kube-system: 0
kube-public: 0
kube-node-lease: 0
codeCollections: []
custom:
kubeconfig_secret_name: kubeconfig
kubernetes_distribution_binary: kubectl
Expand All @@ -193,6 +207,21 @@ runner:
controlAddr: "https://runner.beta.runwhen.com"
metrics:
url: "https://runner-cortex-tenant.beta.runwhen.com/push"
resources:
default:
requests:
cpu: "50m"
memory: "64Mi"
limits:
cpu: "200m"
memory: "256Mi"
EKS_Fargate:
requests:
cpu: "200m"
memory: "256Mi"
limits:
cpu: "200m"
memory: "256Mi"

# grafana-agent is only deployed if runner.enabled is true
# https://github.com/grafana/agent/blob/main/operations/helm/charts/grafana-agent/values.yaml
Expand Down

0 comments on commit eddfe9e

Please sign in to comment.