FlyTOmeLight commented on issue #9240:
URL: https://github.com/apache/apisix/issues/9240#issuecomment-1501118785
> > ```json
> > ingress
> > ```
>
> but i actually use grpc scheme @kingluo
>
> ```
> {{- if .Values.ingress.enabled -}}
> apiVersion: apisix.apache.org/v2
> kind: ApisixRoute
> metadata:
> name: {{ .Release.Name }}
> spec:
> http:
> - name: http
> priority: 3
> match:
> paths:
> - /{{ .Release.Name }}/http/*
> backends:
> - serviceName: {{ .Release.Name }}
> servicePort: http
> plugins:
> - name: proxy-rewrite
> enable: true
> config:
> regex_uri: ["^/{{ .Release.Name }}/http/(.*)", "/$1"]
> - name: api-breaker
> enable: true
> config:
> break_response_code: 502
> unhealthy:
> http_statuses: [500, 503]
> failure: 3
> healthy:
> http_statuses: [200]
> successes: 1
> - name: grpc
> priority: 1
> match:
> hosts:
> - {{ .Release.Name }}.endpoint.windmill.com
> paths:
> - "/*"
> backends:
> - serviceName: {{ .Release.Name }}
> servicePort: grpc
> - name: metrics
> priority: 2
> match:
> paths:
> - /{{ .Release.Name }}/metrics/*
> backends:
> - serviceName: {{ .Release.Name }}
> servicePort: metrics
> plugins:
> - name: proxy-rewrite
> enable: true
> config:
> regex_uri: ["^/{{ .Release.Name }}/metrics/(.*)", "/$1"]
>
> ---
> apiVersion: apisix.apache.org/v2
> kind: ApisixUpstream
> metadata:
> name: {{ .Release.Name }}
> spec:
> loadbalancer:
> type: ewma
> retries: {{ .Values.ingress.retries }}
> timeout:
> connect: {{ .Values.ingress.timeout.connect }}
> send: {{ .Values.ingress.timeout.send }}
> read: {{ .Values.ingress.timeout.read }}
> portLevelSettings:
> - port: 8000
> scheme: http
> - port: 8001
> scheme: grpc
> - port: 8002
> scheme: http
> {{- end }}
> ```
yes, this is my whole setting @kingluo @tao12345666333 here is the
apisixroute and apisixupstream description.
```
Name: dongnan
Namespace: default
Labels: <none>
Annotations: <none>
API Version: apisix.apache.org/v2
Kind: ApisixRoute
Metadata:
Creation Timestamp: 2023-02-27T02:50:52Z
Generation: 1
Managed Fields:
API Version: apisix.apache.org/v2
Fields Type: FieldsV1
fieldsV1:
f:spec:
Manager: Go-http-client
Operation: Update
Time: 2023-02-27T02:50:52Z
API Version: apisix.apache.org/v2
Fields Type: FieldsV1
fieldsV1:
f:spec:
f:http:
f:status:
.:
f:conditions:
Manager: apisix-ingress-controller
Operation: Update
Time: 2023-02-27T02:50:52Z
Resource Version: 54330836
UID: e58a7211-4153-45a9-b741-bca635bc2aa3
Spec:
Http:
Backends:
Service Name: dongnan
Service Port: http
Match:
Paths:
/dongnan/http/*
Name: http
Plugins:
Config:
regex_uri:
^/dongnan/http/(.*)
/$1
Enable: true
Name: proxy-rewrite
Config:
break_response_code: 502
Healthy:
http_statuses:
200
Successes: 1
Unhealthy:
Failure: 3
http_statuses:
500
503
Enable: true
Name: api-breaker
Priority: 3
Backends:
Service Name: dongnan
Service Port: grpc
Match:
Hosts:
dongnan.endpoint.windmill.com
Paths:
/*
Name: grpc
Priority: 1
Backends:
Service Name: dongnan
Service Port: metrics
Match:
Paths:
/dongnan/metrics/*
Name: metrics
Plugins:
Config:
regex_uri:
^/dongnan/metrics/(.*)
/$1
Enable: true
Name: proxy-rewrite
Priority: 2
Status:
Conditions:
Message: Sync Successfully
Observed Generation: 1
Reason: ResourcesSynced
Status: True
Type: ResourcesAvailable
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal ResourcesSynced 2m58s (x3821 over 13d) ApisixIngress
ApisixIngress synced successfully
```
Name: dongnan
Namespace: default
Labels: <none>
Annotations: <none>
API Version: apisix.apache.org/v2
Kind: ApisixUpstream
Metadata:
Creation Timestamp: 2023-02-27T02:50:52Z
Generation: 1
Managed Fields:
API Version: apisix.apache.org/v2
Fields Type: FieldsV1
fieldsV1:
f:spec:
.:
f:loadbalancer:
.:
f:type:
f:portLevelSettings:
f:retries:
f:timeout:
.:
f:connect:
f:read:
f:send:
Manager: Go-http-client
Operation: Update
Time: 2023-02-27T02:50:52Z
Resource Version: 45712201
UID: c8dc04aa-7978-496e-827e-2cd22e475dbc
Spec:
Loadbalancer:
Type: ewma
Port Level Settings:
Port: 8000
Scheme: http
Port: 8001
Scheme: grpc
Port: 8002
Scheme: http
Retries: 3
Timeout:
Connect: 1s
Read: 5s
Send: 5s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal ResourcesSynced 3m30s (x3800 over 13d) ApisixIngress
ApisixIngress synced successfully
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]