File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,21 @@ spec:
2525 containerPort : 80
2626 volumeMounts :
2727 - name : cmdbconf
28- mountPath : /var/www/CMDB/
28+ mountPath : /var/www/CMDB/cmdb.conf
29+ subPath : cmdb.conf # 以文件的形式挂载
2930 readOnly : true
31+ - name : cmdbnginx
32+ mountPath : /etc/nginx/conf.d/nginx_cmdb.conf
33+ subPath : nginx_cmdb.conf
34+ readOnly : true
35+
3036 volumes :
3137 - name : cmdbconf
3238 configMap :
33- name : cmdb-conf # configmap要提前创建好
39+ name : cmdb-conf # configmap要提前创建好 kubectl create configmap cmdb-conf --from-file=./cmdb.conf -n qa
40+ - name : cmdbnginx
41+ configMap :
42+ name : cmdb-nginx-conf # kubectl create configmap cmdb-nginx-conf --from-file=./cmdb-nginx-conf -n qa
3443
3544---
3645apiVersion : v1
Original file line number Diff line number Diff line change 2222 }
2323
2424 location /v1/cmdb/ws/ {
25- access_log /var/log/nginx/ws_access.log;
26- error_log /var/log/nginx/ws_error.log;
2725 # proxy_set_header Host $http_host;
2826 proxy_redirect off;
2927 proxy_set_header X-Real-IP $remote_addr;
You can’t perform that action at this time.
0 commit comments