Skip to content

Commit

Permalink
Merge pull request #47 from 7knot/feat/additional-affinity-for-observer
Browse files Browse the repository at this point in the history
feat: add ability to set additional affinity for observer.
  • Loading branch information
yamagai authored Jun 10, 2022
2 parents 52e79f2 + b016544 commit bf1a7be
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/panope/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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.6.7
version: 0.6.8

# 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
Expand Down
12 changes: 3 additions & 9 deletions charts/panope/templates/observer/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,10 @@ spec:
# necessary to hit the node's metadata server when using Workload Identity
hostNetwork: true
terminationGracePeriodSeconds: 30 # for graceful shutdown
{{- with .Values.observer.affinity }}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cloud.google.com/gke-preemptible
operator: Exists
- matchExpressions:
- key: cloud.google.com/gke-spot
operator: Exists
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.observer.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
Expand Down
14 changes: 13 additions & 1 deletion charts/panope/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,22 @@ observer:

imagePullSecrets: []

affinity:
# following affinity is required for the observer to work properly
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cloud.google.com/gke-preemptible
operator: Exists
- matchExpressions:
- key: cloud.google.com/gke-spot
operator: Exists

daemonset:
# labels to add to the deployment
labels: {}
# Annotations to add to the deployment
# annotations to add to the deployment
annotations: {}

secret:
Expand Down

0 comments on commit bf1a7be

Please sign in to comment.