github.com/kyma-project/kyma-environment-broker@v0.0.1/resources/kcp/charts/kyma-environment-broker/templates/virtualservice.yaml (about) 1 {{- if .Capabilities.APIVersions.Has "networking.istio.io/v1beta1" }} 2 --- 3 apiVersion: networking.istio.io/v1beta1 4 kind: VirtualService 5 metadata: 6 name: {{ template "fullname" . }} 7 annotations: 8 argocd.argoproj.io/sync-options: Prune=false 9 spec: 10 gateways: 11 - {{ .Values.global.istio.gateway.namespace }}/{{ .Values.global.istio.gateway.name }} 12 {{- if .Values.global.istio.additionalGateways }} 13 {{ toYaml .Values.global.istio.additionalGateways | nindent 4 }} 14 {{- end }} 15 hosts: 16 - {{ .Values.host }}.{{ .Values.global.ingress.domainName }} 17 http: 18 - corsPolicy: 19 allowHeaders: 20 - Authorization 21 - Content-Type 22 - X-Broker-API-Version 23 allowMethods: ["GET", "PUT", "DELETE"] 24 allowOrigins: 25 - regex: ".*" 26 match: 27 - uri: 28 regex: /oauth/([^/]+/)?v2/.* 29 route: 30 - destination: 31 host: {{ include "kyma-env-broker.fullname" . }} 32 port: 33 number: 80 34 - corsPolicy: 35 allowHeaders: 36 - Authorization 37 - Content-Type 38 allowMethods: ["GET"] 39 allowOrigins: 40 - regex: ".*" 41 match: 42 - uri: 43 regex: /info/runtimes 44 route: 45 - destination: 46 host: {{ include "kyma-env-broker.fullname" . }} 47 port: 48 number: 80 49 - corsPolicy: 50 allowHeaders: 51 - Authorization 52 - Content-Type 53 allowMethods: ["POST"] 54 allowOrigins: 55 - regex: ".*" 56 match: 57 - uri: 58 regex: /upgrade/.* 59 route: 60 - destination: 61 host: {{ include "kyma-env-broker.fullname" . }} 62 port: 63 number: 80 64 - corsPolicy: 65 allowHeaders: 66 - Authorization 67 - Content-Type 68 allowMethods: ["GET", "PUT"] 69 allowOrigins: 70 - regex: ".*" 71 match: 72 - uri: 73 regex: /orchestrations.* 74 route: 75 - destination: 76 host: {{ include "kyma-env-broker.fullname" . }} 77 port: 78 number: 80 79 - corsPolicy: 80 allowHeaders: 81 - Authorization 82 - Content-Type 83 allowMethods: ["GET"] 84 allowOrigins: 85 - regex: ".*" 86 match: 87 - uri: 88 regex: /runtimes 89 route: 90 - destination: 91 host: {{ include "kyma-env-broker.fullname" . }} 92 port: 93 number: 80 94 - corsPolicy: 95 allowHeaders: 96 - Authorization 97 - Content-Type 98 allowMethods: ["GET"] 99 allowOrigins: 100 - regex: ".*" 101 match: 102 - uri: 103 regex: /events 104 route: 105 - destination: 106 host: {{ include "kyma-env-broker.fullname" . }} 107 port: 108 number: 80 109 # kubeconfig endpoint exposed without authorization 110 - corsPolicy: 111 allowHeaders: 112 - Authorization 113 - Content-Type 114 allowMethods: ["GET"] 115 allowOrigins: 116 - regex: ".*" 117 match: 118 - uri: 119 regex: /kubeconfig/.* 120 route: 121 - destination: 122 host: {{ include "kyma-env-broker.fullname" . }} 123 port: 124 number: 80 125 {{- if .Values.swagger.virtualService.enabled }} 126 # swagger exposed without authorization on root endpoint also needs access to static resources placed under /swagger folder 127 - corsPolicy: 128 allowHeaders: 129 - Authorization 130 - Content-Type 131 allowMethods: ["GET"] 132 allowOrigins: 133 - regex: ".*" 134 match: 135 - uri: 136 exact: / 137 route: 138 - destination: 139 host: {{ include "kyma-env-broker.fullname" . }} 140 port: 141 number: 80 142 - corsPolicy: 143 allowHeaders: 144 - Authorization 145 - Content-Type 146 allowMethods: ["GET"] 147 allowOrigins: 148 - regex: ".*" 149 match: 150 - uri: 151 regex: /swagger.* 152 route: 153 - destination: 154 host: {{ include "kyma-env-broker.fullname" . }} 155 port: 156 number: 80 157 - corsPolicy: 158 allowHeaders: 159 - Authorization 160 - Content-Type 161 allowMethods: ["GET"] 162 allowOrigins: 163 - regex: ".*" 164 match: 165 - uri: 166 regex: /schema.* 167 route: 168 - destination: 169 host: {{ include "kyma-env-broker.fullname" . }} 170 port: 171 number: 80 172 {{ end }} 173 {{- end }}