add update sysctl setting
This commit is contained in:
parent
21e91402d7
commit
b7c07f27b8
@ -4,6 +4,7 @@ This catalog recipe enables unicast VRRP based failover for one or more floating
|
||||
|
||||
|
||||
### Form Fields
|
||||
* **Update Host Sysctl** - If `true` automatically sets the needed sysctl setting on the host.
|
||||
* **Host Label Name** - Host label key name used to schedule keepalived master and backup instances.
|
||||
* **Master Label** - The value of the keepalived host Label to signify the master instance.
|
||||
* **Backup Label** - The value of the keepalived host Label to signify the backup instance.
|
||||
|
@ -17,6 +17,9 @@ services:
|
||||
KEEPALIVED_VIRTUAL_IPADDRESS_1: "\"${virtual_ip}\""
|
||||
labels:
|
||||
io.rancher.scheduler.affinity:host_label: ${host_label}=${master_label}
|
||||
{{- if eq .Values.update_sysctl "true" }}
|
||||
io.rancher.sidekicks: keepalived-sysctl
|
||||
{{- end}}
|
||||
|
||||
keepalived-backup:
|
||||
restart: always
|
||||
@ -35,3 +38,19 @@ services:
|
||||
KEEPALIVED_VIRTUAL_IPADDRESS_1: "\"${virtual_ip}\""
|
||||
labels:
|
||||
io.rancher.scheduler.affinity:host_label: ${host_label}=${backup_label}
|
||||
{{- if eq .Values.update_sysctl "true" }}
|
||||
io.rancher.sidekicks: keepalived-sysctl
|
||||
{{- end}}
|
||||
|
||||
{{- if eq .Values.update_sysctl "true" }}
|
||||
keepalived-sysctl:
|
||||
image: rawmind/alpine-sysctl:0.1-1
|
||||
network_mode: none
|
||||
privileged: true
|
||||
environment:
|
||||
SYSCTL_KEY: net.ipv4.ip_nonlocal_bind
|
||||
SYSCTL_VALUE: 1
|
||||
labels:
|
||||
io.rancher.container.start_once: true
|
||||
{{- end}}
|
||||
|
@ -5,6 +5,17 @@
|
||||
minimum_rancher_version: v0.46.0
|
||||
uuid: keepalived-1
|
||||
questions:
|
||||
- variable: "update_sysctl"
|
||||
description: |
|
||||
Set true to update sysctl.
|
||||
WARN: If set to true, sysctl key net.ipv4.ip_nonlocal_bind will be set to 1.
|
||||
label: "Update Host Sysctl:"
|
||||
type: "enum"
|
||||
default: "false"
|
||||
options:
|
||||
- "true"
|
||||
- "false"
|
||||
required: true
|
||||
- variable: "host_label"
|
||||
description: "Host label key name used to schedule keepalived master and backup instances."
|
||||
label: "Host Label Name:"
|
||||
|
Loading…
x
Reference in New Issue
Block a user