Skip to content

Commit

Permalink
Add ability to add tolerations and affinity in helm chart (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
trashadewan authored Jan 11, 2024
1 parent 613df20 commit 29cc7c9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ helm upgrade --install my-deployment k8s-ephemeral-storage-metrics/k8s-ephemeral

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| deploy_type | string | `"Deployment"` | Set as Deployment for single controller to query all nodes or Daemonset |
| dev | object | `{"enabled":false,"image":{"imagePullPolicy":"IfNotPresent"}}` | For local development of kind and/or deploy grow and shrink test pods |
| image.imagePullPolicy | string | `"IfNotPresent"` | |
Expand All @@ -44,6 +45,7 @@ helm upgrade --install my-deployment k8s-ephemeral-storage-metrics/k8s-ephemeral
| podAnnotations | object | `{}` | |
| prometheus.enable | bool | `true` | |
| prometheus.release | string | `"kube-prometheus-stack"` | |
| tolerations | object | `[]` | |

## Contribute

Expand Down
2 changes: 2 additions & 0 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ helm upgrade --install my-deployment k8s-ephemeral-storage-metrics/k8s-ephemeral

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| deploy_type | string | `"Deployment"` | Set as Deployment for single controller to query all nodes or Daemonset |
| dev | object | `{"enabled":false,"image":{"imagePullPolicy":"IfNotPresent"}}` | For local development of kind and/or deploy grow and shrink test pods |
| image.imagePullPolicy | string | `"IfNotPresent"` | |
Expand All @@ -29,6 +30,7 @@ helm upgrade --install my-deployment k8s-ephemeral-storage-metrics/k8s-ephemeral
| podAnnotations | object | `{}` | |
| prometheus.enable | bool | `true` | |
| prometheus.release | string | `"kube-prometheus-stack"` | |
| tolerations | object | `[]` | |

## Contribute

Expand Down
8 changes: 8 additions & 0 deletions chart/templates/DeployType.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ spec:
serviceAccountName: k8s-ephemeral-storage-metrics
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: metrics
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
Expand Down
6 changes: 5 additions & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ dev:

podAnnotations: {}

nodeSelector: {}
nodeSelector: {}

affinity: {}

tolerations: []

0 comments on commit 29cc7c9

Please sign in to comment.