Skip to content

Commit

Permalink
Merge pull request #24 from clavinjune/feat/introduce-node-selector-t…
Browse files Browse the repository at this point in the history
…olerations-affinity

feat: introduce nodeSelector, tolerations, and affinity
  • Loading branch information
blumamir authored Feb 11, 2024
2 parents 41ff0b0 + 614f332 commit 42e35ea
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 16 deletions.
4 changes: 2 additions & 2 deletions charts/odigos/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.41
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
appVersion: "1.0.31"
13 changes: 11 additions & 2 deletions charts/odigos/templates/autoscaler/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,18 @@ spec:
runAsNonRoot: true
serviceAccountName: odigos-autoscaler
terminationGracePeriodSeconds: 10
nodeSelector:
kubernetes.io/os: linux
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 6 }}
{{- end }}
{{- with .Values.autoscaler }}
{{- if .nodeSelector }}
nodeSelector: {{ toYaml .nodeSelector | nindent 8 }}
{{- end }}
{{- if .tolerations }}
tolerations: {{ toYaml .tolerations | nindent 8 }}
{{- end }}
{{- if .affinity }}
affinity: {{ toYaml .affinity | nindent 8 }}
{{- end }}
{{- end }}
13 changes: 11 additions & 2 deletions charts/odigos/templates/instrumentor/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,18 @@ spec:
runAsNonRoot: true
serviceAccountName: odigos-instrumentor
terminationGracePeriodSeconds: 10
nodeSelector:
kubernetes.io/os: linux
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 6 }}
{{- end }}
{{- with .Values.instrumentor }}
{{- if .nodeSelector }}
nodeSelector: {{ toYaml .nodeSelector | nindent 8 }}
{{- end }}
{{- if .tolerations }}
tolerations: {{ toYaml .tolerations | nindent 8 }}
{{- end }}
{{- if .affinity }}
affinity: {{ toYaml .affinity | nindent 8 }}
{{- end }}
{{- end }}
18 changes: 11 additions & 7 deletions charts/odigos/templates/odiglet/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,7 @@ spec:
mountPath: /sys/kernel/debug
hostNetwork: true
hostPID: true
nodeSelector:
kubernetes.io/os: linux
serviceAccountName: odiglet
tolerations:
- effect: NoSchedule
key: node.kubernetes.io/os
operator: Equal
value: windows
volumes:
- name: run-dir
hostPath:
Expand All @@ -74,3 +67,14 @@ spec:
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 6 }}
{{- end }}
{{- with .Values.odiglet }}
{{- if .nodeSelector }}
nodeSelector: {{ toYaml .nodeSelector | nindent 8 }}
{{- end }}
{{- if .tolerations }}
tolerations: {{ toYaml .tolerations | nindent 8 }}
{{- end }}
{{- if .affinity }}
affinity: {{ toYaml .affinity | nindent 8 }}
{{- end }}
{{- end }}
13 changes: 11 additions & 2 deletions charts/odigos/templates/scheduler/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,18 @@ spec:
runAsNonRoot: true
serviceAccountName: odigos-scheduler
terminationGracePeriodSeconds: 10
nodeSelector:
kubernetes.io/os: linux
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 6 }}
{{- end }}
{{- with .Values.scheduler }}
{{- if .nodeSelector }}
nodeSelector: {{ toYaml .nodeSelector | nindent 8 }}
{{- end }}
{{- if .tolerations }}
tolerations: {{ toYaml .tolerations | nindent 8 }}
{{- end }}
{{- if .affinity }}
affinity: {{ toYaml .affinity | nindent 8 }}
{{- end }}
{{- end }}
23 changes: 22 additions & 1 deletion charts/odigos/values.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
image:
tag: v1.0.27
tag: v1.0.31
imagePullSecrets: []

autoscaler:
image:
repository: keyval/odigos-autoscaler
nodeSelector:
kubernetes.io/os: linux
tolerations: []
affinity: {}

scheduler:
image:
repository: keyval/odigos-scheduler
nodeSelector:
kubernetes.io/os: linux
tolerations: []
affinity: {}

instrumentor:
deleteLangDetectionPods: true
Expand All @@ -20,10 +29,22 @@ instrumentor:
- linkerd
image:
repository: keyval/odigos-instrumentor
nodeSelector:
kubernetes.io/os: linux
tolerations: []
affinity: {}

odiglet:
image:
repository: keyval/odigos-odiglet
nodeSelector:
kubernetes.io/os: linux
tolerations:
- effect: NoSchedule
key: node.kubernetes.io/os
operator: Equal
value: windows
affinity: {}

# Pod Security Policy
psp:
Expand Down

0 comments on commit 42e35ea

Please sign in to comment.