Skip to content

Commit

Permalink
Clean up keepalived script warnings
Browse files Browse the repository at this point in the history
Currently we see two ugly messages in the keepalived logs when
starting the service:

WARNING - default user 'keepalived_script' for script execution does
not exist - please create.

and

SECURITY VIOLATION - scripts are being executed but script_security
not enabled.

This patch adds the enable_script_security and script_user options to
our keepalived.conf to suppress those messages.
  • Loading branch information
cybertron committed Jul 7, 2020
1 parent 9e3e1d5 commit 406392f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ mode: 0644
path: "/etc/kubernetes/static-pod-resources/keepalived/keepalived.conf.tmpl"
contents:
inline: |
global_defs {
enable_script_security
script_user root
}
vrrp_script chk_ocp {
script "/usr/bin/curl -o /dev/null -kLfs https://localhost:6443/readyz && /usr/bin/curl -o /dev/null -Lfs http://localhost:50936/readyz"
interval 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ mode: 0644
path: "/etc/kubernetes/static-pod-resources/keepalived/keepalived.conf.tmpl"
contents:
inline: |
global_defs {
enable_script_security
script_user root
}
vrrp_script chk_ocp {
script "/usr/bin/curl -o /dev/null -kLfs https://localhost:6443/readyz && /usr/bin/curl -o /dev/null -kLfs http://localhost:50936/readyz"
interval 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ mode: 0644
path: "/etc/kubernetes/static-pod-resources/keepalived/keepalived.conf.tmpl"
contents:
inline: |
global_defs {
enable_script_security
script_user root
}
vrrp_script chk_ocp {
script "/usr/bin/curl -o /dev/null -kLfs https://0:6443/readyz && /usr/bin/curl -o /dev/null -Lfs http://localhost:50936/readyz"
interval 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ contents:
{{ if .Infra.Status.PlatformStatus -}}
{{ if .Infra.Status.PlatformStatus.VSphere -}}
{{ if .Infra.Status.PlatformStatus.VSphere.APIServerInternalIP -}}
global_defs {
enable_script_security
script_user root
}
vrrp_script chk_ocp {
script "/usr/bin/curl -o /dev/null -kLfs https://localhost:6443/readyz && /usr/bin/curl -o /dev/null -Lfs http://localhost:50936/readyz"
interval 1
Expand Down

0 comments on commit 406392f

Please sign in to comment.