diff --git a/chart/templates/bigbang/virtualservice.yaml b/chart/templates/bigbang/virtualservice.yaml index 952e2a20bcf6d4202df73b1554a993d8f878df52..46c31b16f3d8d9110e04e497c87f6780d94a285f 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 831ed14596d357ee6fc81ff1ada76a100f0c4689..a69817a68b855a61f8b8c245a406a0e4e61385cc 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: ""