diff --git a/devops/azure/chart/helm-config.yaml b/devops/azure/chart/helm-config.yaml index 9d27a76c95b777c35b13c5d29641ef63d52ed26d..325ceab14ff42e7390ee5eba6e9982d33d5d6ec8 100644 --- a/devops/azure/chart/helm-config.yaml +++ b/devops/azure/chart/helm-config.yaml @@ -28,3 +28,5 @@ image: repository: #{container-registry}#.azurecr.io branch: #{ENVIRONMENT_NAME}# tag: #{Build.SourceVersion}# + +istioDnsHost: #{ISTIO_DNS_HOST}# \ No newline at end of file diff --git a/devops/azure/chart/templates/virtual-service.yaml b/devops/azure/chart/templates/virtual-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bc85cb87b54a264a1fe09c7ab1f428e41e6f6182 --- /dev/null +++ b/devops/azure/chart/templates/virtual-service.yaml @@ -0,0 +1,36 @@ +--- +# Source: /devops/azure/chart/templates/virtual-service.yaml +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: {{ .Chart.Name }} + namespace: osdu +spec: + hosts: + - "{{ .Values.istioDnsHost }}" + gateways: + - istio-gateway + http: + - match: + - uri: + prefix: "/api/{{ .Chart.Name }}/v1" + route: + - destination: + host: {{ .Chart.Name }} + port: + number: 80 + corsPolicy: + maxAge: "60m" + allowCredentials: true + allowHeaders: + - Authorization + - Data-Partition-Id + - Correlation-Id + allowMethods: + - POST + - GET + - PUT + - PATCH + - DELETE + allowOrigins: + - prefix: "*" \ No newline at end of file diff --git a/devops/azure/chart/values.yaml b/devops/azure/chart/values.yaml index 67b3587256eb3e1928d86447bf7d58c84813ced9..04027457beffc4da0c986211f30c669a348a291a 100644 --- a/devops/azure/chart/values.yaml +++ b/devops/azure/chart/values.yaml @@ -21,3 +21,5 @@ image: repository: community.opengroup.org:5555/osdu/platform/system/notification branch: master tag: latest + +istioDnsHost: "" \ No newline at end of file