Skip to content
Snippets Groups Projects
Commit 3b7797b1 authored by Matthew Mosesohn's avatar Matthew Mosesohn Committed by Kubernetes Prow Robot
Browse files

Ensure haproxy and nginx reload when config changes (#4862)

Change-Id: Ia9a41e7b1cfcb1e6acb2dbae6eecc541dce25a74
parent aa63eb61
No related branches found
No related tags found
No related merge requests found
......@@ -4,11 +4,6 @@
path: "{{ kube_manifest_dir }}/nginx-proxy.yml"
state: absent
- name: haproxy | Write static pod
template:
src: manifests/haproxy.manifest.j2
dest: "{{ kube_manifest_dir }}/haproxy.yml"
- name: haproxy | Make haproxy directory
file:
path: "{{ haproxy_config_dir }}"
......@@ -23,3 +18,13 @@
owner: root
mode: 0755
backup: yes
- name: haproxy | Get checksum from config
stat:
path: "{{ haproxy_config_dir }}/haproxy.cfg"
register: haproxy_stat
- name: haproxy | Write static pod
template:
src: manifests/haproxy.manifest.j2
dest: "{{ kube_manifest_dir }}/haproxy.yml"
......@@ -4,11 +4,6 @@
path: "{{ kube_manifest_dir }}/haproxy.yml"
state: absent
- name: nginx-proxy | Write static pod
template:
src: manifests/nginx-proxy.manifest.j2
dest: "{{ kube_manifest_dir }}/nginx-proxy.yml"
- name: nginx-proxy | Make nginx directory
file:
path: "{{ nginx_config_dir }}"
......@@ -23,3 +18,13 @@
owner: root
mode: 0755
backup: yes
- name: nginx-proxy | Get checksum from config
stat:
path: "{{ nginx_config_dir }}/nginx.conf"
register: nginx_stat
- name: nginx-proxy | Write static pod
template:
src: manifests/nginx-proxy.manifest.j2
dest: "{{ kube_manifest_dir }}/nginx-proxy.yml"
......@@ -6,6 +6,8 @@ metadata:
labels:
addonmanager.kubernetes.io/mode: Reconcile
k8s-app: kube-haproxy
annotations:
haproxy-cfg-checksum: "{{ haproxy_stat.stat.checksum }}"
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
......
......@@ -6,6 +6,8 @@ metadata:
labels:
addonmanager.kubernetes.io/mode: Reconcile
k8s-app: kube-nginx
annotations:
nginx-cfg-checksum: "{{ nginx_stat.stat.checksum }}"
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment