Skip to content

Commit

Permalink
fix: dynamic broker host FQDNS
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabNeu committed Dec 8, 2023
1 parent be13c3c commit 6f9c517
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
24 changes: 12 additions & 12 deletions templates/istio_virtual_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ metadata:
namespace: {{ .Values.istio.namespace }}
spec:
hosts:
- {{ .Values.istio.hostname.kafka_broker_0 }}
- {{ .Values.istio.hostname.kafka_broker_1 }}
- {{ .Values.istio.hostname.kafka_broker_2 }}
- {{ .Release.Name }}-kafka-broker-0.{{ .Release.Name }}-kafka-broker-headless.{{ .Values.namespace }}.svc.cluster.local
- {{ .Release.Name }}-kafka-broker-1.{{ .Release.Name }}-kafka-broker-headless.{{ .Values.namespace }}.svc.cluster.local
- {{ .Release.Name }}-kafka-broker-2.{{ .Release.Name }}-kafka-broker-headless.{{ .Values.namespace }}.svc.cluster.local
tcp:
- match:
- port: {{ .Values.istio.port.kafka_port }} # to match the gateway port basically to bind this to gateway
- port: {{ .Values.configs.kafka_port}} # to match the gateway port basically to bind this to gateway
route:
- destination:
host: {{ .Values.istio.hostname.kafka_broker_0 }}
host: {{ .Release.Name }}-kafka-broker-0.{{ .Release.Name }}-kafka-broker-headless.{{ .Values.namespace }}.svc.cluster.local
port:
number: {{ .Values.istio.port.kafka_port }}
number: {{ .Values.configs.kafka_port}}
- match:
- port: {{ .Values.istio.port.kafka_port }} # to match the gateway port basically to bind this to gateway
- port: {{ .Values.configs.kafka_port}} # to match the gateway port basically to bind this to gateway
route:
- destination:
host: {{ .Values.istio.hostname.kafka_broker_1 }}
host: {{ .Release.Name }}-kafka-broker-1.{{ .Release.Name }}-kafka-broker-headless.{{ .Values.namespace }}.svc.cluster.local
port:
number: {{ .Values.istio.port.kafka_port }}
number: {{ .Values.configs.kafka_port}}
- match:
- port: {{ .Values.istio.port.kafka_port }} # to match the gateway port basically to bind this to gateway
- port: {{ .Values.configs.kafka_port}} # to match the gateway port basically to bind this to gateway
route:
- destination:
host: {{ .Values.istio.hostname.kafka_broker_2 }}
host: {{ .Release.Name }}-kafka-broker-2.{{ .Release.Name }}-kafka-broker-headless.{{ .Values.namespace }}.svc.cluster.local
port:
number: {{ .Values.istio.port.kafka_port }}
number: {{ .Values.configs.kafka_port}}
6 changes: 0 additions & 6 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ psql:

istio:
namespace: istio-system
port:
kafka_port: 9094
hostname:
kafka_broker_0: infra-helm-release-kafka-broker-0.infra-helm-release-kafka-broker-headless.deps.svc.cluster.local
kafka_broker_1: infra-helm-release-kafka-broker-1.infra-helm-release-kafka-broker-headless.deps.svc.cluster.local
kafka_broker_2: infra-helm-release-kafka-broker-2.infra-helm-release-kafka-broker-headless.deps.svc.cluster.local

postgresql:
image:
Expand Down

0 comments on commit 6f9c517

Please sign in to comment.