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
dc767c14
Unverified
Commit
dc767c14
authored
3 years ago
by
Alvaro Campesino
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
remove no longer present etcd nodes from APIEndpoints list in kubeadm-config configmap (#8244)
parent
30ec0325
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/remove-node/remove-etcd-node/tasks/main.yml
+15
-0
15 additions, 0 deletions
roles/remove-node/remove-etcd-node/tasks/main.yml
with
15 additions
and
0 deletions
roles/remove-node/remove-etcd-node/tasks/main.yml
+
15
−
0
View file @
dc767c14
...
...
@@ -62,3 +62,18 @@
when
:
-
inventory_hostname in groups['etcd']
-
etcd_member_id.stdout | length >
0
# Delete node from kubeadm-config
-
name
:
Update kubeadm-config configmap removing control-plane no longer existing endpoints
vars
:
kubeadm_config_cm_content
:
"
{{
lookup('kubernetes.core.k8s',
kind='ConfigMap',
namespace='kube-system',
resource_name='kubeadm-config',
kubeconfig=keos_kubeconfig_path)
}}"
kubernetes.core.k8s
:
kubeconfig
:
"
{{
keos_kubeconfig_path
}}"
definition
:
api_version
:
v1
kind
:
ConfigMap
metadata
:
name
:
kubeadm-config-test
namespace
:
default
data
:
ClusterStatus
:
"
{{
kubeadm_config_cm_content.data.ClusterStatus
|
regex_replace(
node
|default(kube_node)
+
':
\n
'
+
'
*advertiseAddress:
([0-9]{1,3}.){3}[0-9]{1,3}
\n
'
+
'
*bindPort:
[0-9]{1,5}'
,
'')
}}"
This diff is collapsed.
Click to expand it.
Ghost User
@ghost
mentioned in commit
5a25de37
·
3 years ago
mentioned in commit
5a25de37
mentioned in commit 5a25de37eff61c7112f496c6fe1e716711bfe888
Toggle commit list
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