Skip to content

Commit

Permalink
Merge pull request #11 from yellowhat/main
Browse files Browse the repository at this point in the history
configure kepler using env var
  • Loading branch information
rootfs authored Apr 26, 2023
2 parents eecf048 + b67f5b5 commit cf43346
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: kepler
description: A Helm chart for kepler
type: application
version: 0.2.0
version: 0.3.0
appVersion: "1.16.0"
home: https://sustainable-computing.io/html/index.html
sources:
Expand Down
31 changes: 17 additions & 14 deletions templates/server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: DaemonSet
metadata:
name: {{ include "kepler.name" . }}
namespace: {{ .Values.global.namespace }}
labels:
{{- include "kepler.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
Expand All @@ -25,13 +27,21 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
command:
- /usr/bin/kepler
- -address
- 0.0.0.0:{{ .Values.service.port }}
- -enable-gpu=true
- -enable-cgroup-id=true
- -v=1
args:
- -v=$(KEPLER_LOG_LEVEL)
env:
- name: NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: METRIC_PATH
value: "/metrics"
- name: BIND_ADDRESS
value: "0.0.0.0:{{ .Values.service.port }}"
{{- range $key, $value := .Values.extraEnvVars }}
- name: {{ $key | quote }}
value: {{ $value | quote }}
{{- end }}
ports:
- containerPort: {{ .Values.service.port }}
hostPort: {{ .Values.service.port }}
Expand All @@ -55,13 +65,6 @@ spec:
name: proc
- mountPath: /usr/src
name: usr-src
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CPU_ARCH_OVERRIDE
value:
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
11 changes: 11 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ resources:
cpu: 100m
memory: 200Mi

# -- Extra environment variables
extraEnvVars:
KEPLER_LOG_LEVEL: "1"
ENABLE_GPU: "true"
ENABLE_EBPF_CGROUPID: "true"
EXPOSE_IRQ_COUNTER_METRICS: "true"
EXPOSE_KUBELET_METRICS: "true"
ENABLE_PROCESS_METRICS: "true"
CPU_ARCH_OVERRIDE: ""
CGROUP_METRICS: "*"

nodeSelector: {}

tolerations:
Expand Down

0 comments on commit cf43346

Please sign in to comment.