From b8ebc3db0fabb44925f26765cacbb43f3519bef1 Mon Sep 17 00:00:00 2001 From: Thomas Runyon Date: Mon, 26 Apr 2021 12:09:14 -0400 Subject: [PATCH] added more vs for docker registires --- chart/templates/bigbang/virtualservice.yaml | 29 ++++++++++++++++++++- chart/values.yaml | 3 +++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/chart/templates/bigbang/virtualservice.yaml b/chart/templates/bigbang/virtualservice.yaml index 952e2a2..46c31b1 100644 --- a/chart/templates/bigbang/virtualservice.yaml +++ b/chart/templates/bigbang/virtualservice.yaml @@ -14,7 +14,9 @@ metadata: app.kubernetes.io/component: {{ include "nexus.name" . }} spec: gateways: - - istio-system/main + {{- range .Values.istio.nexus.gateways }} + - {{ . }} + {{- end }} hosts: - "{{ .Values.hostname }}.{{ .Values.domain }}" http: @@ -24,3 +26,28 @@ spec: number: {{ .Values.nexus.nexusPort }} host: {{ $serviceName }} {{- end }} +{{- $fullName := include "nexus.fullname" . -}} +{{ if .Values.nexus.docker.enabled }} +{{ range $registry := .Values.nexus.docker.registries }} +--- +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: {{ $fullName | trunc 49 }}-docker-{{ $registry.port }} + namespace: {{ $.Release.Namespace }} +spec: + gateways: + {{- range $.Values.istio.nexus.gateways }} + - {{ . }} + {{- end }} + hosts: + - {{ $registry.host | quote }} + http: + - route: + - destination: + port: + number: {{ $registry.port }} + host: {{ $fullName | trunc 49 }}-docker-{{ $registry.port }} +{{- end }} +{{- end }} + diff --git a/chart/values.yaml b/chart/values.yaml index 831ed14..a69817a 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -3,6 +3,9 @@ hostname: nexus domain: bigbang.dev istio: enabled: false + nexus: + gateways: + - "istio-system/main" monioring: enabled: false license_key: "" -- GitLab