Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
c27dee57
Commit
c27dee57
authored
2 years ago
by
Calin Cristian Andrei
Browse files
Options
Downloads
Patches
Plain Diff
[calico] don't clobber user set felixconfig options that are not managed by kubespray
parent
5684610a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/network_plugin/calico/tasks/install.yml
+39
-20
39 additions, 20 deletions
roles/network_plugin/calico/tasks/install.yml
with
39 additions
and
20 deletions
roles/network_plugin/calico/tasks/install.yml
+
39
−
20
View file @
c27dee57
...
...
@@ -156,26 +156,45 @@
-
inventory_hostname in groups['kube_control_plane']
-
calico_datastore == "kdd"
-
name
:
Calico | Configure calico FelixConfiguration
command
:
cmd
:
"
{{
bin_dir
}}/calicoctl.sh
apply
-f
-"
stdin
:
"
{{
stdin
is
string
|
ternary(stdin,
stdin|to_json)
}}"
vars
:
stdin
:
>
{ "kind": "FelixConfiguration",
"apiVersion": "projectcalico.org/v3",
"metadata": {
"name": "default",
},
"spec": {
"ipipEnabled": {{ calico_ipip_mode != 'Never' }},
"reportingInterval": "{{ calico_felix_reporting_interval }}",
"bpfLogLevel": "{{ calico_bpf_log_level }}",
"bpfEnabled": {{ calico_bpf_enabled | bool }},
"bpfExternalServiceMode": "{{ calico_bpf_service_mode }}",
"wireguardEnabled": {{ calico_wireguard_enabled | bool }},
"logSeverityScreen": "{{ calico_felix_log_severity_screen }}",
"vxlanEnabled": {{ calico_vxlan_mode != 'Never' }} }}
-
block
:
-
name
:
Calico | Get existing FelixConfiguration
command
:
"
{{
bin_dir
}}/calicoctl.sh
get
felixconfig
default
-o
json"
register
:
_felix_cmd
ignore_errors
:
True
changed_when
:
False
-
name
:
Calico | Set kubespray FelixConfiguration
set_fact
:
_felix_config
:
>
{
"kind": "FelixConfiguration",
"apiVersion": "projectcalico.org/v3",
"metadata": {
"name": "default",
},
"spec": {
"ipipEnabled": {{ calico_ipip_mode != 'Never' }},
"reportingInterval": "{{ calico_felix_reporting_interval }}",
"bpfLogLevel": "{{ calico_bpf_log_level }}",
"bpfEnabled": {{ calico_bpf_enabled | bool }},
"bpfExternalServiceMode": "{{ calico_bpf_service_mode }}",
"wireguardEnabled": {{ calico_wireguard_enabled | bool }},
"logSeverityScreen": "{{ calico_felix_log_severity_screen }}",
"vxlanEnabled": {{ calico_vxlan_mode != 'Never' }}
}
}
-
name
:
Calico | Process FelixConfiguration
set_fact
:
_felix_config
:
"
{{
_felix_cmd.stdout
|
from_json
|
combine(_felix_config,
recursive=True)
}}"
when
:
-
_felix_cmd is success
-
name
:
Calico | Configure calico FelixConfiguration
command
:
cmd
:
"
{{
bin_dir
}}/calicoctl.sh
apply
-f
-"
stdin
:
"
{{
_felix_config
is
string
|
ternary(_felix_config,
_felix_config|to_json)
}}"
changed_when
:
False
when
:
-
inventory_hostname == groups['kube_control_plane'][0]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment