Skip to content

Commit

Permalink
fix nginx proxy configuration conflicts (#3489)
Browse files Browse the repository at this point in the history
* Allow configuration of nginx proxy config path

* Fix the internal nginx configuration location

Signed-off-by: Johann Queuniet <contact@lordran.net>
  • Loading branch information
jqueuniet authored and k8s-ci-robot committed Oct 11, 2018
1 parent 2117e81 commit 1911fe5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions roles/kubernetes/node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ nginx_cpu_requests: 25m

nginx_image_repo: nginx
nginx_image_tag: 1.13
nginx_config_dir: "/etc/nginx"

etcd_config_dir: /etc/ssl/etcd

Expand Down
4 changes: 2 additions & 2 deletions roles/kubernetes/node/tasks/nginx-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

- name: nginx-proxy | Make nginx directory
file:
path: /etc/nginx
path: "{{ nginx_config_dir }}"
state: directory
mode: 0700
owner: root

- name: nginx-proxy | Write nginx-proxy configuration
template:
src: nginx.conf.j2
dest: "/etc/nginx/nginx.conf"
dest: "{{ nginx_config_dir }}/nginx.conf"
owner: root
mode: 0755
backup: yes
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ spec:
volumes:
- name: etc-nginx
hostPath:
path: /etc/nginx
path: {{ nginx_config_dir }}
2 changes: 1 addition & 1 deletion roles/reset/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
- /etc/ssl/etcd
- /var/log/calico
- /etc/cni
- /etc/nginx
- "{{ nginx_config_dir }}"
- /etc/dnsmasq.d
- /etc/dnsmasq.conf
- /etc/dnsmasq.d-available
Expand Down

0 comments on commit 1911fe5

Please sign in to comment.