Skip to content

Commit

Permalink
Allow customizing service ports (#74)
Browse files Browse the repository at this point in the history
* Remove unused values

* Fix variable key case

* Add linkerd global config

* Fix file extension

* Allow customizing ports

* Remove duplicate ports

* Remove unused values

Signed-off-by: Harry Walter <harry@bluebamboostudios.com>

* Fix variable key case

Signed-off-by: Harry Walter <harry@bluebamboostudios.com>

* Add linkerd global config

Signed-off-by: Harry Walter <harry@bluebamboostudios.com>

* Fix file extension

Signed-off-by: Harry Walter <harry@bluebamboostudios.com>

* Allow customizing ports

Signed-off-by: Harry Walter <harry@bluebamboostudios.com>

* Remove duplicate ports

Signed-off-by: Harry Walter <harry@bluebamboostudios.com>
  • Loading branch information
haswalt committed Jul 18, 2022
1 parent b98c09a commit eb16e3e
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 28 deletions.
2 changes: 1 addition & 1 deletion helm-chart/enroute/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
- "8443"
- --mode-ingress
- --enable-ratelimit
{{- if .Values.service.useproxyprotocol }}
{{- if .Values.service.useProxyProtocol }}
- --use-proxy-protocol
{{- end }}
livenessProbe:
Expand Down
15 changes: 15 additions & 0 deletions helm-chart/enroute/templates/linkerd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.mesh.linkerD }}
piVersion: enroute.saaras.io/v1
kind: GlobalConfig
metadata:
name: {{ include "enroute.fullname" . }}-linkerd
labels:
{{- include "enroute.labels" . | nindent 4 }}
spec:
name: linkerd-global-config
type: globalconfig_globals
config: |
{
"linkerd_enabled": true
}
{{- end }}
21 changes: 13 additions & 8 deletions helm-chart/enroute/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ metadata:
{{- end }}
spec:
ports:
- port: 80
name: http
protocol: TCP
targetPort: 8080
- port: 443
name: https
protocol: TCP
targetPort: 8443
{{- range .Values.service.ports }}
- name: {{ .name }}
port: {{ int .port }}
{{- if .targetPort }}
targetPort: {{ int .targetPort }}
{{- end }}
{{- if .nodePort }}
nodePort: {{ int .nodePort }}
{{- end }}
{{- if .protocol }}
protocol: {{ .protocol }}
{{- end }}
{{- end }}
selector:
{{- include "enroute.selectorLabels" . | nindent 4 }}
type: LoadBalancer
31 changes: 12 additions & 19 deletions helm-chart/enroute/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,17 @@ service:

type: LoadBalancer

useproxyprotocol: false

useProxyProtocol: false

ports:
- port: 80
name: http
protocol: TCP
targetPort: 8080
- port: 443
name: https
protocol: TCP
targetPort: 8443

# Backward compatibility
enrouteService:
Expand Down Expand Up @@ -112,25 +121,9 @@ affinity:
# CUSTOM #
##########

# awsSettings controls AWS annotations
# This annotation puts the AWS ELB into "TCP" mode so that it does not
# do HTTP negotiation for HTTPS connections at the ELB edge.
# The downside of this is the remote IP address of all connections will
# appear to be the internal address of the ELB. See docs/proxy-proto.md
# for information about enabling the PROXY protocol on the ELB to recover
# the original remote IP address.
awsSettings:
enable: false

ociSettings:
enable: false

digitaloceanSettings:
enable: false

# One of ["trace", "debug", "info", "error"]
envoySettings:
logLevel: "trace"
logLevel: "debug"

mesh:
linkerD: false
Expand Down

0 comments on commit eb16e3e

Please sign in to comment.