mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 05:45:06 +03:00
Get conf checksum directly for localhost CP loadbalancer (#12632)
There is no need to stat the templated file, because the template module already returns a checksum.
This commit is contained in:
@@ -18,14 +18,7 @@
|
|||||||
owner: root
|
owner: root
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
backup: true
|
backup: true
|
||||||
|
register: haproxy_conf
|
||||||
- name: Haproxy | Get checksum from config
|
|
||||||
stat:
|
|
||||||
path: "{{ haproxy_config_dir }}/haproxy.cfg"
|
|
||||||
get_attributes: false
|
|
||||||
get_checksum: true
|
|
||||||
get_mime: false
|
|
||||||
register: haproxy_stat
|
|
||||||
|
|
||||||
- name: Haproxy | Write static pod
|
- name: Haproxy | Write static pod
|
||||||
template:
|
template:
|
||||||
|
|||||||
@@ -18,14 +18,7 @@
|
|||||||
owner: root
|
owner: root
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
backup: true
|
backup: true
|
||||||
|
register: nginx_conf
|
||||||
- name: Nginx-proxy | Get checksum from config
|
|
||||||
stat:
|
|
||||||
path: "{{ nginx_config_dir }}/nginx.conf"
|
|
||||||
get_attributes: false
|
|
||||||
get_checksum: true
|
|
||||||
get_mime: false
|
|
||||||
register: nginx_stat
|
|
||||||
|
|
||||||
- name: Nginx-proxy | Write static pod
|
- name: Nginx-proxy | Write static pod
|
||||||
template:
|
template:
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ metadata:
|
|||||||
addonmanager.kubernetes.io/mode: Reconcile
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
k8s-app: kube-haproxy
|
k8s-app: kube-haproxy
|
||||||
annotations:
|
annotations:
|
||||||
haproxy-cfg-checksum: "{{ haproxy_stat.stat.checksum }}"
|
haproxy-cfg-checksum: "{{ haproxy_conf.checksum }}"
|
||||||
spec:
|
spec:
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
dnsPolicy: ClusterFirstWithHostNet
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ metadata:
|
|||||||
addonmanager.kubernetes.io/mode: Reconcile
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
k8s-app: kube-nginx
|
k8s-app: kube-nginx
|
||||||
annotations:
|
annotations:
|
||||||
nginx-cfg-checksum: "{{ nginx_stat.stat.checksum }}"
|
nginx-cfg-checksum: "{{ nginx_conf.checksum }}"
|
||||||
spec:
|
spec:
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
dnsPolicy: ClusterFirstWithHostNet
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
|
|||||||
Reference in New Issue
Block a user