|
|
@@ -35,13 +35,24 @@ spec: |
|
|
|
# 这里的名字就是前面创建的configMap的名字 |
|
|
|
name: advertisement-medium-cfg |
|
|
|
defaultMode: 420 |
|
|
|
# pvc |
|
|
|
- name: advertisement-medium-pvc # 在该部署中的名称,后面使用改名称挂载 |
|
|
|
persistentVolumeClaim: |
|
|
|
claimName: advertisement-medium-pvc # pvc的名称 |
|
|
|
# Nginx配置 |
|
|
|
- name: advertisement-medium-nginx |
|
|
|
configMap: |
|
|
|
name: advertisement-medium-nginx # 外部configMap的名称 |
|
|
|
items: |
|
|
|
- key: go.conf |
|
|
|
path: default.conf |
|
|
|
containers: |
|
|
|
# 主容器 |
|
|
|
- name: advertisement-medium-container |
|
|
|
# 镜像地址(提前打包好并推送的镜像仓库) |
|
|
|
image: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/advertisement-medium:0.0.1' |
|
|
|
ports: |
|
|
|
- name: advertisement-tcp-1004 |
|
|
|
- name: ad-medium-1004 |
|
|
|
# 容器端口号(注意与golang web server启动的端口一致) |
|
|
|
containerPort: 1004 |
|
|
|
protocol: TCP |
|
|
@@ -56,8 +67,8 @@ spec: |
|
|
|
mountPath: /var/zyos |
|
|
|
imagePullPolicy: Always |
|
|
|
# Nginx 容器 |
|
|
|
- name: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/nginx:latest' |
|
|
|
image: nginx |
|
|
|
- name: nginx |
|
|
|
image: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/nginx:latest' |
|
|
|
ports: |
|
|
|
- name: http-80 |
|
|
|
containerPort: 80 |
|
|
|