dengbiao 2 meses atrás
pai
commit
d0cc6c76fc
2 arquivos alterados com 6 adições e 6 exclusões
  1. +4
    -4
      k8s/container.yaml
  2. +2
    -2
      k8s/ingress.yaml

+ 4
- 4
k8s/container.yaml Ver arquivo

@@ -3,7 +3,7 @@ apiVersion: apps/v1
# 元数据
metadata:
name: advertisement-agent
namespace: advertisement-agent
namespace: advertisement
labels:
app: advertisement-agent
annotations:
@@ -36,9 +36,9 @@ spec:
name: advertisement-agent-cfg
defaultMode: 420
# pvc
- name: advertisement-agent-pvc # 在该部署中的名称,后面使用改名称挂载
- name: advertisement-agent # 在该部署中的名称,后面使用改名称挂载
persistentVolumeClaim:
claimName: advertisement-agent-pvc # pvc的名称
claimName: advertisement-agent # pvc的名称
# Nginx配置
- name: advertisement-agent-nginx
configMap:
@@ -79,7 +79,7 @@ spec:
readOnly: true
mountPath: /etc/localtime
# 存储卷 用于存放前端代码
- name: advertisement-agent-pvc # 前面volumes声明的名称
- name: advertisement-agent # 前面volumes声明的名称
mountPath: /usr/share/nginx/html
- name: advertisement-agent-nginx # Nginx 配置
readOnly: true


+ 2
- 2
k8s/ingress.yaml Ver arquivo

@@ -1,7 +1,7 @@
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: advertisement # ingress名称
name: advertisement-agent # ingress名称
namespace: advertisement
annotations:
kubesphere.io/creator: dengbiao
@@ -13,5 +13,5 @@ spec:
- path: /
pathType: ImplementationSpecific
backend:
serviceName: advertisement # 流量转发到的服务
serviceName: advertisement-agent # 流量转发到的服务
servicePort: 80

Carregando…
Cancelar
Salvar