Skip to content

Commit

Permalink
feat: add affinity and nodeSelector options for agent chart (#27)
Browse files Browse the repository at this point in the history
* add affinity and nodeSelector options for agent chart

* add helm-docs

* use {} as a default so its treated as an object

* bump agent chart

* Update charts/nobl9-agent/README.md

Co-authored-by: Andrzej Voss <[email protected]>

* fix typo

---------

Co-authored-by: Andrzej Voss <[email protected]>
  • Loading branch information
kuklyy and triluch authored Oct 16, 2024
1 parent ced43f0 commit 158f032
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generates README.md file based on template. Requires helm-docs to be installed (https://github.com/norwoodj/helm-docs).
generate-helm-docs:
helm-docs
2 changes: 1 addition & 1 deletion charts/nobl9-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: nobl9-agent
version: 1.0.7
version: 1.0.8
description: Agent to retrieve SLI metrics from configured data sources and send the data back to the Nobl9 backend.
home: https://nobl9.com
sources:
Expand Down
2 changes: 2 additions & 0 deletions charts/nobl9-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,13 @@ Go to the [docs.nobl9.com](https://docs.nobl9.com/Nobl9_Agent/helm-charts?_highl
| config.oktaOrgUrl | string | `"https://accounts.nobl9.com"` | Nobl9 Okta Organization URL |
| config.organization | string | `nil` | Nobl9 Organization name |
| config.project | string | `nil` | Nobl9 Project name |
| deployment.affinity | object | `{}` | Affinity settings |
| deployment.annotations | object | `{}` | Custom annotations |
| deployment.extraEnvs | string | `nil` | Additional Envs |
| deployment.extraVolumeMounts | string | `nil` | Additional Volume mounts |
| deployment.extraVolumes | string | `nil` | Additional Volumes |
| deployment.image | string | `"nobl9/agent"` | Image used by chart |
| deployment.nodeSelector | object | `{}` | Node selector |
| deployment.pullPolicy | string | `"Always"` | Image Pull Policy |
| deployment.version | string | `"0.69.2"` | Agent version (image tag) |
| extraLabels | object | `{}` | Additional labels for created objects. |
Expand Down
9 changes: 8 additions & 1 deletion charts/nobl9-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,11 @@ spec:
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}

{{- with .Values.deployment.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.deployment.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end}}
8 changes: 8 additions & 0 deletions charts/nobl9-agent/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@
"annotations": {
"type": "object",
"description": "Custom annotations"
},
"nodeSelector": {
"type": "object",
"description": "Key value pairs for node selector"
},
"affinity": {
"type": "object",
"description": "Affinity settings"
}
}
},
Expand Down
23 changes: 22 additions & 1 deletion charts/nobl9-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,28 @@ deployment:
# readOnly: true
# -- Custom annotations
annotations: {}
# -- Additional Labels
# -- Node selector
nodeSelector: {}
# disktype: ssd
# -- Affinity settings
affinity: {}
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: topology.kubernetes.io/zone
# operator: In
# values:
# - antarctica-east1
# - antarctica-west1
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 1
# preference:
# matchExpressions:
# - key: another-node-label-key
# operator: In
# values:
# - another-node-label-value

secret:
# -- Override the Secret name
Expand Down

0 comments on commit 158f032

Please sign in to comment.