Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kube-proxy post deployment removal #5554

Merged
merged 2 commits into from
Jul 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitlab-ci/packet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ packet_ubuntu16-kube-router-sep:
extends: .packet
when: manual

packet_ubuntu16-kube-router-svc-proxy:
stage: deploy-part2
extends: .packet
when: manual

packet_debian10-containerd:
stage: deploy-part2
extends: .packet
Expand Down
3 changes: 0 additions & 3 deletions roles/kubernetes/kubeadm/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
discovery_timeout: 60s
kubeadm_join_timeout: 120s

# Optionally remove kube_proxy installed by kubeadm
kube_proxy_remove: false
MrFreezeex marked this conversation as resolved.
Show resolved Hide resolved

# If non-empty, will use this string as identification instead of the actual hostname
kube_override_hostname: >-
{%- if cloud_provider is defined and cloud_provider in [ 'aws' ] -%}
Expand Down
1 change: 0 additions & 1 deletion roles/kubernetes/kubeadm/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@
delegate_to: "{{ groups['kube-master']|first }}"
when:
- kube_proxy_remove
- kubeadm_discovery_address != kube_apiserver_endpoint | replace("https://", "")
# When scaling/adding nodes in the existing k8s cluster, kube-proxy wouldn't be created, as `kubeadm init` wouldn't run.
ignore_errors: true
tags:
Expand Down
3 changes: 0 additions & 3 deletions roles/kubernetes/node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ kubelet_kubelet_cgroups: "/systemd/system.slice"
### fail with swap on (default true)
kubelet_fail_swap_on: true

# Optionally remove kube_proxy installed by kubeadm
kube_proxy_remove: false

# Reserve this space for kube resources
kube_memory_reserved: 256M
kube_cpu_reserved: 100m
Expand Down
2 changes: 0 additions & 2 deletions roles/win_nodes/kubernetes_patch/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---

kubernetes_user_manifests_path: "{{ ansible_env.HOME }}/kube-manifests"
# Optionally remove kube_proxy installed by kubeadm
kube_proxy_remove: false
# nodeselector for kube-proxy ds is beta until 1.18
kube_proxy_nodeselector: "{{ 'kubernetes.io/os' if kube_version is version('v1.18.0', '>=') else 'beta.kubernetes.io/os' }}"
12 changes: 12 additions & 0 deletions tests/files/packet_ubuntu16-kube-router-svc-proxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# Instance settings
cloud_image: ubuntu-1604
mode: separate

# Kubespray settings
bootstrap_os: ubuntu
kube_network_plugin: kube-router
deploy_netchecker: true
dns_min_replicas: 1

kube_router_run_service_proxy: true