Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 9 additions & 29 deletions charts/emissary-ingress/templates/listener.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,16 @@
{{- if .Values.createDefaultListeners }}
{{- range $name, $listener := .Values.listeners }}
{{- if or $listener.create (and $.Values.createDefaultListeners (has $name (list "http" "https"))) }}
---
apiVersion: getambassador.io/v3alpha1
kind: Listener
metadata:
name: {{ include "ambassador.fullname" . }}-https-listener
namespace: {{ include "ambassador.namespace" . }}
name: {{ include "ambassador.fullname" $ }}-{{ $name }}-listener
namespace: {{ include "ambassador.namespace" $ }}
spec:
port: 8443
protocol: HTTPS
securityModel: XFP
hostBinding:
namespace:
from: ALL
{{- if hasKey .Values.env "AMBASSADOR_ID" }}
{{- if hasKey $.Values.env "AMBASSADOR_ID" }}
ambassador_id:
- {{ .Values.env.AMBASSADOR_ID | quote }}
- {{ $.Values.env.AMBASSADOR_ID | quote }}
{{- end }}
---
apiVersion: getambassador.io/v3alpha1
kind: Listener
metadata:
name: {{ include "ambassador.fullname" . }}-http-listener
namespace: {{ include "ambassador.namespace" . }}
spec:
port: 8080
protocol: HTTP
securityModel: XFP
hostBinding:
namespace:
from: ALL
{{- if hasKey .Values.env "AMBASSADOR_ID" }}
ambassador_id:
- {{ .Values.env.AMBASSADOR_ID | quote }}
{{- end }}
{{ end }}
{{- toYaml $listener.spec | nindent 2 }}
{{- end }}
{{- end }}
34 changes: 34 additions & 0 deletions charts/emissary-ingress/values.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,43 @@ deploymentTool: ''
docker: {}
createNamespace: false

# Create listeners. See: https://www.getambassador.io/docs/emissary/latest/topics/running/listener
listeners:
https:
create: false
spec:
port: 8443
protocol: HTTPS
securityModel: XFP
hostBinding:
namespace:
from: ALL
http:
create: false
spec:
port: 8080
protocol: HTTP
securityModel: XFP
hostBinding:
namespace:
from: ALL
# example:
# create: true
# spec:
# port: 8080 # int32, port number on which to listen
# protocol: HTTPS # HTTP, HTTPS, HTTPPROXY, HTTPSPROXY, TCP
# securityModel: XFP # XFP (for X-Forwarded-Proto), SECURE, INSECURE
# statsPrefix: example-listener # default depends on protocol; see docs
# l7Depth: 0 # int32
# hostBinding:
# namespace:
# from: SELF # SELF, ALL
# selector: ... # Kubernetes label selector

# Whether Emissary should be created with default listeners:
# - HTTP on port 8080
# - HTTPS on port 8443
# Note: enabling this is the same as enabling listeners.https.create and listeners.http.create
createDefaultListeners: false

# Configure a 'lifecycle' section for the main pod
Expand Down