Skip to content

Commit

Permalink
feat(refinery): add support for topologySpreadConstraints (#390)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?

- Closes #97 

## Short description of the changes

Adds support for providing `topologySpreadConstraints` field. This will
help us deploy refinery confirming to some topology constraints.

---------

Co-authored-by: Jamie Danielson <[email protected]>
  • Loading branch information
nakamume and JamieDanielson authored Oct 3, 2024
1 parent fd52b7b commit cb75cfb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/refinery/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: refinery
description: Chart to deploy Honeycomb Refinery
type: application
version: 2.11.3
version: 2.12.0
appVersion: 2.8.2
keywords:
- refinery
Expand Down
2 changes: 2 additions & 0 deletions charts/refinery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ The following table lists the configurable parameters of the Refinery chart, and
| `redis.image.tag` | Redis image tag | `6.0.2` |
| `redis.nodeSelector` | Node labels for pod assignment specific to the installed Redis deployment | `{}` |
| `redis.tolerations` | Tolerations for pod assignment specific to the installed Redis deployment | `[]`|
| `redis.topologySpreadConstraints` | TopologySpreadConstraints for pod assignment specific to the installed Redis deployment | `[]`|
| `replicaCount` | Number of Refinery replicas | `3` |
| `resources` | CPU/Memory resource requests/limits | limit: 2000m/2Gi, request: 500m/500Mi |
| `rules` | Refinery sampling rules | see [Configuring sampling rules](#configuring-sampling-rules) |
Expand All @@ -169,6 +170,7 @@ The following table lists the configurable parameters of the Refinery chart, and
| `serviceAccount.labels` | Labels to be applied to ServiceAccount | `{}` |
| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the `refinery.fullname` template |
| `tolerations` | Tolerations for pod assignment | `[]`|
| `topologySpreadConstraints` | TopologySpreadConstraints for pod assignment | `[]`|

1. secretProvider functionality requires the [Secrets Store CSI Driver](https://secrets-store-csi-driver.sigs.k8s.io/)

Expand Down
6 changes: 5 additions & 1 deletion charts/refinery/templates/deployment-redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ spec:
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.redis.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.redis.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/refinery/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ spec:
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/refinery/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ redis:

# Affinity specific to installed Redis configuration. Requires redis.enabled to be true
affinity: {}
topologySpreadConstraints: []
annotations: {}
podAnnotations: {}
podLabels: {}
Expand Down Expand Up @@ -317,6 +318,7 @@ rollout:
nodeSelector: {}

tolerations: []
topologySpreadConstraints: []

affinity: {}

Expand Down

0 comments on commit cb75cfb

Please sign in to comment.