|
@@ -107,21 +107,33 @@ spec:
|
|
selector:
|
|
selector:
|
|
app: global-book-api
|
|
app: global-book-api
|
|
---
|
|
---
|
|
-apiVersion: networking.k8s.io/v1
|
|
|
|
kind: Ingress
|
|
kind: Ingress
|
|
|
|
+apiVersion: networking.k8s.io/v1
|
|
metadata:
|
|
metadata:
|
|
- name: global-book-api-ingress
|
|
|
|
|
|
+ name: global-book-api
|
|
namespace: book-api
|
|
namespace: book-api
|
|
|
|
+ annotations:
|
|
|
|
+ nginx.ingress.kubernetes.io/enable-access-log: 'true'
|
|
|
|
+ nginx.ingress.kubernetes.io/configuration-snippet: |
|
|
|
|
+ #lua_need_request_body on;
|
|
|
|
+ #content_by_lua 'local s = ngx.var.request_body';
|
|
|
|
+ #log_format api.ieasou.cn 'v1{]api.ieasou.cn{]$request{]HHvDHAMjq2I{]$year$month$day $hour$minute$second{]$status{]-{]$request_time_usec{]$body_bytes_sent{]$bytes_sent{]$remote_addr{]$http_x_forwarded_for{]$http_referer{]$request_body{]$http_user_agent{]-{]uid{]$http_via{]v1';
|
|
|
|
+ access_log /var/log/nginx/api.ieasou.cn.access.log upstreaminfo;
|
|
|
|
+ error_log /var/log/nginx/api.ieasou.cn.error.log;
|
|
spec:
|
|
spec:
|
|
|
|
+ tls:
|
|
|
|
+ - hosts:
|
|
|
|
+ - api.ieasou.cn
|
|
|
|
+ secretName: global-book-api
|
|
rules:
|
|
rules:
|
|
- - host: global-book-api.ieasou.cn
|
|
|
|
- http:
|
|
|
|
- paths:
|
|
|
|
- - path: /
|
|
|
|
- pathType: Prefix
|
|
|
|
- backend:
|
|
|
|
- service:
|
|
|
|
- name: global-book-api-svc
|
|
|
|
- port:
|
|
|
|
- number: 8080
|
|
|
|
|
|
+ - host: api.ieasou.cn
|
|
|
|
+ http:
|
|
|
|
+ paths:
|
|
|
|
+ - path: /
|
|
|
|
+ pathType: ImplementationSpecific
|
|
|
|
+ backend:
|
|
|
|
+ service:
|
|
|
|
+ name: global-book-api-svc
|
|
|
|
+ port:
|
|
|
|
+ number: 8080
|
|
ingressClassName: nginx
|
|
ingressClassName: nginx
|