Skip to content

Commit

Permalink
feat: enable the ability to specify the service target port (#44)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Block <andy.block@gmail.com>
  • Loading branch information
sabre1041 authored Jan 7, 2023
1 parent c7089a8 commit e53c183
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/backstage/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.10.1
version: 0.11.0

dependencies:
- name: common
Expand Down
5 changes: 3 additions & 2 deletions charts/backstage/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Backstage Helm Chart

![Version: 0.10.1](https://img.shields.io/badge/Version-0.10.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.11.0](https://img.shields.io/badge/Version-0.11.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 @@ -151,7 +151,8 @@ The command removes all the Kubernetes components associated with the chart and
| service.loadBalancerIP | Backstage service Load Balancer IP <br /> Ref: https://kubernetes.io/docs/user-guide/services/#type-loadbalancer | string | `""` |
| service.loadBalancerSourceRanges | Load Balancer sources <br /> Ref: https://kubernetes.io/docs/tasks/access-application-cluster/cnfigure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service <br /> E.g `loadBalancerSourceRanges: [10.10.10.0/24]` | list | `[]` |
| service.nodePorts | Node port for the Backstage client connections Choose port between `30000-32767` | object | `{"backend":""}` |
| service.ports | Backstage svc port for client connections | object | `{"backend":7007}` |
| service.ports | Backstage svc port for client connections | object | `{"backend":7007,"targetPort":"backend"}` |
| service.ports.targetPort | Backstage svc target port referencing receiving pod container port | string | `"backend"` |
| service.sessionAffinity | Control where client requests go, to the same pod or round-robin (values: `ClientIP` or `None`) <br /> Ref: https://kubernetes.io/docs/user-guide/services/ | string | `"None"` |
| service.type | Kubernetes Service type | string | `"ClusterIP"` |
| serviceAccount | Service Account Configuration | object | See below |
Expand Down
2 changes: 1 addition & 1 deletion charts/backstage/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
ports:
- name: http-backend
port: {{ .Values.service.ports.backend }}
targetPort: backend
targetPort: {{ .Values.service.ports.targetPort }}
protocol: TCP
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.backend)) }}
nodePort: {{ .Values.service.nodePorts.backend }}
Expand Down
3 changes: 3 additions & 0 deletions charts/backstage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ service:
ports:
backend: 7007

# -- Backstage svc target port referencing receiving pod container port
targetPort: backend

# -- Node port for the Backstage client connections
# Choose port between `30000-32767`
nodePorts:
Expand Down

0 comments on commit e53c183

Please sign in to comment.