Don't fail Kubespray scenario if swap is enabled
We have swap enabled in CI, by default Kubespray refuses to run with swap, and so does Kubelet. Make this behavior configurable and allow swap in the Kubespray scenario env file. It should be fine to run with swap for development/testing [1]. [1] https://github.com/kubernetes-incubator/kubespray/issues/1787#issuecomment-336159788 Depends-On: I7a02134970c1b1754d42c4e85ed0a2188a5ecdb6 Change-Id: I023824a31f1278b01c33ce81d4af81247dd5f672
This commit is contained in:
parent
904cc3dd6d
commit
cb17631829
@ -31,6 +31,10 @@ resource_registry:
|
||||
|
||||
|
||||
parameter_defaults:
|
||||
# NOTE: CI envs have swap, which by default blocks Kubespray and Kubelet.
|
||||
# https://github.com/kubernetes-incubator/kubespray/issues/1787#issuecomment-336155007
|
||||
KubesprayIgnoreAssertErrors: true
|
||||
|
||||
ControllerServices:
|
||||
- OS::TripleO::Services::Docker
|
||||
- OS::TripleO::Services::Kernel
|
||||
|
@ -32,6 +32,11 @@ parameters:
|
||||
description: Mapping of service endpoint -> protocol. Typically set
|
||||
via parameter_defaults in the resource registry.
|
||||
type: json
|
||||
KubesprayIgnoreAssertErrors:
|
||||
default: false
|
||||
description: Ignore kubespray pre-flight checks. Useful for deploying
|
||||
on environments with swap enabled.
|
||||
type: boolean
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
@ -131,9 +136,19 @@ outputs:
|
||||
- name: generate kubespray global vars
|
||||
copy:
|
||||
dest: "{{playbook_dir}}/kubespray/global_vars.yml"
|
||||
content: |
|
||||
kubeconfig_localhost: true
|
||||
artifacts_dir: '{{playbook_dir}}/kubespray/artifacts'
|
||||
content:
|
||||
str_replace:
|
||||
template: |
|
||||
kubeconfig_localhost: true
|
||||
artifacts_dir: '{{playbook_dir}}/kubespray/artifacts'
|
||||
ignore_assert_errors: IGNORE_ASSERT_ERRORS
|
||||
kubelet_fail_swap_on: KUBELET_FAIL_SWAP_ON
|
||||
params:
|
||||
IGNORE_ASSERT_ERRORS: {get_param: KubesprayIgnoreAssertErrors}
|
||||
KUBELET_FAIL_SWAP_ON:
|
||||
yaql:
|
||||
expression: not $.data
|
||||
data: {get_param: KubesprayIgnoreAssertErrors}
|
||||
- name: generate kubespray playbook
|
||||
copy:
|
||||
dest: "{{playbook_dir}}/kubespray/playbook.yml"
|
||||
|
Loading…
Reference in New Issue
Block a user