Skip to content

Commit

Permalink
feat: add support for pod affinity (#162)
Browse files Browse the repository at this point in the history
* feat: add support for pod affinity
Signed-off-by: smcavallo <smcavallo@hotmail.com>

* update affinity schema
Signed-off-by: smcavallo <smcavallo@hotmail.com>

* docs: fix pod affinity readme

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>

* bump minor version

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>

---------

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
Co-authored-by: Vincenzo Scamporlino <vincenzos@spotify.com>
  • Loading branch information
smcavallo and vinzscam authored Feb 21, 2024
1 parent 92af33b commit 36f7e34
Show file tree
Hide file tree
Showing 6 changed files with 788 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/backstage/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ sources:
# 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: 1.8.3
version: 1.9.0
3 changes: 2 additions & 1 deletion charts/backstage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Backstage Helm Chart

[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/backstage)](https://artifacthub.io/packages/search?repo=backstage)
![Version: 1.8.3](https://img.shields.io/badge/Version-1.8.3-informational?style=flat-square)
![Version: 1.9.0](https://img.shields.io/badge/Version-1.9.0-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart for deploying a Backstage application
Expand Down Expand Up @@ -114,6 +114,7 @@ Kubernetes: `>= 1.19.0-0`
| Key | Description | Type | Default |
|-----|-------------|------|---------|
| backstage | Backstage parameters | object | See below |
| backstage.affinity | Affinity for pod assignment <br /> Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity | object | `{}` |
| backstage.annotations | Additional custom annotations for the `Deployment` resource | object | `{}` |
| backstage.appConfig | Generates ConfigMap and configures it in the Backstage pods | object | `{}` |
| backstage.args | Backstage container command arguments | list | `[]` |
Expand Down
4 changes: 4 additions & 0 deletions charts/backstage/templates/backstage-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ spec:
securityContext:
{{- include "common.tplvalues.render" ( dict "value" .Values.backstage.podSecurityContext "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.backstage.affinity }}
affinity:
{{- include "common.tplvalues.render" ( dict "value" .Values.backstage.affinity "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.backstage.nodeSelector }}
nodeSelector:
{{- include "common.tplvalues.render" ( dict "value" .Values.backstage.nodeSelector "context" $) | nindent 8 }}
Expand Down
Loading

0 comments on commit 36f7e34

Please sign in to comment.