Skip to content

Commit

Permalink
Add option to override relay port by contour config (#96)
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Rubets <[email protected]>
  • Loading branch information
plejik authored Oct 11, 2023
1 parent 6013b86 commit a938261
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.

## Unreleased

## Added
- Option to override Relay external host in config from [plejik](https://github.com/plejik)

## [0.2.6] - 2023-09-25

### Changed
Expand Down
2 changes: 2 additions & 0 deletions charts/ztka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ helm show values paralus/ztka
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| contour | object | contour subchart overwrite | the chart will overwrite some values of contour subchart. |
| contour.envoy.hostPorts | object | `{"http":80,"https":443}` | Envoy host ports. |
| contour.envoy.service.annotations | object | `{}` | Annotations for Envoy service. |
| contour.envoy.service.type | string | `"LoadBalancer"` | Type of Envoy service to create. |
| deploy.contour.enable | bool | `true` | auto install contour ingress controller |
| deploy.contour.tls | object | `{}` | TLS properties of the virtual host |
| deploy.elasticsearch.address | string | `""` | Elasticsearch address. Required when `deploy.elasticsearch.enable` is unset. |
Expand Down
11 changes: 11 additions & 0 deletions charts/ztka/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,17 @@ Get core-connector full-qualified domain.
{{.Values.fqdn.coreConnectorSubdomain}}.{{.Values.fqdn.domain}}
{{- end -}}

{{/*
TCP port for connection.
*/}}
{{- define "ztka.tcpPort" -}}
{{- $tcpPort := 443 -}}
{{- if and $.Values.contour.envoy.hostPorts .Values.contour.envoy.hostPorts.https -}}
{{- $tcpPort = .Values.contour.envoy.hostPorts.https -}}
{{- end -}}
{{ $tcpPort }}
{{- end -}}

{{/*
Get user full-qualified domain.
*/}}
Expand Down
4 changes: 2 additions & 2 deletions charts/ztka/templates/configmap-paralus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ data:
RELAY_IMAGE: {{ .Values.images.relay.repository }}:{{ .Values.images.relay.tag | default .Chart.AppVersion }}
SCHEDULER_NAMESPACE: {{ .Release.Namespace | quote }}
SENTRY_PEERING_HOST: "paralus:10001"
CORE_RELAY_CONNECTOR_HOST: {{ printf "%s:%s" (include "ztka.coreConnectorFQDN" .) "443" | quote }}
CORE_RELAY_USER_HOST: {{ printf "%s:%s" (include "ztka.userFQDN" .) "443" | quote }}
CORE_RELAY_CONNECTOR_HOST: {{ printf "%s:%s" (include "ztka.coreConnectorFQDN" .) (include "ztka.tcpPort" .) | quote }}
CORE_RELAY_USER_HOST: {{ printf "%s:%s" (include "ztka.userFQDN" .) (include "ztka.tcpPort" .) | quote }}
SENTRY_BOOTSTRAP_ADDR: {{ include "ztka.consoleFQDNWithPort" . | quote }}
8 changes: 8 additions & 0 deletions charts/ztka/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,14 @@ contour:
create: false

envoy:
# -- Envoy host ports.
hostPorts:
http: 80
https: 443

service:
# -- Annotations for Envoy service.
annotations: {}

# -- Type of Envoy service to create.
type: LoadBalancer

0 comments on commit a938261

Please sign in to comment.