Last active
August 17, 2018 05:53
-
-
Save chanjarster/d746c09813fab7602c87a53cf4fa1eb2 to your computer and use it in GitHub Desktop.
Istio 1.0: HTTPRoute `appendHeaders` got wrong result if that header already exists in request headers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: istio-test | |
labels: | |
istio-injection: enabled | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: echo-istio | |
namespace: istio-test | |
spec: | |
type: ClusterIP | |
ports: | |
- port: 8080 | |
targetPort: http | |
protocol: TCP | |
name: http | |
selector: | |
app: echo-istio | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: echo-istio | |
namespace: istio-test | |
labels: | |
app: echo-istio | |
spec: | |
selector: | |
matchLabels: | |
app: echo-istio | |
replicas: 3 | |
template: | |
metadata: | |
labels: | |
app: echo-istio | |
spec: | |
containers: | |
- name: echo | |
image: gcr.io/google-containers/echoserver:1.10 | |
ports: | |
- containerPort: 8080 | |
name: http | |
--- | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: Gateway | |
metadata: | |
namespace: istio-test | |
name: echo-gateway | |
spec: | |
selector: | |
istio: ingressgateway # use Istio default gateway implementation | |
servers: | |
- port: | |
number: 80 | |
name: http | |
protocol: HTTP | |
hosts: | |
- "*" | |
--- | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
namespace: istio-test | |
name: echo-virtual-service | |
spec: | |
hosts: | |
- "*" | |
gateways: | |
- echo-gateway | |
http: | |
- match: | |
- uri: | |
prefix: /echo-istio | |
route: | |
- destination: | |
host: echo-istio | |
appendHeaders: | |
x-foo: bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment