Skip to content
Snippets Groups Projects
virtual-service.yaml 2.36 KiB
Newer Older
  • Learn to ignore specific revisions
  • Sanjeev-SLB's avatar
    Sanjeev-SLB committed
    ---
    # Source: /devops/azure/chart/templates/virtual-service.yaml
    
    Sanjeev-SLB's avatar
    Sanjeev-SLB committed
    apiVersion: networking.istio.io/v1alpha3
    kind: VirtualService
    metadata:
      name: {{ .Chart.Name }}
      namespace: osdu
    spec:
      hosts:
      - "{{ .Values.istioDnsHost }}"
      gateways:
      - istio-gateway
      http:  
    
      - name: "Settings specific to the Swagger page and resources"
        match:
        - uri:
            prefix: "/api/indexer/v2/webjars"
        - uri:
            prefix: "/api/indexer/v2/swagger-resources"
        - uri:
            prefix: "/api/indexer/v2/v3/api-docs"
        - uri:
            prefix: "/api/indexer/v2/swagger-ui"
        route:
        - destination:
            host: {{ .Chart.Name }}
            port:
              number: 80
        headers:
          response:
            set:
              cache-control: "private, max-age=300"
        corsPolicy:
          maxAge: "60m"
          allowCredentials: true
          allowHeaders:
          - Authorization
          - Data-Partition-Id
          - Correlation-Id
          - Content-Type
          - cache-control
          allowMethods:
          - POST
          - GET
          - PUT
          - PATCH
          - DELETE
          allowOrigins:
          - prefix: "*"
      - name: "Settings specific to the QueryAttributeApi API"
        match:
        - uri:
            prefix: "/api/indexer/v2/query/attributes"
        route:
        - destination:
            host: {{ .Chart.Name }}
            port:
              number: 80
        headers:
          response:
            set:
              cache-control: "private, max-age=300, stale-while-revalidate=600, stale-if-error=600"
              vary: "data-partition-id,authorization"
        corsPolicy:
          maxAge: "60m"
          allowCredentials: true
          allowHeaders:
          - Authorization
          - Data-Partition-Id
          - Correlation-Id
          - Content-Type
          - cache-control
          allowMethods:
          - POST
          - GET
          - PUT
          - PATCH
          - DELETE
          allowOrigins:
          - prefix: "*"
      - name: "Default settings, applies to everything not matched above"
        match:
    
    Sanjeev-SLB's avatar
    Sanjeev-SLB committed
        - uri:
    
    Sanjeev-SLB's avatar
    Sanjeev-SLB committed
            prefix: "/api/indexer/v2"
    
    Sanjeev-SLB's avatar
    Sanjeev-SLB committed
        route:
        - destination:
            host: {{ .Chart.Name }}
            port:
              number: 80
        corsPolicy:
          maxAge: "60m"
          allowCredentials: true
          allowHeaders:
          - Authorization
          - Data-Partition-Id
          - Correlation-Id
    
    Sanjeev-SLB's avatar
    Sanjeev-SLB committed
          - Content-Type
    
    Sanjeev-SLB's avatar
    Sanjeev-SLB committed
          allowMethods:
          - POST
          - GET
          - PUT
          - PATCH
          - DELETE
          allowOrigins: