Skip to content

Commit

Permalink
charts/service-deployment: Expose targetPort and protocol in service …
Browse files Browse the repository at this point in the history
…definition (closes #53)
  • Loading branch information
jbeemster committed Aug 26, 2022
1 parent 6eba84c commit 82c26af
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 3 additions & 1 deletion charts/service-deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ helm delete service-deployment
| hpa.maxReplicas | int | `20` | Maximum number of pods to deploy |
| hpa.averageCPUUtilization | int | `75` | Average CPU utilization before auto-scaling starts |
| service.deploy | bool | `true` | Whether to setup service bindings (note: only NodePort is supported) |
| service.port | int | `80` | Port to bind and expose the service on |
| service.port | int | `8000` | Port to bind and expose the service on |
| service.targetPort | int | `80` | The Target Port that the actual application is being exposed on |
| service.protocol | string | `"TCP"` | Protocol that the service leverages (note: TCP or UDP) |
| service.aws.targetGroupARN | string | `""` | EC2 TargetGroup ARN to bind the service onto |
| service.gcp.networkEndpointGroupName | string | `""` | Name of the Network Endpoint Group to bind onto |
| dockerconfigjson.name | string | `"snowplow-sd-dockerhub"` | Name of the secret to use for the private repository |
Expand Down
4 changes: 2 additions & 2 deletions charts/service-deployment/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The service can be accessed via port {{ .Values.service.port }} on the following

To connect to your server from outside the cluster execute the following commands:

kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "app.fullname" . }} 8080:{{ .Values.service.port }}
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "app.fullname" . }} {{ .Values.service.port }}:{{ .Values.service.port }}

You can then navigate to your service in your browser at localhost:8080 or issue request with tools like cURL.
You can then navigate to your service in your browser at localhost:{{ .Values.service.port }} or issue request with tools like cURL.
{{- end }}
4 changes: 2 additions & 2 deletions charts/service-deployment/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ spec:
ports:
- name: http-port
port: {{ .Values.service.port }}
protocol: TCP
targetPort: {{ .Values.service.port }}
protocol: {{ .Values.service.protocol }}
targetPort: {{ .Values.service.targetPort }}
{{- end }}
6 changes: 5 additions & 1 deletion charts/service-deployment/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ service:
# -- Whether to setup service bindings (note: only NodePort is supported)
deploy: true
# -- Port to bind and expose the service on
port: 80
port: 8000
# -- The Target Port that the actual application is being exposed on
targetPort: 80
# -- Protocol that the service leverages (note: TCP or UDP)
protocol: "TCP"
aws:
# -- EC2 TargetGroup ARN to bind the service onto
targetGroupARN: ""
Expand Down

0 comments on commit 82c26af

Please sign in to comment.