Skip to content

Commit

Permalink
Updated the Virtual Kubelet configuration and values to align with th…
Browse files Browse the repository at this point in the history
…e new nomenclature and hierarchy structure.
  • Loading branch information
Bianco95 committed Jan 24, 2025
1 parent 35361b2 commit 682a335
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 43 deletions.
2 changes: 1 addition & 1 deletion interlink/examples/edge_with_rest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ virtualNode:
CPUs: 1000
MemGiB: 1600
Pods: 100
HTTPProxies:
httpProxies:
HTTP: null
HTTPs: null

Expand Down
71 changes: 44 additions & 27 deletions interlink/templates/virtual-kubelet-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,42 @@ metadata:
data:
InterLinkConfig.yaml: |
{{- if .Values.interlink.socket }}
InterlinkURL: {{ .Values.interlink.socket | quote }}
InterlinkPort: {{ printf "%s-1" .Values.interlink.socket | quote }}
interlinkURL: {{ .Values.interlink.socket | quote }}
interlinkPort: {{ printf "%s-1" .Values.interlink.socket | quote }}
{{- else }}
InterlinkURL: {{ .Values.interlink.address | quote }}
InterlinkPort: {{ .Values.interlink.port | quote }}
interlinkURL: {{ .Values.interlink.address | quote }}
interlinkPort: {{ .Values.interlink.port | quote }}
{{- end }}
ExportPodData: {{ .Values.interlink.exportPodData }}
VerboseLogging: true
ErrorsOnlyLogging: false
ServiceAccount: "{{ .Values.nodeName }}"
Namespace: "{{ .Release.Namespace }}"
VKTokenFile: {{ .Values.OAUTH.enabled | ternary "/opt/interlink/token" "/dev/null" }}
CPU: "{{ .Values.virtualNode.CPUs }}"
Memory: "{{ .Values.virtualNode.MemGiB }}Gi"
Pods: "{{ .Values.virtualNode.Pods }}"
nvidia.com/gpu: "{{ .Values.virtualNode.GPUs }}"
HTTP:
Insecure: {{ .Values.virtualNode.HTTP.Insecure }}
KubeletHTTP:
Insecure: {{ .Values.virtualNode.KubeletHTTP.Insecure }}
exportPodData: {{ .Values.interlink.exportPodData }}
verboseLogging: true
errorsOnlyLogging: false
serviceAccount: "{{ .Values.nodeName }}"
namespace: "{{ .Release.Namespace }}"
vkTokenFile: {{ .Values.OAUTH.enabled | ternary "/opt/interlink/token" "/dev/null" }}
resources:
cpu: "{{ .Values.virtualNode.resources.cpus }}"
memory: "{{ .Values.virtualNode.resources.memgib }}Gi"
pods: "{{ .Values.virtualNode.resources.pods }}"
accelerators:
{{- range .Values.virtualNode.resources.accelerators }}
- resource_type: "{{ .resource_type }}"
model: "{{ .model }}"
available: {{ .available }}
{{- end }}
http:
insecure: {{ .Values.virtualNode.http.insecure }}
kubeletHTTP:
insecure: {{ .Values.virtualNode.kubeletHTTP.insecure }}
nodeLabels:
{{- range .Values.virtualNode.nodeLabels }}
- "{{ . }}"
{{- end }}
nodeTaints:
{{- range .Values.virtualNode.nodeTaints }}
- key: "{{ .key }}"
value: "{{ .value }}"
effect: "{{ .effect }}"
{{- end }}
---
{{- if .Values.interlink.enabled }}
apiVersion: v1
Expand All @@ -36,20 +52,21 @@ metadata:
data:
InterLinkConfig.yaml: |
{{- if .Values.interlink.socket }}
InterlinkAddress: {{ .Values.interlink.socket | quote }}
interlinkAddress: {{ .Values.interlink.socket | quote }}
{{- else }}
InterlinkAddress: {{ .Values.interlink.address | quote }}
InterlinkPort: {{ .Values.interlink.port | quote }}
interlinkAddress: {{ .Values.interlink.address | quote }}
interlinkPort: {{ .Values.interlink.port | quote }}
{{- end }}
{{- if .Values.plugin.socket }}
SidecarURL: {{ .Values.plugin.socket | quote }}
sidecarURL: {{ .Values.plugin.socket | quote }}
{{- else }}
SidecarURL: {{ .Values.plugin.address | quote }}
SidecarPort: {{ .Values.plugin.port | quote }}
sidecarURL: {{ .Values.plugin.address | quote }}
sidecarPort: {{ .Values.plugin.port | quote }}
{{- end }}
VerboseLogging: true
ErrorsOnlyLogging: false
DataRootFolder: /data/interlink
verboseLogging: true
errorsOnlyLogging: false
exportPodData: {{ .Values.interlink.exportPodData }}
dataRootFolder: /data/interlink
{{- end }}
---
{{- if .Values.plugin.enabled }}
Expand Down
8 changes: 4 additions & 4 deletions interlink/templates/virtual-kubelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ spec:
- name: VKTOKENFILE
value: "/opt/interlink/token"
{{- end }}
{{- if .Values.virtualNode.HTTPProxies.HTTP }}
{{- if .Values.virtualNode.httpProxies.http }}
- name: HTTP_PROXY
value: {{ .Values.virtualNode.HTTPProxies.HTTP }}
value: {{ .Values.virtualNode.httpProxies.http }}
{{- end }}
{{- if .Values.virtualNode.HTTPProxies.HTTPs }}
{{- if .Values.virtualNode.httpProxies.https }}
- name: HTTPS_PROXY
value: {{ .Values.virtualNode.HTTPProxies.HTTPs }}
value: {{ .Values.virtualNode.httpProxies.https }}
{{- end }}
volumeMounts:
- name: config
Expand Down
39 changes: 28 additions & 11 deletions interlink/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,34 @@ interlink:

virtualNode:
image: ghcr.io/intertwin-eu/interlink/virtual-kubelet-inttw:latest
CPUs: 1000
MemGiB: 1600
Pods: 100
GPUs: 0
HTTPProxies:
HTTP: null
HTTPs: null
HTTP:
Insecure: false
KubeletHTTP:
Insecure: true
resources:
cpus: 8
memgib: 49
pods: 100
# add accelerators to the virtual node
#accelerators:
# fpga example
#- resource_type: xilinx.com/fpga
# model: u55c
# available: 1
# gpu example
#- resource_type: nvidia.com/gpu
# model: a100
# available: 1
httpProxies:
http: null
https: null
http:
insecure: true
kubeletHTTP:
insecure: true
# uncomment to enable custom nodeSelector and nodeTaints
#nodeLabels:
# - "accelerator=a100"
#nodeTaints:
# - key: "accelerator"
# value: "a100"
# effect: "NoSchedule"

plugin:
enabled: false
Expand Down

0 comments on commit 682a335

Please sign in to comment.