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
e1967b07
Unverified
Commit
e1967b07
authored
3 years ago
by
Maciej Wereski
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
MetalLB: keep nodeSelector in one place (#7931)
Signed-off-by:
Maciej Wereski
<
m.wereski@partner.samsung.com
>
parent
507091ec
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
roles/kubernetes-apps/metallb/defaults/main.yml
+4
-2
4 additions, 2 deletions
roles/kubernetes-apps/metallb/defaults/main.yml
roles/kubernetes-apps/metallb/templates/metallb.yml.j2
+5
-9
5 additions, 9 deletions
roles/kubernetes-apps/metallb/templates/metallb.yml.j2
with
9 additions
and
11 deletions
roles/kubernetes-apps/metallb/defaults/main.yml
+
4
−
2
View file @
e1967b07
...
@@ -6,8 +6,10 @@ metallb_port: "7472"
...
@@ -6,8 +6,10 @@ metallb_port: "7472"
metallb_memberlist_port
:
"
7946"
metallb_memberlist_port
:
"
7946"
metallb_peers
:
[]
metallb_peers
:
[]
metallb_speaker_enabled
:
true
metallb_speaker_enabled
:
true
metallb_speaker_nodeselector
:
{}
metallb_speaker_nodeselector
:
metallb_controller_nodeselector
:
{}
kubernetes.io/os
:
"
linux"
metallb_controller_nodeselector
:
kubernetes.io/os
:
"
linux"
metallb_speaker_tolerations
:
metallb_speaker_tolerations
:
-
effect
:
NoSchedule
-
effect
:
NoSchedule
key
:
node-role.kubernetes.io/master
key
:
node-role.kubernetes.io/master
...
...
This diff is collapsed.
Click to expand it.
roles/kubernetes-apps/metallb/templates/metallb.yml.j2
+
5
−
9
View file @
e1967b07
...
@@ -398,14 +398,12 @@ spec:
...
@@ -398,14 +398,12 @@ spec:
- ALL
- ALL
readOnlyRootFilesystem: true
readOnlyRootFilesystem: true
hostNetwork: true
hostNetwork: true
nodeSelector:
kubernetes.io/os: linux
serviceAccountName: speaker
terminationGracePeriodSeconds: 2
{% if metallb_speaker_nodeselector %}
{% if metallb_speaker_nodeselector %}
nodeSelector:
nodeSelector:
{{ metallb_speaker_nodeselector | to_nice_yaml | indent(width=8) }}
{{ metallb_speaker_nodeselector | to_nice_yaml | indent(width=8) }}
{%- endif %}
{%- endif %}
serviceAccountName: speaker
terminationGracePeriodSeconds: 2
{% if metallb_speaker_tolerations %}
{% if metallb_speaker_tolerations %}
tolerations:
tolerations:
{{ metallb_speaker_tolerations | to_nice_yaml(indent=2) | indent(width=8) }}
{{ metallb_speaker_tolerations | to_nice_yaml(indent=2) | indent(width=8) }}
...
@@ -435,10 +433,6 @@ spec:
...
@@ -435,10 +433,6 @@ spec:
app: metallb
app: metallb
component: controller
component: controller
spec:
spec:
{% if metallb_controller_nodeselector %}
nodeSelector:
{{ metallb_controller_nodeselector | to_nice_yaml | indent(width=8) }}
{%- endif %}
{% if metallb_controller_tolerations %}
{% if metallb_controller_tolerations %}
tolerations:
tolerations:
{{ metallb_controller_tolerations | to_nice_yaml(indent=2) | indent(width=8) }}
{{ metallb_controller_tolerations | to_nice_yaml(indent=2) | indent(width=8) }}
...
@@ -463,8 +457,10 @@ spec:
...
@@ -463,8 +457,10 @@ spec:
drop:
drop:
- all
- all
readOnlyRootFilesystem: true
readOnlyRootFilesystem: true
{% if metallb_controller_nodeselector %}
nodeSelector:
nodeSelector:
kubernetes.io/os: linux
{{ metallb_controller_nodeselector | to_nice_yaml | indent(width=8) }}
{%- endif %}
securityContext:
securityContext:
runAsNonRoot: true
runAsNonRoot: true
runAsUser: 65534
runAsUser: 65534
...
...
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