[zh-cn] resync frontend-nginx.conf
parent
237ac7d6db
commit
193b589a41
|
@ -4,7 +4,7 @@ import time
|
|||
import rediswq
|
||||
|
||||
host="redis"
|
||||
# Uncomment next two lines if you do not have Kube-DNS working.
|
||||
# 如果你未在运行 Kube-DNS,请取消下面两行的注释
|
||||
# import os
|
||||
# host = os.getenv("REDIS_SERVICE_HOST")
|
||||
|
||||
|
@ -16,7 +16,7 @@ while not q.empty():
|
|||
if item is not None:
|
||||
itemstr = item.decode("utf-8")
|
||||
print("Working on " + itemstr)
|
||||
time.sleep(10) # Put your actual work here instead of sleep.
|
||||
time.sleep(10) # 将你的实际工作放在此处来取代 sleep
|
||||
q.complete(item)
|
||||
else:
|
||||
print("Waiting for work")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# The identifier Backend is internal to nginx, and used to name this specific upstream
|
||||
# Backend 是 nginx 的内部标识符,用于命名以下特定的 upstream
|
||||
upstream Backend {
|
||||
# hello is the internal DNS name used by the backend Service inside Kubernetes
|
||||
# hello 是 Kubernetes 中的后端服务所使用的内部 DNS 名称
|
||||
server hello;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ server {
|
|||
listen 80;
|
||||
|
||||
location / {
|
||||
# The following statement will proxy traffic to the upstream named Backend
|
||||
# 以下语句将流量通过代理方式转发到名为 Backend 的上游
|
||||
proxy_pass http://Backend;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue