Skip to content

Commit

Permalink
Merge pull request #12 from kool-dev/service_ports
Browse files Browse the repository at this point in the history
Adding support to multiple ports on services + bump generic 1.4.0
  • Loading branch information
dbpolito authored Feb 18, 2021
2 parents 0020449 + 5af5e81 commit 61968e3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/generic/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v2
name: generic
description: Generic Chart
version: 1.3.1
version: 1.4.0
22 changes: 22 additions & 0 deletions charts/generic/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## generic

Kool generic chart, you can deploy pretty much anything using this little guy.


### Upgrading to 1.4

Service signature has changed in order to support multiple ports in the same service:

```diff
-services:
- default:
- ...
- port: 80
- # targetPort: 80
+services:
+ default:
+ ...
+ ports:
+ - port: 80
+ # targetPort: 80
```
6 changes: 4 additions & 2 deletions charts/generic/templates/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ spec:
externalName: {{ $service.externalName }}
{{- end }}
ports:
- port: {{ $service.port }}
targetPort: {{ $service.targetPort | default $service.port }}
{{- range $port := $service.ports }}
- port: {{ $port.port }}
targetPort: {{ $port.targetPort | default $port.port }}
{{- end }}
selector: {{ $selectorLabels | nindent 4 }}
---
{{- end }}
Expand Down
5 changes: 3 additions & 2 deletions charts/generic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ serviceAccount:
# default:
# # fullName:
# type: ClusterIP
# port: 80
# # targetPort: 80
# ports:
# - port: 80
# # targetPort: 80

# ingresses:
# - name: app
Expand Down

0 comments on commit 61968e3

Please sign in to comment.